Learn how to manage tokens you stored with Adyen.
Sometimes your users need to update the payment methods they saved with you or request you to remove a previously saved payment detail. We additionally provide a lookup mechanism to list what tokens exist under a shopper, as well as list which shoppers have a given payment detail.
Managing tokens entails:
List tokens by shopper
To list all tokens contained within a shopper, use our
Provide your merchant account and the
shopperReference of the shopper you want to list the tokens of.
The response will contain an array of the saved details, which includes the
recurringDetailReference that can be used with the
shopperReference of the request to make a payment.
Refer to our API Explorer for the full reference.
Update token details
Occasionally, a shopper's card information will get updated, such as a new expiration date, and you will want to be able to update the token to represent this new information.
/payments request to update the token. Instead of providing the full card information, provide the
paymentMethod.recurringDetailReference, and the updated expiration information.
An Authorised response means the card information will be updated. The token will stay the same and you can continue to use it for transactions.
Updated card from Account Updater
When using Account Updater to refresh card information, the card details will be updated but the token will always stay the same. This means you don't need to build any additional logic to take advantage of Account Updater with tokens.
Disable stored details
Shoppers sometimes request to remove a given saved payment detail or leave your platform, and you want to remove all details they have saved with you. Remove these saved details with the
To disable a single token, provide your
recurringDetailReference you want to remove.
To disable a shopper and all their saved details, provide your
merchantAccount and the
shopperReference you want to remove.
After disabling the details you stored with Adyen, make sure that you also delete the remaining shopper details, if any, from your servers.