Update Payment by Order ID
This end point is for merchants that creates merchant side's order id after AfterPay order id creation. Merchants should call immediately after the AfterPay order is created in order to properly update with their order id that can be tracked.
Authentication
AuthorizationBasic
Basic authentication of the form Basic <username:password>.
Path Parameters
environment
Use api-sandbox for AU/NZ, or api.us-sandbox for US.
orderID
The Order ID to update
Headers
User-Agent
Accept
Request
This endpoint expects an object.
merchantReference
The merchant’s new order id to replace with
Response
Returns object containing the following attributes:
| Attribute | Type | Description |
| --------- | ---- | ----------- |
| id | string | The unique Afterpay (merchant payment) payment Id |
| token | string | Checkout token to be used to complete consumer checkout and payment. |
| status | string | `APPROVED` (update is only valid for successful orders) |
| created | string (ISO-8601) | The payment creation time (ISO 8601 UTC/Zulu time). |
| originalAmount | Money object | Total amount for the order. |
| openToCaptureAmount | Money object | Total amount that can be captured for order. |
| paymentState | string | Available states: `AUTH_APPROVED`, `CAPTURED`, `VOIDED`, `EXPIRED`, `AUTH_DECLINED`, `PARTIALLY_CAPTURED`, CAPTURE_DECLINED` |
| merchantReference | string | The merchant’s order id/reference that this payment corresponds to. |
| refunds | Refund object | The refund details for merchant's order |
| orderDetails | Order Details object | The order bound to the payment. |
| events | Events object | Event list for for merchant's order. |