For the complete documentation index, see llms.txt. This page is also available as Markdown.

Cart Settings

Retrieve session content

put
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Body
ExternalCustomerReferencestringOptional
CustomerReferencestringOptional
CountrystringOptional
CurrencystringOptional
CustomerIPstringOptional
LanguagestringOptional
SourcestringOptional
Responses
200

OK

application/json
put/orders/0/
PUT /rest/6.0/orders/0/ HTTP/1.1
Host: api.2checkout.com
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Accept: application/json
Content-Type: application/json
Content-Length: 823

{
  "CheckRenewableProducts": true,
  "BillingDetails": {
    "Address1": "Test Address",
    "City": "LA",
    "CountryCode": "US",
    "Email": "customer@2Checkout.com",
    "FirstName": "Customer",
    "LastName": "2Checkout",
    "State": "CA",
    "Zip": "12345"
  },
  "Country": "us",
  "Currency": "usd",
  "CustomerIP": "91.220.121.21",
  "ExternalReference": "REST_API_AVANGTE",
  "Affiliate": {},
  "ExternalCustomerReference": "IOUER",
  "CustomerReference": "GFDFE",
  "Items": [
    {
      "Code": "my_subscription_1",
      "Quantity": "1",
      "Price": {
        "Amount": 100,
        "Type": "CUSTOM"
      }
    }
  ],
  "Language": "en",
  "PaymentDetails": {
    "Currency": "USD",
    "CustomerIP": "91.220.121.21",
    "PaymentMethod": {
      "CCID": "123",
      "CardNumber": "4111111111111111",
      "CardNumberTime": "12",
      "CardType": "VISA",
      "ExpirationMonth": "12",
      "ExpirationYear": "2020",
      "HolderName": "John Doe",
      "HolderNameTime": "12",
      "RecurringEnabled": true
    },
    "Type": "TEST"
  },
  "Source": "testAPI.com"
}
200

OK

{
  "AffiliateCommission": 0,
  "Currency": "usd",
  "Discount": 0,
  "GrossDiscountedPrice": 99,
  "GrossPrice": 99,
  "ContainsRenewableProducts": true,
  "RequestDeliveryData": true,
  "Items": [
    {
      "Code": "my_subscription_1",
      "Price": {
        "AffiliateCommission": 0,
        "Currency": "usd",
        "Discount": 0,
        "GrossDiscountedPrice": 99,
        "GrossPrice": 99,
        "NetDiscountedPrice": 99,
        "NetPrice": 99,
        "UnitAffiliateCommission": 0,
        "UnitDiscount": 0,
        "UnitGrossDiscountedPrice": 99,
        "UnitGrossPrice": 99,
        "UnitNetDiscountedPrice": 99,
        "UnitNetPrice": 99,
        "UnitVAT": 0,
        "VAT": 0
      },
      "CrossSell": {
        "ParentCode": "MASTER_PRODUCT_CODE",
        "CampaignCode": "CROSS_SELL_CAMPAIGN_CODE"
      },
      "PriceOptions": [
        {
          "Code": "SUPPORT",
          "Options": [
            "emailsupport"
          ],
          "Required": false
        },
        {
          "Code": "USERS",
          "Options": [
            "oneuser1"
          ],
          "Required": false
        }
      ],
      "ProductDetails": {
        "Name": "2Checkout Subscription 1",
        "RenewalStatus": false
      },
      "Quantity": 1,
      "SKU": "NewSubscriptionPurchase",
      "Promotion": {
        "Name": "Regular promotion",
        "Code": "VXVA13JRPM",
        "Description": "description",
        "StartDate": "2022--11-01",
        "EndDate": "2022-11-30",
        "MaximumOrdersNumber": null,
        "MaximumQuantity": null,
        "InstantDiscount": false,
        "Coupon": "",
        "DiscountLabel": "20 EUR",
        "Enabled": true,
        "Type": "REGULAR",
        "Discount": 20,
        "DiscountCurrency": "EUR",
        "DiscountType": "FIXED"
      }
    }
  ],
  "NetDiscountedPrice": 99,
  "NetPrice": 99,
  "Promotions": [
    {
      "Name": "Global promotion",
      "Code": "C03ZALY2S9",
      "Description": "description",
      "StartDate": "2022--11-01",
      "EndDate": "2022-11-30",
      "MaximumOrdersNumber": null,
      "MaximumQuantity": null,
      "InstantDiscount": false,
      "Coupon": "",
      "DiscountLabel": "30",
      "Enabled": true,
      "Type": "GLOBAL",
      "Discount": 30,
      "DiscountCurrency": "USD",
      "DiscountType": "PERCENT"
    },
    {
      "Name": "Order promotion",
      "Code": "SB8ZMIUXZ5",
      "Description": "description",
      "StartDate": "2022--11-01",
      "EndDate": "2022-11-30",
      "MaximumOrdersNumber": null,
      "MaximumQuantity": null,
      "InstantDiscount": false,
      "Coupon": "",
      "DiscountLabel": "45 USD",
      "Enabled": true,
      "Type": "ORDER",
      "Discount": 45,
      "DiscountCurrency": "USD",
      "DiscountType": "FIXED"
    }
  ],
  "VAT": 0,
  "Affiliate": {}
}

Retrieve price information using a multitude of filters

put
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Body
CurrencystringRequired
CouponCodestringOptional
PayTypestring · enumOptionalPossible values:
Responses
201

