Skip to navigation

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 <base64(username:password)>.

Path parameters

environmentstringRequired

Use api-sandbox for AU/NZ, or api.us-sandbox for US.

orderIDstringRequired
The Order ID to update

Headers

User-AgentstringRequired
AcceptstringOptionalDefaults to application/json

Request

This endpoint expects an object.
merchantReferencestringRequiredDefaults to new_merchan_order_id_1234

The merchant’s new order id to replace with

Response

Returns object containing the following attributes:

AttributeTypeDescription
idstringThe unique Afterpay (merchant payment) payment Id
tokenstringCheckout token to be used to complete consumer checkout and payment.
statusstringAPPROVED (update is only valid for successful orders)
createdstring (ISO-8601)The payment creation time (ISO 8601 UTC/Zulu time).
originalAmountMoney objectTotal amount for the order.
openToCaptureAmountMoney objectTotal amount that can be captured for order.
paymentStatestringAvailable states: AUTH_APPROVED, CAPTURED, VOIDED, EXPIRED, AUTH_DECLINED, PARTIALLY_CAPTURED, CAPTURE_DECLINED`
merchantReferencestringThe merchant’s order id/reference that this payment corresponds to.
refundsRefund objectThe refund details for merchant's order
orderDetailsOrder Details objectThe order bound to the payment.
eventsEvents objectEvent list for for merchant's order.

Errors

404
Not Found Error