Update Payment by Order ID

This endpoint is to create merchant side order ID's following the Afterpay order ID creation. The endpoint should be called immediately after the Afterpay order is created.

Authentication

AuthorizationBasic

Basic authentication of the form Basic <base64(username:password)>.

Path parameters

orderIdstringRequired
The Order ID to update

Headers

User-AgentstringRequired
AcceptstringOptionalDefaults to application/json

Request

This endpoint expects an object.
merchantReferencestringRequiredDefaults to new_merchant_order_id_1234

The merchant’s new order id to replace with

Response

Returns object containing the following attributes.
idstringOptional

The unique Afterpay (merchant payment) payment Id

tokenstringOptional
Checkout token to be used to complete consumer checkout and payment.
statusstringOptional

“APPROVED” (update is only valid for successful orders)

createdanyOptional

The payment creation time (ISO 8601 UTC/Zulu time).

originalAmountobjectOptional
Total amount for the order. See Money.
openToCaptureAmountobjectOptional
Total amount that can be captured for order. See Money.
paymentStatestringOptional

Available states: “AUTH_APPROVED”, “CAPTURED”, “VOIDED”, “EXPIRED”, “AUTH_DECLINED”, “PARTIALLY_CAPTURED”, “CAPTURE_DECLINED""

merchantReferenceanyOptional
refundsobjectOptional
The refund details for merchant's order. See Refund.
orderDetailsobjectOptional
The order bound to the payment. See Order Details.
eventsobjectOptional
Event list for for merchant's order. See Events.

Errors

404
Not Found Error