---
title: "Create a token to store payment details"
method: POST
path: "/storedPaymentMethods"
tags: ["Recurring"]
---

# 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.

## Headers

- `Idempotency-Key` string

## Request body

- StoredPaymentMethodRequest
  - `merchantAccount` string, required — The merchant account identifier, with which you want to process the transaction.
  - `paymentMethod` PaymentMethodToStore, required
    - `brand` string — Secondary brand of the card. For example: **plastix**, **hmclub**.
    - `cvc` string — The card verification code. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
    - `encryptedCard` string — The encrypted card.
    - `encryptedCardNumber` string — The encrypted card number.
    - `encryptedExpiryMonth` string — The encrypted card expiry month.
    - `encryptedExpiryYear` string — The encrypted card expiry year.
    - `encryptedSecurityCode` string — The encrypted card verification code.
    - `expiryMonth` string — The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
    - `expiryYear` string — The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
    - `holderName` string — The name of the card holder.
    - `number` string — The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
    - `type` string — Set to **scheme**.
  - `recurringProcessingModel` 'CardOnFile' | 'Subscription' | 'UnscheduledCardOnFile', required — 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.
  - `shopperEmail` string — The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks.
  - `shopperIP` string — The IP address of a shopper.
  - `shopperReference` string, required — A unique identifier for the shopper (for example, user ID or account ID).

## Response `201`

Created - the request has been fulfilled and has resulted in one or more new resources being created.

- StoredPaymentMethodResource
  - `alias` string — The alias of the credit card number. Applies only to recurring contracts storing credit card details
  - `aliasType` string — The alias type of the credit card number. Applies only to recurring contracts storing credit card details.
  - `brand` string — The brand of the card.
  - `cardBin` string — The bank identification number (BIN) of the card.
  - `expiryMonth` string — The month the card expires.
  - `expiryYear` string — The last two digits of the year the card expires. For example, **22** for the year 2022.
  - `externalResponseCode` string — The response code returned by an external system (for example after a provisioning operation).
  - `externalTokenReference` string — The token reference of a linked token in an external system (for example a network token reference).
  - `holderName` string — The unique payment method code.
  - `iban` string — The IBAN of the bank account.
  - `id` string — A unique identifier of this stored payment method.
  - `issuerName` string — The name of the issuer of token or card.
  - `lastFour` string — The last four digits of the PAN.
  - `name` string — The display name of the stored payment method.
  - `networkTxReference` string — Returned in the response if you are not tokenizing with Adyen and are using the Merchant-initiated transactions (MIT) framework from Mastercard or Visa. This contains either the Mastercard Trace ID or the Visa Transaction ID.
  - `ownerName` string — The name of the bank account holder.
  - `shopperEmail` string — The shopper’s email address.
  - `shopperReference` string — Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address.
  - `supportedRecurringProcessingModels` string[] — Defines a recurring payment type. 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.
  - `type` string — The type of payment method.

---

[API](https://skmtc.net/adyen/apis/checkoutservice.md) · [All operations](https://skmtc.net/adyen/apis/checkoutservice/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/adyen/checkoutservice/revisions/a2d1f411288c/schema)
