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

Pricing Configuration

Retrieve pricing configurations

get

Overview

Extract information on the pricing configurations you set for a product.

Path parameters
ProductCodestringRequired

The editable code that you control at product-level, not the unique, system-generated product ID

Example: my_subscription_1
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

OK

application/json
get/products/{ProductCode}/pricingconfigurations/
GET /rest/6.0/products/{ProductCode}/pricingconfigurations/ HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
200

OK

[
  {
    "BillingCountries": [],
    "Code": "54DCBC3DC8",
    "Default": true,
    "DefaultCurrency": "USD",
    "Name": "2Checkout Subscription's Price Configuration",
    "PriceOptions": [
      {
        "Code": "SUPPORT",
        "Required": true,
        "CustomImpactOnPrice": false
      },
      {
        "Code": "USERS",
        "Required": true,
        "CustomImpactOnPrice": false
      },
      {
        "Code": "BACKUP",
        "Required": false,
        "CustomImpactOnPrice": false
      }
    ],
    "PriceType": "NET",
    "Prices": {
      "Regular": [
        {
          "Amount": 99,
          "Currency": "USD",
          "MaxQuantity": "99999",
          "MinQuantity": "1",
          "OptionCodes": []
        },
        {
          "Amount": 0,
          "Currency": "EUR",
          "MaxQuantity": "99999",
          "MinQuantity": "1",
          "OptionCodes": []
        }
      ],
      "Renewal": []
    },
    "PricingSchema": "DYNAMIC"
  }
]

Add a pricing configuration

post

Overview

Add a pricing configuration for a product.

Path parameters
ProductCodestringRequired

The editable code that you control at product-level, not the unique, system-generated product ID

Example: my_subscription_1
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Body
DefaultbooleanOptional
DefaultCurrencystringOptional
NamestringOptional
PriceTypestringOptional
PricingSchemastringOptional
Responses
200

OK

No content

post/products/{ProductCode}/pricingconfigurations/
POST /rest/6.0/products/{ProductCode}/pricingconfigurations/ 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: 575

{
  "BillingCountries": [],
  "Default": true,
  "DefaultCurrency": "USD",
  "Name": "2Checkout Subscription's Price Configuration",
  "PriceOptions": [
    {
      "Code": "SUPPORT",
      "Required": true,
      "CustomImpactOnPrice": false
    },
    {
      "Code": "USERS",
      "Required": true,
      "CustomImpactOnPrice": false
    },
    {
      "Code": "BACKUP",
      "Required": false,
      "CustomImpactOnPrice": false
    }
  ],
  "PriceType": "NET",
  "Prices": {
    "Regular": [
      {
        "Amount": 99,
        "Currency": "USD",
        "MaxQuantity": "99999",
        "MinQuantity": "1",
        "OptionCodes": []
      },
      {
        "Amount": 0,
        "Currency": "EUR",
        "MaxQuantity": "99999",
        "MinQuantity": "1",
        "OptionCodes": []
      }
    ],
    "Renewal": []
  },
  "PricingSchema": "DYNAMIC"
}
200

OK

No content

Retrieve a pricing configuration

get

Overview

Extract information on a specific pricing configuration for a product.

Path parameters
ProductCodestringRequired

The editable code that you control at product-level, not the unique, system-generated product ID.

Example: my_subscription_1
CodestringRequired

System-generated identifier. Read-only.

Example: 54DCBC3DC8
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

OK

application/json
get/products/{ProductCode}/pricingconfigurations/{Code}/
GET /rest/6.0/products/{ProductCode}/pricingconfigurations/{Code}/ HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
200

OK

{
  "BillingCountries": [],
  "Code": "54DCBC3DC8",
  "Default": true,
  "UseOriginalPrices": false,
  "DefaultCurrency": "USD",
  "Name": "2Checkout Subscription's Price Configuration",
  "PriceOptions": [
    {
      "Code": "SUPPORT",
      "Required": true,
      "CustomImpactOnPrice": false
    },
    {
      "Code": "USERS",
      "Required": true,
      "CustomImpactOnPrice": false
    },
    {
      "Code": "BACKUP",
      "Required": false,
      "CustomImpactOnPrice": false
    }
  ],
  "PriceType": "NET",
  "Prices": {
    "Regular": [
      {
        "Amount": 99,
        "Currency": "USD",
        "MaxQuantity": "99999",
        "MinQuantity": "1",
        "OptionCodes": []
      },
      {
        "Amount": 0,
        "Currency": "EUR",
        "MaxQuantity": "99999",
        "MinQuantity": "1",
        "OptionCodes": []
      }
    ],
    "Renewal": []
  },
  "PricingSchema": "DYNAMIC"
}

Update a pricing configuration

put

Overview

Update a pricing configuration for a product.

Path parameters
ProductCodestringRequired

The editable code that you control at product-level, not the unique, system-generated product ID.

Example: my_subscription_1
CodestringRequired

System-generated identifier. Match the similar parameter in the Body of the request. Read-only.

Example: 54DCBC3DC8
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Body
UseOriginalPricesbooleanOptional
CodestringOptional
DefaultbooleanOptional
DefaultCurrencystringOptional
NamestringOptional
PriceTypestringOptional
PricingSchemastringOptional
Responses
200

