Cart Settings
Authentication header
code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"application/jsonPossible values: OK
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"
}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": {}
}Authentication header
code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"application/jsonPossible values: Successful request
Bad request
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 enabled on your account, available for your shoppers, with currencies and countries. The result can be filtered by PaymentMethod and CountryCode.
roCCPossible values: application/jsonExample: application/jsonPossible values: Authentication header
code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"Returns a payment methods collection
ISO 3-Letter Currency Code
EURISO 2-Letter Country Code
ROAVANGATE_BVtrueamexCCtrueError
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
}
]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.
roCCPossible values: application/jsonExample: application/jsonPossible values: Authentication header
code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"Returns currencies collection
USD840United States Dollar$left.,2Error
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
}
]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.
nlapplication/jsonExample: application/jsonPossible values: Authentication header
code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"Returns countries collection
AFAfghanistanError
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"
}
]Country code
frapplication/jsonExample: application/jsonPossible values: Authentication header
code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"Returns states collection
AlabamaALError
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?