Skip to main content

recordOrderPayment

Records that money for the order came in and moves its primary payment to paid or paid_partially. amountPaid is the total paid for the order so far, across all payments, not the amount of the latest payment: the payment becomes paid when amountPaid reaches the order's amountTotal, and paid_partially while it stays below. For a further partial payment, send the new total; the payment stays paid_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 a refunded 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.

recordOrderPayment(
id: ID!
amountPaid: Float!
): Order!

Arguments​

recordOrderPayment.id ● ID! non-null scalar​

ID of the order the payment came in for.

recordOrderPayment.amountPaid ● Float! non-null scalar​

Total amount paid for the order so far, in the order's currency. Must be greater than 0.

Type​

Order object​

A customer order.