Pay for an order using one or more approved payments, or settle an order with a total of 0
.
POST
/v2/orders/{order_id}/pay
Pay for an order using one or more approved payments, or settle an order with a total of 0
.
The total of the payment_ids
listed in the request must be equal to the order total. Orders with a total amount of 0
can be marked as paid by specifying an empty array of payment_ids
in the request.
To be used with PayOrder, a payment must:
order_id
when creating the payment. Any approved payments that reference the same order_id
not specified in the payment_ids
will be canceled.Learn how to pay for orders with a single payment using the Payments API.
A value you specify that uniquely identifies this request among requests you've sent. If you're unsure whether a particular payment request was completed successfully, you can reattempt it with the same idempotency key without worrying about duplicate payments.
See Idempotency for more information.
The version of the order being paid. If not supplied, the latest version will be paid.
The IDs of the payments to collect. The payment total must match the order total.
The paid, updated order.