Requirements
Before you begin, take into account the following requirements, limitations, and preparations.How it works
After you have created tokens, you can use the Checkout API to:- Get a list of the shopper’s stored payment details.
- Update stored payment details.
- Delete stored payment details.
List stored payment details
To see all the payment details stored for a shopper, make a GET /storedPaymentMethods request including the following query parameters:
Example request to get a list stored payment details
Example response with stored payment details
Update stored details
Only applicable for tokens for stored withrecurringProcessingModel: CardOnFile.On Checkout API v70 and later, updating stored details with an API request requires additional configuration on our side. Reach out to our Support Team to discuss your eligibility. You can update the following fields without changing the storedPaymentMethodId of the stored payment details:
If the shopper has a new card number, make a /payments request to store new payment details and receive a new identifier.
To update the
expiryMonth, expiryYear, holderName, or billingAddress, make a /payments request including:
Also include at least one of the fields you want to update:
For example, to update the cardholder name, make a /payments request including the required fields and
paymentMethod.holderName:
Example of a request to update the cardholder name
Updates from card networks
Card networks (for example, Visa and Mastercard) also send updates to your shopper’s payment details. The way these updates are handled depends on the Account Updater service you use.- If you are using our Real Time Account Updater, you do not have to do anything to handle the updates from the card networks. The card details are automatically updated, and the token remains unchanged.
- If you are using our Batch Account Updater, then you will receive the updated card details in a batch result file. You then need to make a zero-value transaction with the updated card details.
Delete stored payment details
You can delete a single token by its identifier, which is returned when you create a token. Alternatively, to find all tokens for a given shopper, you can list stored payment details and get theid from the relevant item in the storedPaymentMethods array.
To delete the token, make a DELETE /storedPaymentMethods/{storedPaymentMethodId} request including the following parameters:
Example request to delete a token
Receive token lifecycle webhooks
While you manage tokens, you can stay informed of status changes to your tokens with the Tokenization webhooks. Enable the Recurring tokens life cycle events webhooks in your Customer Area to receive these webhooks. This webhook includes:-
data.storedPaymentMethodId: the ID of the token that was created, updated, or disabled. -
data.shopperReference:: Your unique shopper reference. Use this to associate the shopper with the token. -
eventId: ThepspReferencefor the payment made to store the shopper’s payment details. -
type: the type of webhook. The table below lists the possible values.