Specify a payment method
You can pass the parameters in the createPaymentSession (One-time Payments) API to specify the display of payment methods, the order of the payment method list, and the display of quick payments on Payment Element or Checkout Page (CKP).
Note: For Checkout Page (CKP), you can also specify payment methods on Antom Dashboard through Payments > Checkout page> Payment methods. If you pass parameters through the API, the API values take priority.
This feature offers you the following benefits:
- Filter local payment methods based on your business region.
- Sort your preferred payment methods.
- Display the mainstream quick payments, such as Alipay, Apple Pay, and Google Pay.
To specify the payment method, pass the following parameters in the availablePaymentMethod parameter of the createPaymentSession (One-time Payments) API:
Parameter name | Required | Description |
paymentMethodTypeList | No | List of payment methods available to the buyer. The list includes the following parameters:
|
The following is a sample code for specifying the payment method:
{ ...
"availablePaymentMethod": {
"paymentMethodTypeList": [
{
"paymentMethodType": "ALIPAY_CN",
"expressCheckout": true,
"paymentMethodOrder": "0"
},
{
"paymentMethodType": "TNG",
"expressCheckout": false,
"paymentMethodOrder": "1"
}
]
}
}