Payment methods

Retrieve installment settings used to place orders with installments

get

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

Query parameters
AmountnumberRequired

Amount

CountrystringRequired

2 letters country code

CurrencystringRequired

3 letters currency code

FiscalCodestringOptional

Fiscal code. Required for Brasil or if CardBin or EesToken is not provided

CardBinstringOptional

Card number. Required if Fiscal code or EesToken is not provided

EesTokenstringOptional

Ees token. Required if Fiscal code or CardBin is not provided

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
/orders/0/installments

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

post
Header parameters
X-Avangate-AuthenticationstringRequiredExample: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
AcceptstringRequiredExample: application/json
Body
NamestringOptional

Name of the cardholder

Example: John Doe
CreditCardstringRequired

Credit card number

Example: 4111111111111111
CvvstringRequiredExample: 123
ExpirationDatestringRequiredExample: 12/28
Scopestring · enumOptional

Represents the scope of the created token. It is the client's responsability to manage this

Default: orderingExample: subscriptionPossible values:
Responses
200

Create token response

application/json
post
/tokens
200

Create token response

Initiate an ApplePay session

post
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

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

OK

application/json
post
/payments/startapplepaysession

Decrypt the ApplePay data

post
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

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

OK

application/json
ApplePayDataTokenstringOptional
BillingDetailsobjectOptional
DeliveryDetailsobjectOptional
StatusbooleanOptional
post
/payments/decryptApplePayData

Retrieve the list of banks that support iDEAL

get
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
/paymentmethods/IDEAL/issuerbanks
200

OK

Retrieve PayPal Express redirect URL

put
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

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

OK

application/json
put
/paymentmethods/PAYPAL_EXPRESS/redirecturl
200

OK

Validate previous order as payment reference

get

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.

Path parameters
OrderReferencestringRequired

Reference number for approved/paid orders.

Example: 1234567
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
/paymentmethods/PREVIOUS_ORDER/refno/{OrderReference}
200

OK

Last updated

Was this helpful?