> For the complete documentation index, see [llms.txt](https://docs.2checkout.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.2checkout.com/api-reference/reference/cart-settings.md).

# Cart Settings

## Retrieve session content

> Use this endpoint to get info on all the products added to cart by the shopper in the current session. Products added in cart can be either defined in your catalog, or created with dynamic information. Use this endpoint to calculate the tax charge based on current session contents.

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/orders/0/":{"put":{"tags":["Cart settings"],"summary":"Retrieve session content","description":"Use this endpoint to get info on all the products added to cart by the shopper in the current session. Products added in cart can be either defined in your catalog, or created with dynamic information. Use this endpoint to calculate the tax charge based on current session contents.","parameters":[{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","enum":["application/json"]}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body_1"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{}}}}}}},"components":{"schemas":{"body_1":{"type":"object","properties":{"BillingDetails":{"$ref":"#/components/schemas/orders0_BillingDetails"},"Affiliate":{"$ref":"#/components/schemas/orders0_Affiliate"},"ExternalCustomerReference":{"type":"string"},"CustomerReference":{"type":"string"},"Country":{"type":"string"},"Currency":{"type":"string"},"CustomerIP":{"type":"string"},"Items":{"type":"array","items":{"$ref":"#/components/schemas/orders0_Items"}},"Language":{"type":"string"},"PaymentDetails":{"$ref":"#/components/schemas/orders0_PaymentDetails"},"Source":{"type":"string"}}},"orders0_BillingDetails":{"type":"object","properties":{"Address1":{"type":"string"},"City":{"type":"string"},"CountryCode":{"type":"string"},"Email":{"type":"string"},"FirstName":{"type":"string"},"FiscalCode":{"type":"string"},"LastName":{"type":"string"},"Phone":{"type":"string"},"State":{"type":"string"},"Zip":{"type":"string"}}},"orders0_Affiliate":{"type":"object","properties":{"AffiliateCode":{"type":"string","description":"The affiliate unique code (as returned by the affiliates API methods)."},"AffiliateSource":{"type":"string"}}},"orders0_Items":{"type":"object","properties":{"Code":{"type":"string"},"Quantity":{"type":"string"},"CrossSell":{"$ref":"#/components/schemas/orders0_CrossSellCampaign"},"SubscriptionCustomSetting":{"$ref":"#/components/schemas/Item_SubscriptionCustomSettings"}}},"orders0_CrossSellCampaign":{"required":["ParentCode","CampaignCode"],"type":"object","properties":{"ParentCode":{"type":"string"},"CampaignCode":{"type":"string"}}},"Item_SubscriptionCustomSettings":{"type":"object","required":["CycleUnit","CycleLength","CycleAmount","CycleAmountType"],"properties":{"CycleLength":{"type":"integer","nullable":true,"minimum":1},"CycleUnit":{"type":"string","enum":["DAY","MONTH"],"nullable":true},"CycleAmount":{"type":"number","format":"float","minimum":0,"exclusiveMinimum":true},"CycleAmountType":{"type":"string","enum":["NET","GROSS"]}}},"orders0_PaymentDetails":{"type":"object","properties":{"Currency":{"type":"string"},"CustomerIP":{"type":"string"},"PaymentMethod":{"$ref":"#/components/schemas/orders0_PaymentDetails_PaymentMethod"},"Type":{"type":"string"}}},"orders0_PaymentDetails_PaymentMethod":{"type":"object","properties":{"CCID":{"type":"string"},"CardNumber":{"type":"string"},"CardNumberTime":{"type":"string"},"CardType":{"type":"string"},"ExpirationMonth":{"type":"string"},"ExpirationYear":{"type":"string"},"HolderName":{"type":"string"},"HolderNameTime":{"type":"string"},"RecurringEnabled":{"type":"boolean"}}}}}}
```

## Retrieve price information using a multitude of filters

> Use this endpoint to retrieve product prices based on geolocation. To display product prices on your website without having the geolocation feature, you can use this endpoint. Use this endpoint to extract cost information for a product/subscription plan, based on a specific list of options.

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/orders/0/price/":{"put":{"tags":["Cart settings"],"summary":"Retrieve price information using a multitude of filters","description":"Use this endpoint to retrieve product prices based on geolocation. To display product prices on your website without having the geolocation feature, you can use this endpoint. Use this endpoint to extract cost information for a product/subscription plan, based on a specific list of options.","parameters":[{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","enum":["application/json"]}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPrice"}}}},"responses":{"201":{"description":"Successful request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPriceResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPriceError"}}}}}}}},"components":{"schemas":{"GetPrice":{"required":["Currency","Item"],"type":"object","properties":{"Item":{"$ref":"#/components/schemas/GetPrice_Item"},"BillingDetails":{"$ref":"#/components/schemas/GetPrice_BillingDetails"},"Currency":{"type":"string"},"CouponCode":{"type":"string","description":"Promotion coupon/voucher."},"PayType":{"type":"string","description":"The payment method:\n- CC (credit/debit card - including local Brazilian cards).\n- ENCRYPTED_PAYMENT_DATA (client-side encryption)\n- PAYPAL\n- PAYPAL_EXPRESS\n- TEST (for test orders).\n- PREVIOUS_ORDER\n- EXISTING_PAYMENT_DATA (use a card one of your customers already used to purchase from your account).\n- WIRE – the placeOrder response includes Wire payment details.\n- CHECK – the placeOrder response includes\n\nCheck payment details.\n- PURCHASEORDER - use for orders with POs.\n- FREE – for 0 value orders for which youʼre not requiring customers to provide payment details.","enum":["CC","ENCRYPTED_PAYMENT_DATA","PAYPAL","PAYPAL_EXPRESS","TEST","PREVIOUS_ORDER","EXISTING_PAYMENT_DATA","WIRE","CHECK","PURCHASEORDER","FREE"]}}},"GetPrice_Item":{"required":["Code","Quantity"],"type":"object","properties":{"Code":{"type":"string","description":"Unique product identifier you control. Max length 256 characters."},"Quantity":{"type":"string","description":"Number of units."},"PriceOptions":{"type":"array","description":"Array of price option groups.","items":{}}}},"GetPrice_BillingDetails":{"type":"object","properties":{"Address1":{"type":"string"},"Address2":{"type":"string"},"City":{"type":"string"},"State":{"type":"string"},"CountryCode":{"type":"string"},"Email":{"type":"string"},"FirstName":{"type":"string"},"LastName":{"type":"string"},"Zip":{"type":"string"},"Phone":{"type":"string"},"Company":{"type":"string"},"FiscalCode":{"type":"string"}}},"GetPriceResponse":{"type":"object","properties":{"ItemPrice":{"type":"object"},"UnitNetPrice":{"type":"number"},"UnitGrossPrice":{"type":"number"},"UnitVAT":{"type":"integer"},"UnitDiscount":{"type":"integer"},"UnitNetDiscountedPrice":{"type":"number"},"UnitGrossDiscountedPrice":{"type":"number"},"UnitAffiliateCommission":{"type":"integer"},"VATPercent":{"type":"integer"},"HandlingFeeNetPrice":{"type":"integer"},"HandlingFeeGrossPrice":{"type":"integer"},"AffiliateCommission":{"type":"number"},"Currency":{"type":"string"},"Discount":{"type":"number"},"GrossDiscountedPrice":{"type":"number"},"GrossPrice":{"type":"number"},"NetDiscountedPrice":{"type":"number"},"NetPrice":{"type":"number"},"VAT":{"type":"number"}}},"GetPriceError":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Get the list of payment methods available for your shoppers.

> 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.

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/paymentmethods/":{"get":{"tags":["Cart settings"],"summary":"Get the list of payment methods available for your shoppers.","description":"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.","parameters":[{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","default":"application/json","enum":["application/json"]}},{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"CountryCode","in":"query","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"PaymentMethod","in":"query","required":false,"style":"form","explode":true,"schema":{"type":"string","enum":["CC","WIRE","PAYPAL","PURCHASEORDER","CHECK","DIRECT_EBANKING","FREE","ALIPAY","DIRECTDEBIT","GIROPAY","IDEAL","WEBMONEY","BOLETO","UNIONPAY","WE_CHAT_PAY","APPLE_PAY","GOOGLEPAY"]}}],"responses":{"200":{"description":"Returns a payment methods collection","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAvailablePaymentMethodsResponse"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"GetAvailablePaymentMethodsResponse":{"type":"array","items":{"type":"object","properties":{"Currencies":{"type":"array","items":{"type":"string","description":"ISO 3-Letter Currency Code"}},"Countries":{"type":"array","items":{"type":"string","description":"ISO 2-Letter Country Code"}},"BusinessCompany":{"type":"string"},"HasRenewal":{"type":"boolean"},"PaymentType":{"type":"string"},"PaymentMethod":{"type":"string"},"AutofillSettings":{"$ref":"#/components/schemas/GetAvailablePaymentMethodsResponse_AutofillSettings"},"SupportsTrial":{"type":"boolean"}}}},"GetAvailablePaymentMethodsResponse_AutofillSettings":{"type":"array","items":{"type":"object","properties":{"Name":{"type":"string"},"Value":{"type":"string"}}}},"ErrorResponse":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Get the list of available currencies

> 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.

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/currencies/":{"get":{"tags":["Cart settings"],"summary":"Get the list of available currencies","description":"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.","parameters":[{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","default":"application/json","enum":["application/json"]}},{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"CountryCode","in":"query","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"PaymentMethod","in":"query","required":false,"style":"form","explode":true,"schema":{"type":"string","enum":["CC","WIRE","PAYPAL","PURCHASEORDER","CHECK","DIRECT_EBANKING","FREE","ALIPAY","DIRECTDEBIT","GIROPAY","IDEAL","WEBMONEY","BOLETO","UNIONPAY","WE_CHAT_PAY","APPLE_PAY","GOOGLEPAY"]}}],"responses":{"200":{"description":"Returns currencies collection","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAvailableCurrenciesResponse"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"GetAvailableCurrenciesResponse":{"type":"array","items":{"type":"object","properties":{"Code":{"type":"string"},"ISO3DigitCode":{"type":"integer"},"Label":{"type":"string"},"Symbol":{"type":"string"},"SymbolPosition":{"type":"string"},"DecimalSeparator":{"type":"string"},"UnitSeparator":{"type":"string"},"Decimals":{"type":"integer"}}}},"ErrorResponse":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Get the list of available countries

> 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.

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/countries/":{"get":{"tags":["Cart settings"],"summary":"Get the list of available countries","description":"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.","parameters":[{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","default":"application/json","enum":["application/json"]}},{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"language","in":"query","required":false,"style":"form","explode":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns countries collection","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAvailableCountriesResponse"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"GetAvailableCountriesResponse":{"type":"array","items":{"type":"object","properties":{"Code":{"type":"string"},"Label":{"type":"string"}}}},"ErrorResponse":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## GET /countries/{countryCode}/states/

> Get the list of states for a specific country

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/countries/{countryCode}/states/":{"get":{"tags":["Cart settings"],"summary":"Get the list of states for a specific country","parameters":[{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","default":"application/json","enum":["application/json"]}},{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"countryCode","in":"path","description":"Country code","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns states collection","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCountryStatesResponse"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"GetCountryStatesResponse":{"type":"array","items":{"type":"object","properties":{"Name":{"type":"string"},"Code":{"type":"string"}}}},"ErrorResponse":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.2checkout.com/api-reference/reference/cart-settings.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
