Skip to content
gist.link ↗

refundOrder

Mutation Shop API — POST https://shop.api.gist.link/graphql

Refund a paid order through the pay service (refundPayment). Records a Refund; fully refunds the order status when the whole total is refunded. ADMIN.

shop:mutation:refundOrder

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

type Mutation {
refundOrder(orderId: String!, amount: Int, reason: String): Order!
}
Argument Type Required Description
orderId String! Yes —
amount Int No —
reason String No —

Order! — see the Shop types reference.

Terminal window
curl https://shop.api.gist.link/graphql \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d @- <<'JSON'
{
"query": "mutation RefundOrder($orderId: String!, $amount: Int, $reason: String) { refundOrder(orderId: $orderId, amount: $amount, reason: $reason) { id uuid email currency total status created_at updated_at } }",
"variables": {
"orderId": "example",
"amount": 10,
"reason": "example"
}
}
JSON