MageSmith
MutationVault · Magento 2.4.9

deletePaymentToken

deletePaymentToken is a Magento 2 GraphQL mutation in the Vault module. phpcs:ignore Magento2.GraphQL.ValidArgumentName. It returns DeletePaymentTokenOutput and requires an Authorization header (Bearer customer token).

Last verified: against Magento 2.4.9.

Returns

DeletePaymentTokenOutput

Resolver class

\Magento\VaultGraphQl\Model\Resolver\DeletePaymentToken

Arguments

public_hash String! Required

The reusable payment token securely stored in the vault.

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 ($public_hash: String!) {
  deletePaymentToken(public_hash: $public_hash) {
    result
    customerPaymentTokens {
      items {
        public_hash
        payment_method_code
        type
        details
      }
    }
  }
}

Variables

{
  "public_hash": ""
}

Every Magento dev tool, in one hosted workspace.

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