Skip to content
gist.link ↗

createPaymentMethodSetup

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

Start vaulting a reusable card for a customer: creates the PSP customer if needed and a setup intent, returning the client_secret + publishable key for an embedded payment element in the CALLER’s own frontend (never a PSP-hosted page). ROLE_ADMIN, ROLE_PAY_MANAGER or ROLE_SERVICE — the charge-rail surface sibling GistLink services consume.

pay:mutation:createPaymentMethodSetup

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 {
createPaymentMethodSetup(customerId: String!): PaymentMethodSetup!
}
Argument Type Required Description
customerId String! Yes —

PaymentMethodSetup! — 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 CreatePaymentMethodSetup($customerId: String!) { createPaymentMethodSetup(customerId: $customerId) { setup_ref client_secret publishable_key provider } }",
"variables": {
"customerId": "example"
}
}
JSON