> 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/payment-methods.md).

# Payment Methods

## Retrieve installment settings used to place orders with installments

> Retrieve information about the number of installments available for a specific selection of products or services.\
> \
> \
> Once the installment information is retrieved, it can be used in the POST call on the order resource to place an order with a installments

```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/installments/":{"get":{"tags":["Payment methods"],"summary":"Retrieve installment settings used to place orders with installments","description":"Retrieve information about the number of installments available for a specific selection of products or services.\n\n\nOnce the installment information is retrieved, it can be used in the POST call on the order resource to place an order with a installments","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"}},{"schema":{"type":"number"},"in":"query","name":"Amount","description":"Amount","required":true},{"schema":{"type":"string"},"in":"query","name":"Country","description":"2 letters country code","required":true},{"schema":{"type":"string"},"in":"query","name":"Currency","description":"3 letters currency code","required":true},{"schema":{"type":"string"},"in":"query","name":"FiscalCode","description":"Fiscal code. Required for Brasil or if CardBin or EesToken is not provided"},{"schema":{"type":"string"},"in":"query","name":"CardBin","description":"Card number. Required if Fiscal code or EesToken is not provided"},{"schema":{"type":"string"},"in":"query","name":"EesToken","description":"Ees token.  Required if Fiscal code or CardBin is not provided"}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"500":{"description":"ERROR","content":{"application/json":{}}}}}}}}
```

## Create an EES token for placing orders using 2pay.js

> Use this endpoint to be able to place orders with credit cards with installments and 2Pay.js.

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/tokens/":{"post":{"tags":["Payment methods"],"summary":"Create an EES token for placing orders using 2pay.js","description":"Use this endpoint to be able to place orders with credit cards with installments and 2Pay.js.","parameters":[{"name":"X-Avangate-Authentication","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEesToken"}}}},"responses":{"200":{"description":"Create token response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEesTokenResponse"}}}}}}}},"components":{"schemas":{"CreateEesToken":{"type":"object","required":["CreditCard","Cvv","ExpirationDate"],"properties":{"Name":{"type":"string","description":"Name of the cardholder"},"CreditCard":{"type":"string","description":"Credit card number"},"Cvv":{"type":"string"},"ExpirationDate":{"type":"string"},"Scope":{"type":"string","description":"Represents the scope of the created token. It is the client's responsability to manage this","default":"ordering","enum":["ordering","storage","subscription"]}}},"CreateEesTokenResponse":{"type":"object","required":["Results"],"properties":{"Results":{"type":"object","required":["Token"],"properties":{"Token":{"type":"string"}}}}}}}}
```

## POST /payments/startapplepaysession/

> Initiate an ApplePay session

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/payments/startapplepaysession/":{"post":{"tags":["Payment methods"],"summary":"Initiate an ApplePay session","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_24"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/applePaySession200"}}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/applePaySession400"}}}}}}}},"components":{"schemas":{"body_24":{"type":"object","properties":{"validationURL":{"type":"string"}}},"applePaySession200":{"type":"object","properties":{"ApplePaySessionData":{"type":"object","properties":{"response":{"type":"string"},"errors":{"type":"array","items":{"type":"string"}}}}}},"applePaySession400":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## POST /payments/decryptApplePayData/

> Decrypt the ApplePay data

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/payments/decryptApplePayData/":{"post":{"tags":["Payment methods"],"summary":"Decrypt the ApplePay data","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_25"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/decryptApplePayData200"}}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/decryptApplePayData400"}}}}}}}},"components":{"schemas":{"body_25":{"type":"object","properties":{"ApplePayData":{"type":"string"}}},"decryptApplePayData200":{"type":"object","properties":{"ApplePayDataToken":{"type":"string"},"BillingDetails":{"type":"object"},"DeliveryDetails":{"type":"object"},"Status":{"type":"boolean"}}},"decryptApplePayData400":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Retrieve the list of banks that support iDEAL

> Use this endpoint for retrieving information on the 2Checkout list of banks that support iDEAL payments.

```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/IDEAL/issuerbanks/":{"get":{"tags":["Payment methods"],"summary":"Retrieve the list of banks that support iDEAL","description":"Use this endpoint for retrieving information on the 2Checkout list of banks that support iDEAL payments.","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"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}}}}}}}
```

## Retrieve PayPal Express redirect URL

> Use this endpoint to retrieve the RedirectURL by sending an Order object with PAYPAL\_EXPRESS 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":{"/paymentmethods/PAYPAL_EXPRESS/redirecturl/":{"put":{"tags":["Payment methods"],"summary":"Retrieve PayPal Express redirect URL","description":"Use this endpoint to retrieve the RedirectURL by sending an Order object with PAYPAL_EXPRESS payment method.","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_4"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{}}}}}}},"components":{"schemas":{"body_4":{"type":"object","properties":{"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/paymentmethodsPAYPAL_EXPRESSredirecturl_PaymentDetails"}}},"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"]}}},"paymentmethodsPAYPAL_EXPRESSredirecturl_PaymentDetails":{"type":"object","properties":{"Currency":{"type":"string"},"PaymentMethod":{"$ref":"#/components/schemas/paymentmethodsPAYPAL_EXPRESSredirecturl_PaymentDetails_PaymentMethod"},"Type":{"type":"string"}}},"paymentmethodsPAYPAL_EXPRESSredirecturl_PaymentDetails_PaymentMethod":{"type":"object","properties":{"Email":{"type":"string"},"ReturnURL":{"type":"string"}}}}}}
```

