Save a shopper's payment method with Adyen.
Tokens are created as a result of submitting a payment request that successfully authorizes. This ensures that the payment details correspond to an active account and are chargeable.
For card payments, you have the choice to submit the payment with an amount of 0 (zero-value authorization). The card details will be validated but the shopper's account will not show a charge.
When tokenizing a shopper's payment method, you will need to include a unique id for the shopper, called a
shopperReference. This id is provided by you and acts as the container for that shopper's tokenized payment methods. All tokens are stored underneath a shopper. The
shopperReference will be stored upon the first successful token creation.
You can store maximum 50 payment details associated with the same
The tokenized payment detail is called a
recurringDetailReference. You will use both the
shopperReference and the associated
recurringDetailReference in order to make future payments.
Tokenize with an authorization
Make a normal
/paymentsrequest and include the following values:
shopperReference: your unique id for the shopper.
Specifying an amount of 0 will ensure the card information is validated but a charge isn't made on this card.
If the payment is successful, the
resultCodewill be Authorised, the payment detail will be tokenized, and a
recurringDetailReferencewill be returned in the response.
recurringDetailReferenceis not returned synchronously by default. Reach out to Support Team to enable synchronous tokens.
recurringDetailReference. You will use the
recurringDetailReferenceand the originally provided
shopperReferenceto make future payments.
Pending and Refusal result codes
For some payment methods, you might not receive an Authorised immediately and instead receive a Pending status. In these cases, the payment details have not yet been tokenized. Instead, they will be tokenized once the payment as reached the Authorised status. You will receive this updated status via a webhook from our Notification service.
If you receive a
resultCode with Refused, then the details were not tokenized and you need to submit another payment request in order to try tokenizing again.
Make a payment
Use tokenized payment information for recurring and subscription payments.
Retrieve, update, and disable tokens you stored with Adyen.