Skip to content
gist.link ↗

removePaymentMethod

Mutation Pay API — POST https://pay.api.gist.link/graphql

Detach a vaulted method at the PSP (best-effort) and delete the local token. ROLE_ADMIN, ROLE_PAY_MANAGER or ROLE_SERVICE.

pay:mutation:removePaymentMethod

The calling IAM key must hold this permission (or a wildcard that covers it: pay:mutation:* or pay:*) and the access token must have been minted with audience=pay. See Permissions.

type Mutation {
removePaymentMethod(customerId: String!, id: String!): PaymentMethodToken!
}
Argument Type Required Description
customerId String! Yes —
id String! Yes —

PaymentMethodToken! — see the Pay types reference.

Terminal window
curl https://pay.api.gist.link/graphql \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d @- <<'JSON'
{
"query": "mutation RemovePaymentMethod($customerId: String!, $id: String!) { removePaymentMethod(customerId: $customerId, id: $id) { id uuid type created_at } }",
"variables": {
"customerId": "example",
"id": "example"
}
}
JSON