refundOrderPayment
Records that money for the order was paid back and moves its primary payment to refunded or refunded_partially. amountRefunded is the total refunded for the order so far, across all refunds, not the amount of the latest refund: the payment becomes refunded when amountRefunded reaches the order's amountTotal, and refunded_partially while it stays below. For a further partial refund, send the new total; the payment stays refunded_partially without firing its flows again until the total reaches amountTotal. Fails with CONFLICT when the shop's payment state machine has no direct transition from the payment's current state to the target state, e.g. for an open payment, or when the order has no payment. Does nothing when the payment is already in the target state. Fires the flows configured for the state change. Returns the order.
Required scopes
The token needs the orders:write access scope.
refundOrderPayment(
id: ID!
amountRefunded: Float!
): Order!
Arguments
refundOrderPayment.id ● ID! non-null scalar
ID of the order the refund was made for.
refundOrderPayment.amountRefunded ● Float! non-null scalar
Total amount refunded for the order so far, in the order's currency. Must be greater than 0.
Type
Order object
A customer order.