Skip to content
gist.link ↗

checkoutSessions

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

Checkout sessions for an invoice (newest first). Any org member.

pay:query:checkoutSessions

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 {
checkoutSessions(invoiceId: String!): [CheckoutSession!]!
}
Argument Type Required Description
invoiceId String! Yes —

[CheckoutSession!]! — 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 CheckoutSessions($invoiceId: String!) { checkoutSessions(invoiceId: $invoiceId) { id uuid url status amount currency created_at } }",
"variables": {
"invoiceId": "example"
}
}
JSON