OK

No content

put/products/{ProductCode}/pricingconfigurations/{Code}/
PUT /rest/6.0/products/{ProductCode}/pricingconfigurations/{Code}/ 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: 621

{
  "BillingCountries": [],
  "Code": "54DCBC3DC8",
  "UseOriginalPrices": false,
  "Default": true,
  "DefaultCurrency": "USD",
  "Name": "2Checkout Subscription's Price Configuration",
  "PriceOptions": [
    {
      "Code": "SUPPORT",
      "Required": true,
      "CustomImpactOnPrice": false
    },
    {
      "Code": "USERS",
      "Required": true,
      "CustomImpactOnPrice": false
    },
    {
      "Code": "BACKUP",
      "Required": false,
      "CustomImpactOnPrice": false
    }
  ],
  "PriceType": "NET",
  "Prices": {
    "Regular": [
      {
        "Amount": 99,
        "Currency": "USD",
        "MaxQuantity": "99999",
        "MinQuantity": "1",
        "OptionCodes": []
      },
      {
        "Amount": 0,
        "Currency": "EUR",
        "MaxQuantity": "99999",
        "MinQuantity": "1",
        "OptionCodes": []
      }
    ],
    "Renewal": []
  },
  "PricingSchema": "DYNAMIC"
}
200

OK

No content

Update a pricing configuration prices

put

Get the prices from a pricing configuration by code

Path parameters
ProductCodestringRequired
PricingConfigurationCodestringRequired
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

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

true

No content

put/products/{ProductCode}/pricingconfigurations/{PricingConfigurationCode}/prices
PUT /rest/6.0/products/{ProductCode}/pricingconfigurations/{PricingConfigurationCode}/prices HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Content-Type: application/json
Content-Length: 172

{
  "Prices": [
    {
      "Amount": 100,
      "Currency": "USD"
    }
  ],
  "Quantities": {
    "MinQuantity": 10,
    "MaxQuantity": 100
  },
  "PriceOptions": [
    {
      "Code": "x9g7asaj",
      "Required": true,
      "Options": [
        "x9g7asaj4f"
      ]
    }
  ]
}

No content

Assign price option to pricing configuration

post

Note For the PayPerUsage type, Required parameter can be only false. For any other usage type, the Required parameter it can be either false or true.

Path parameters
ProductCodestringRequired
PricingConfigurationCodestringRequired
PriceOptionCodestringRequired
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Body
RequiredbooleanRequired
Responses
200

OK

application/json
booleanOptional
post/products/{ProductCode}/pricingconfigurations/{PricingConfigurationCode}/priceoptions/{PriceOptionCode}/
POST /rest/6.0/products/{ProductCode}/pricingconfigurations/{PricingConfigurationCode}/priceoptions/{PriceOptionCode}/ 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: 17

{
  "Required": true
}
true

Unassign price option from pricing configuration

delete
Path parameters
ProductCodestringRequired
PricingConfigurationCodestringRequired
PriceOptionCodestringRequired
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Responses
200

OK

application/json
booleanOptional
delete/products/{ProductCode}/pricingconfigurations/{PricingConfigurationCode}/priceoptions/{PriceOptionCode}/
DELETE /rest/6.0/products/{ProductCode}/pricingconfigurations/{PricingConfigurationCode}/priceoptions/{PriceOptionCode}/ HTTP/1.1
Host: api.2checkout.com
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Accept: application/json
true

Retrieve SKU code by details

get

Overview Retrieve a product's SKU code by details. At least one of the optional parameters should be provided, no matter which of them.

Path parameters
ProductCodestringRequired

Product code. Is used to build a link to product sku resource. This link is returned in request response. Is not used to identifie product sku.

CodestringRequired

Pricing configuration's code

Query parameters
CurrencystringOptional

SKU's currency code

PurchaseTypestringOptional

Type of purchase

PriceOptionsstringOptional

Price option codes, delimited by comma

QuantitynumberOptional

Quantity

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

Success

application/json
get/products/{ProductCode}/pricingconfigurations/{Code}/sku/match/
GET /rest/6.0/products/{ProductCode}/pricingconfigurations/{Code}/sku/match/ HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
200

Success

{
  "Resource": "SKU",
  "Identifier": "FD98FDE"
}

Retrieve SKU details

get

Overview Retrieve a product's SKU details.

Path parameters
ProductCodestringRequired

Product code

PricingConfigurationCodestringRequired

Pricing configuration's code

SKUCodestringRequired

SKU's code

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

Success

application/json
get/products/{ProductCode}/pricingconfigurations/{PricingConfigurationCode}/sku/{SKUCode}/
GET /rest/6.0/products/{ProductCode}/pricingconfigurations/{PricingConfigurationCode}/sku/{SKUCode}/ HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
200

Success

{
  "PricingConfigurationCode": "DFERIRS",
  "ProductCode": "FESOWUE",
  "Currency": "RON",
  "PriceOptions": [
    "548AF4D024",
    "548AF4D025"
  ],
  "PurchaseType": "PRODUCT",
  "FromQuantity": 5,
  "ToQuantity": 15
}

Last updated

Was this helpful?