Edit in GitHubLog an issue

createVaultCardPaymentToken mutation

The createVaultCardPaymentToken mutation creates a permanent vault_token_id and associates an optional card description, visible in the storefront.

To run the createVaultCardPaymentToken mutation, you need the setup_token generated with the createVaultCardSetupToken mutation.

Syntax

Copied to your clipboard
mutation {
createVaultCardPaymentToken(
input: CreateVaultCardPaymentTokenInput!
) CreateVaultCardPaymentTokenOutput
}

Example usage

The following example runs the createVaultCardPaymentToken mutation to create a permanent vault_token_id for the given payment method.

Request

Copied to your clipboard
mutation {
createVaultCardPaymentToken(
input: {
setup_token_id: "23N11484TX9371211"
card_description: "My New Card"
}
) {
vault_token_id
payment_source {
card {
brand
last_digits
expiry
}
}
}
}

Response

Copied to your clipboard
{
"data": {
"createVaultCardPaymentToken": {
"vault_token_id": "745bf41a-4196-41a6-a17a-0234f89118fc",
"payment_source": {
"card": {
"brand": "VISA",
"last_digits": "0004",
"expiry": "2027-02"
}
}
}
}
}

Input attributes

The CreateVaultCardPaymentTokenInput object contains the following input attributes:

AttributeData TypeDescription
setup_token_id
String!
The setup_token obtained with the createVaultCardSetupToken mutation
card_description
String
The description of the vaulted card

Output attributes

The CreateVaultCardPaymentTokenOutput object contains the following attributes:

AttributeData TypeDescription
vault_token_id
String!
The vault payment token information
payment_source
PaymentSourceOutput!
The payment source information

PaymentSourceOutput attributes

The PaymentSourceOutput object describes the payment source information. It contains the following attribute:

AttributeData TypeDescription
card
CardPaymentSourceOutput!
The card payment source information.

CardPaymentSourceOutput object

The CardPaymentSourceOutput object describes the card payment source information

AttributeData TypeDescription
brand
String
The brand of the card
last_digits
String
Last digits of the card
expiry
String
The expiry date of the card
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2025 Adobe. All rights reserved.