Admin API / Mutations

refundOrder

Issues a refund against a paid order. Returns OrderNotFoundError when the caller cannot read the order, and UnauthorizedError with requiredRole: null when the caller can read the order but its seller is not the caller and not the owner of a store that the caller staffs. With restockItems, the refund also puts the named variants back in stock. Every item is checked before money moves: one item that cannot go back in stock gives RestockItemError, and no refund is issued. A repeat with the same idempotencyKey skips the check when that key already has a refund, a refund reservation or a restock row, so an item that fails the check is missing from restockedItems with no RestockItemError.

Requires a client key with one of these scopes: admin:orders:settleRequires this member role or higher: SELLER
refundOrder(
  input: RefundOrderInput!
): RefundOrderPayload!

Arguments

ArgumentTypeDescription
inputRefundOrderInput!The refund details.

Return type

RefundOrderPayload!