## Validate previous order as payment reference

> 2Checkout supports 1-click purchases for returning customers who paid for their previous orders with credit card, Paypal or iDeal.\
> \
> Once a order reference has been validated, it can be used in the POST call on an order to place an order with a previous order reference.

```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/PREVIOUS_ORDER/refno/{OrderReference}/":{"get":{"tags":["Payment methods"],"summary":"Validate previous order as payment reference","description":"2Checkout supports 1-click purchases for returning customers who paid for their previous orders with credit card, Paypal or iDeal.\n\nOnce a order reference has been validated, it can be used in the POST call on an order to place an order with a previous order reference.","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":"OrderReference","in":"path","description":"Reference number for approved/paid orders.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}}}}}}}
```

## Retrieve UniTokens list

> Returns a paginated list of UniTokens associated with a customer.\
> At least one of \`CustomerReference\` or \`ExternalCustomerReference\` must be provided.\
> If both are provided, they must belong to the same customer record.\
> Requires the UNITOKEN feature to be enabled for the account.\
> \
> UniTokens are created and updated automatically. When an order is placed and authorized with a card that matches an existing UniToken for the same customer (same first 4 and last 4 card digits), that UniToken is updated with the new order reference instead of a new one being created. See the \`POST /orders/\` (place order) documentation for details.<br>

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/unitokens/":{"get":{"tags":["Payment methods"],"summary":"Retrieve UniTokens list","description":"Returns a paginated list of UniTokens associated with a customer.\nAt least one of `CustomerReference` or `ExternalCustomerReference` must be provided.\nIf both are provided, they must belong to the same customer record.\nRequires the UNITOKEN feature to be enabled for the account.\n\nUniTokens are created and updated automatically. When an order is placed and authorized with a card that matches an existing UniToken for the same customer (same first 4 and last 4 card digits), that UniToken is updated with the new order reference instead of a new one being created. See the `POST /orders/` (place order) documentation for details.\n","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":"CustomerReference","in":"query","description":"The 2Checkout internal customer ID (AVANGATE_CUSTOMER_ID). At least one of CustomerReference or ExternalCustomerReference must be provided.","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"ExternalCustomerReference","in":"query","description":"The external customer ID set by the merchant (EXTERNAL_CUSTOMER_ID). At least one of CustomerReference or ExternalCustomerReference must be provided.","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"Page","in":"query","description":"Page number for pagination. Default value is 1.","required":false,"style":"form","explode":true,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"Limit","in":"query","description":"Number of results per page. Default value is 100. Maximum value is 1000.","required":false,"style":"form","explode":true,"schema":{"type":"integer","minimum":1,"maximum":1000,"default":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"UniTokens":{"type":"array","description":"List of UniToken records for the customer.","items":{"type":"object","properties":{"UniToken":{"type":"string","description":"The UUID identifying this token."},"PaymentType":{"type":"string","description":"The payment method used for the order (e.g. CC, GOOGLEPAY, PAYPAL)."},"CardBrand":{"type":"string","nullable":true,"description":"The card brand. Null for non-card payment methods."},"CardFirst4Digits":{"type":"string","nullable":true,"description":"The first 4 digits of the card. Null for non-card payment methods."},"CardLast4Digits":{"type":"string","nullable":true,"description":"The last 4 digits of the card. Null for non-card payment methods."}}}},"Pagination":{"type":"object","properties":{"Page":{"type":"integer","description":"Current page number."},"Limit":{"type":"integer","description":"Number of results per page."},"Count":{"type":"integer","description":"Total number of UniTokens matching the criteria."}}}}}}}},"400":{"description":"Bad request - validation error or missing required parameters","content":{"application/json":{"schema":{"type":"object","properties":{"error_code":{"type":"string","description":"Error code identifying the specific validation failure.","enum":["UNITOKEN_FEATURE_NOT_ENABLED","CUSTOMER_REFERENCE_REQUIRED","CUSTOMER_REFERENCE_MISMATCH","UNITOKEN_VALIDATION_ERROR"]},"message":{"type":"string","description":"Detailed error message."}}}}}}}}}}}
```


---

# 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/payment-methods.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.
