Create a token to store payment details

post/storedPaymentMethods

Creates a token to store the shopper's payment details. This token can be used for the shopper's future payments.

Endpoint destination URL
https://checkout-test.adyen.com/v71/storedPaymentMethods
Click to copy

Header Parameters

Idempotency-Keystring

A unique identifier for the message with a maximum of 64 characters (we recommend a UUID).

Request Parameters

merchantAccountstringRequired

The merchant account identifier, with which you want to process the transaction.

paymentMethodobjectRequired

Contains the information required to store a payment method.

recurringProcessingModelstringRequired

Defines a recurring payment type. Required when creating a token to store payment details. Allowed values:

  • Subscription – A transaction for a fixed or variable amount, which follows a fixed schedule.
  • CardOnFile – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction.
  • UnscheduledCardOnFile – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount.
shopperEmailstring

The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks.

shopperIPstring

The IP address of a shopper.

shopperReferencestringRequired

A unique identifier for the shopper (for example, user ID or account ID).

Response parameters

After submitting a call, you receive a response message to inform you that your request was received and processed.

Depending on the HTTP status code of the response message, it is helpful to build some logic to handle any errors that a request or the system may return.

HTTP Responses

  • 201 - Created

    The request has been fulfilled and has resulted in one or more new resources being created.

    Show moreShow less