How to enable
When the buyer initiates a payment using a stored card, you need to set availablePaymentMethod.paymentMethodMetaData.isCardOnFile to true in the createPaymentSession (One-time Payments) API to identify the transaction as a stored card payment.
The following is a sample code for initiating a subsequent transaction where the card information is stored by Antom, and the cardToken information provided by Antom is used:
{
...
"availablePaymentMethod": {
"paymentMethodMetaData": {
"isCardOnFile": true
}
},
"savedPaymentMethods": [
{
"paymentMethodType": "CARD",
"paymentMethodId": "ALIPAYEfG2DFbGx2Eh739qU+VMnCPEe7MfRKfMfC5k7k/IFASWpAh/vCxHV3dPYpbkGz1iyWCloE4MwfmN48sP8+rSPQ=="
}
]
...
}
How to enable
When the buyer initiates a payment using a stored card, you need to set paymentMethod.paymentMethodMetaData.isCardOnFile to true in the pay (One-time Payments) API to identify the transaction as a stored card payment.
The following is a sample code for initiating a subsequent transaction where the card information is stored by Antom, and the cardToken information provided by Antom is used:
"paymentMethod":
{
"paymentMethodMetaData":
{
"isCardOnFile": true
},
"paymentMethodType": "CARD",
"paymentMethodId": "ALIPAYgzViZ*********RWZIU31kU+2avs5dAgkzss/NrTymfnc/0+xI0ssHmyU3VyWCloE4MwfmN48sP1+rSPQ=="
}
How to enable
When the buyer initiates a payment using a stored card, you need to set paymentMethod.paymentMethodMetaData.isCardOnFile to true in the pay (One-time Payments) API to identify the transaction as a stored card payment.
Antom stores card information Recommended
It is recommended that you let Antom store the card information on your behalf, and use the cardToken information provided by Antom to initiate subsequent transactions. Data shows that using card information stored by Antom and initiating subsequent transactions with a token results in a significantly higher success rate compared to storing card information yourself.
The following is a sample code for initiating a subsequent transaction using the cardToken information provided by Antom:
"paymentMethod":
{
"paymentMethodMetaData":
{
"isCardOnFile": true
},
"paymentMethodType": "CARD",
"paymentMethodId": "AL****************PQ=="
}
Manually store card information
If you choose to store the card information yourself, you need to specify the cardNo, expiryYear, expiryMonth, cardholderName, and isCardOnFile parameters in subsequent transactions. Note that cvv is not required in subsequent transactions.
The following is a sample code for initiating a subsequent transaction using the card information stored by yourself:
"paymentMethod":
{
"paymentMethodMetaData":
{
"cardholderName":
{
"firstName": "Tom",
"lastName": "Jerry"
},
"expiryMonth": "11",
"expiryYear": "28",
"cardNo": "41************54",
"isCardOnFile": true
},
"paymentMethodType": "CARD"
},
How to enable
When the buyer initiates a payment using a stored card, you need to set availablePaymentMethod.paymentMethodMetaData.isCardOnFile to true in the createPaymentSession (One-time Payments) API to identify the transaction as a stored card payment.
The following is a sample code for initiating a subsequent transaction where the card information is stored by Antom, and the cardToken information provided by Antom is used:
{
...
"availablePaymentMethod": {
"paymentMethodMetaData": {
"isCardOnFile": true
}
},
"savedPaymentMethods": [
{
"paymentMethodType": "CARD",
"paymentMethodId": "ALIPAYEfG2DFbGx2Eh739qU+VMnCPEe7MfRKfMfC5k7k/IFASWpAh/vCxHV3dPYpbkGz1iyWCloE4MwfmN48sP8+rSPQ=="
}
]
...
}