Successful request

application/json
ItemPriceobjectOptional
UnitNetPricenumberOptional
UnitGrossPricenumberOptional
UnitVATintegerOptional
UnitDiscountintegerOptional
UnitNetDiscountedPricenumberOptional
UnitGrossDiscountedPricenumberOptional
UnitAffiliateCommissionintegerOptional
VATPercentintegerOptional
HandlingFeeNetPriceintegerOptional
HandlingFeeGrossPriceintegerOptional
AffiliateCommissionnumberOptional
CurrencystringOptional
DiscountnumberOptional
GrossDiscountedPricenumberOptional
GrossPricenumberOptional
NetDiscountedPricenumberOptional
NetPricenumberOptional
VATnumberOptional
put/orders/0/price/
PUT /rest/6.0/orders/0/price/ HTTP/1.1
Host: api.2checkout.com
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Accept: application/json
Content-Type: application/json
Content-Length: 308

{
  "BillingDetails": {
    "Address1": "Test Address",
    "City": "Beijing",
    "CountryCode": "CN",
    "Email": "customer@2Checkout.com",
    "FirstName": "Customer",
    "FiscalCode": "056.027.963-98",
    "LastName": "2Checkout",
    "Phone": "556133127400",
    "State": "DF",
    "Zip": "70403-900"
  },
  "Currency": "EUR",
  "Item": {
    "Code": "some product",
    "Quantity": "1"
  }
}
{
  "Currency": "eur",
  "UnitNetPrice": 15,
  "UnitGrossPrice": 15,
  "UnitVAT": 0,
  "UnitDiscount": 0,
  "UnitNetDiscountedPrice": 0,
  "UnitGrossDiscountedPrice": 0,
  "UnitAffiliateCommission": 0,
  "VATPercent": 0,
  "HandlingFeeNetPrice": 0,
  "HandlingFeeGrossPrice": 0,
  "NetPrice": 15,
  "GrossPrice": 15,
  "NetDiscountedPrice": 15,
  "GrossDiscountedPrice": 15,
  "Discount": 0,
  "VAT": 0,
  "AffiliateCommission": 0
}

Get the list of payment methods available for your shoppers.

get

Get the list of payment methods enabled on your account, available for your shoppers, with currencies and countries. The result can be filtered by PaymentMethod and CountryCode.

Query parameters
CountryCodestringOptionalExample: ro
PaymentMethodstring · enumOptionalExample: CCPossible values:
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

Returns a payment methods collection

application/json
Currenciesstring[]Optional

ISO 3-Letter Currency Code

Example: EUR
Countriesstring[]Optional

ISO 2-Letter Country Code

Example: RO
BusinessCompanystringOptionalExample: AVANGATE_BV
HasRenewalbooleanOptionalExample: true
PaymentTypestringOptionalExample: amex
PaymentMethodstringOptionalExample: CC
SupportsTrialbooleanOptionalExample: true
get/paymentmethods/
GET /rest/6.0/paymentmethods/ HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
[
  {
    "Currencies": [
      "EUR"
    ],
    "Countries": [
      "RO"
    ],
    "BusinessCompany": "AVANGATE_BV",
    "HasRenewal": true,
    "PaymentType": "amex",
    "PaymentMethod": "CC",
    "AutofillSettings": [
      {
        "Name": "SUPPORTED_CARDS",
        "Value": "visa,masterCard"
      }
    ],
    "SupportsTrial": true
  }
]

Get the list of available currencies

get

Retrieve the list of available currencies enabled on your account, available for your shoppers. If the country and payment method parameters are received, will be returned just the currencies for the specific country and payment method.

Query parameters
CountryCodestringOptionalExample: ro
PaymentMethodstring · enumOptionalExample: CCPossible values:
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

Returns currencies collection

application/json
CodestringOptionalExample: USD
ISO3DigitCodeintegerOptionalExample: 840
LabelstringOptionalExample: United States Dollar
SymbolstringOptionalExample: $
SymbolPositionstringOptionalExample: left
DecimalSeparatorstringOptionalExample: .
UnitSeparatorstringOptionalExample: ,
DecimalsintegerOptionalExample: 2
get/currencies/
GET /rest/6.0/currencies/ HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
[
  {
    "Code": "USD",
    "ISO3DigitCode": 840,
    "Label": "United States Dollar",
    "Symbol": "$",
    "SymbolPosition": "left",
    "DecimalSeparator": ".",
    "UnitSeparator": ",",
    "Decimals": 2
  }
]

Get the list of available countries

get

Retrieve the list of available countries enabled on your account, from which your shoppers can purchase. If the language parameter is received, the country names will be translated.

Query parameters
languagestringOptionalExample: nl
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

Returns countries collection

application/json
CodestringOptionalExample: AF
LabelstringOptionalExample: Afghanistan
get/countries/
GET /rest/6.0/countries/ HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
[
  {
    "Code": "AF",
    "Label": "Afghanistan"
  }
]

Get the list of states for a specific country

get
Path parameters
countryCodestringRequired

Country code

Example: fr
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

Returns states collection

application/json
NamestringOptionalExample: Alabama
CodestringOptionalExample: AL
get/countries/{countryCode}/states/
GET /rest/6.0/countries/{countryCode}/states/ HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
[
  {
    "Name": "Alabama",
    "Code": "AL"
  }
]

Last updated

Was this helpful?