Skip to content
gist.link ↗

paymentMethods

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

Vaulted payment methods for one customer (newest first). ROLE_ADMIN, ROLE_PAY_MANAGER or ROLE_SERVICE.

pay:query:paymentMethods

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

type Query {
paymentMethods(customerId: String!): [PaymentMethodToken!]!
}
Argument Type Required Description
customerId 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": "query PaymentMethods($customerId: String!) { paymentMethods(customerId: $customerId) { id uuid type created_at } }",
"variables": {
"customerId": "example"
}
}
JSON