📘

Note

The Readme API Simulator includes form elements for both required and optional Body Params. If not populated with values, Readme will send empty strings to the Afterpay Online API. Any optional parameter that is validated against a Model will need to have all of its required sub-params populated with non-empty values.

Therefore, to avoid receiving unexpected "400" responses from Afterpay, please fill out all fields of the simulation form with valid values. This is particularly important for the amount and currency sub-params of the amount, taxAmount and shippingAmount params.

Success Response (201)

Returns object containing the following attributes.

ParameterTypeDescription
idstringThe unique Afterpay (merchant payment) payment Id
tokenstringCheckout token to be used to complete consumer checkout and payment.
statusstring"APPROVED" (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.
eventsEvent objectEvent list for for merchant's order.

Note
This end point is for merchants that creates merchant side's order id after AfterPay order id creation.
The merchants should call immediately after the AfterPay order is created in order to properly update with their order id that can be tracked.

Errors

In addition to the PUT/POST Errors applicable to all PUT endpoints, the following errors are specific to Update Payment By PaymentId:

HTTP Status CodeerrorCodeDescription
404
Not Found
not_foundThe Afterpay payment Id to update was not found.
Language
Authorization
Basic
base64
:
Click Try It! to start a request and see the response here!