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.
idstring

The unique Afterpay (merchant payment) payment Id

tokenstring
Checkout token to be used to complete consumer checkout and payment.
statusstring

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

createdany

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

originalAmountobject
Total amount for the order. See Money.
openToCaptureAmountobject
Total amount that can be captured for order. See Money.
paymentStatestring

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

merchantReferenceany
refundsobject
The refund details for merchant's order. See Refund.
orderDetailsobject
The order bound to the payment. See Order Details.
eventsobject
Event list for for merchant's order. See Events.

Errors

404
Not Found Error