createVaultCardPaymentToken
createVaultCardPaymentToken is a Magento 2 GraphQL mutation in the PaymentServicesPaypal module. Creates a vault payment token. It returns CreateVaultCardPaymentTokenOutput and requires an Authorization header (Bearer customer token).
Last verified: against Magento 2.4.9.
Resolver class
\Magento\PaymentServicesPaypalGraphQl\Model\Resolver\CreateVaultCardPaymentToken
Arguments
Describe the variables needed to create a vault card payment token
Example request
Auto-generated from the SDL — paste-ready against your store's /graphql endpoint. Replace the host, store code, and any required values before running.
Headers
Query
mutation ($input: CreateVaultCardPaymentTokenInput!) {
createVaultCardPaymentToken(input: $input) {
vault_token_id
payment_source {
card {
brand
last_digits
expiry
}
}
}
}Variables
{
"input": {
"setup_token_id": ""
}
}Related in PaymentServicesPaypalGraphQl
Other fields shipped by the same module.
addProductsToNewCart
Creates a new cart and add any type of product to it
PaymentServicesPaypal · returns AddProductsToNewCartOutput
completeOrder
Synchronizes order details and place the order
PaymentServicesPaypal · returns PlaceOrderOutput
createPaymentOrder
Creates a payment order for further payment processing
PaymentServicesPaypal · returns CreatePaymentOrderOutput
createVaultCardSetupToken
Creates a vault card setup token
PaymentServicesPaypal · returns CreateVaultCardSetupTokenOutput
getPaymentConfig
Retrieves the payment configuration for a given location
PaymentServicesPaypal · returns PaymentConfigOutput
getPaymentOrder
Retrieves the payment details for the order
PaymentServicesPaypal · returns PaymentOrderOutput
Every Magento dev tool, in one hosted workspace.
Free to sign up. Nothing to install. Drafts, audits, and projects saved across every tool.