Language

2Checkout Documentation

Find

You must specify your API username and password using the twocheckout.Api.credentials method before calling a method in this class.

Methods

find

Use to retrieve a coupon object.

Arguments

  • dictionary Parameters

Returns

Returns a Coupon object.

Example Usage:

twocheckout.Api.credentials({'username':'APIuser1817037', 'password':'APIpass1817037'})

params = {
    'coupon_code': 'PYTEST12'
    }

coupon = twocheckout.Coupon.find(params)

Example Response:

{
   'coupon_code': 'PYTEST12',
   'date_expire': '2020-12-12',
   'minimum_purchase': '0.00',
   'percentage_off': None,
   'product': [
      {
         'product_id': '0',
         'product_url': 'https://www.2checkout.com/api/products/detail_product?product_id=0'
      }
   ],
 'type': 'shipping',
 'value_off': None
}