# 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":{}}}}}}}}
```

## POST /tokens/

> Create an EES token for placing orders using 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","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"}}}}}}
```

## GET /paymentmethods/IDEAL/issuerbanks/

> Retrieve the list of banks that support iDEAL

```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","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":{}}}}}}}}
```

## PUT /paymentmethods/PAYPAL\_EXPRESS/redirecturl/

> Retrieve PayPal Express redirect URL

```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","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":{}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.2checkout.com/api-reference/reference/payment-methods.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
