Skip to content
gist.link ↗

refunds

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

Cursor-paginated refunds, optionally scoped to one payment. Any org member.

pay:query:refunds

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 {
refunds(paymentId: String, first: Int, after: String): RefundConnection!
}
Argument Type Required Description
paymentId String No —
first Int No —
after String No —

RefundConnection! — 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 Refunds($paymentId: String, $first: Int, $after: String) { refunds(paymentId: $paymentId, first: $first, after: $after) { totalCount edges { cursor node { id uuid amount currency status created_at updated_at } } } }",
"variables": {
"paymentId": "example",
"first": 10,
"after": "cursor"
}
}
JSON