Skip to content
gist.link ↗

completePaymentMethodSetup

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

Finish vaulting after the browser confirms the setup intent: verifies it succeeded at the PSP and persists the method as a PaymentMethodToken. Idempotent on the resulting PSP payment-method ref. ROLE_ADMIN, ROLE_PAY_MANAGER or ROLE_SERVICE.

pay:mutation:completePaymentMethodSetup

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 {
completePaymentMethodSetup(customerId: String!, setupRef: String!): PaymentMethodToken!
}
Argument Type Required Description
customerId String! Yes —
setupRef 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 CompletePaymentMethodSetup($customerId: String!, $setupRef: String!) { completePaymentMethodSetup(customerId: $customerId, setupRef: $setupRef) { id uuid type created_at } }",
"variables": {
"customerId": "example",
"setupRef": "example"
}
}
JSON