MageSmith
MutationPaymentServicesPaypal · Magento 2.4.9

createVaultCardSetupToken

createVaultCardSetupToken is a Magento 2 GraphQL mutation in the PaymentServicesPaypal module. Creates a vault card setup token. It returns CreateVaultCardSetupTokenOutput and requires an Authorization header (Bearer customer token).

Last verified: against Magento 2.4.9.

Returns

CreateVaultCardSetupTokenOutput

Resolver class

\Magento\PaymentServicesPaypalGraphQl\Model\Resolver\CreateVaultCardSetupToken

Arguments

Describe the variables needed to create a vault card setup 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

Content-Type
application/json
Store
default store view code; use 'default' for the single-store baseline
Authorization
Bearer <CUSTOMER_TOKEN> obtain from generateCustomerToken mutation

Query

mutation ($input: CreateVaultCardSetupTokenInput!) {
  createVaultCardSetupToken(input: $input) {
    setup_token
  }
}

Variables

{
  "input": {
    "setup_token": {
      "payment_source": {
        "card": {
          "billing_address": {
            "country_code": ""
          }
        }
      }
    }
  }
}

Every Magento dev tool, in one hosted workspace.

Free to sign up. Nothing to install. Drafts, audits, and projects saved across every tool.