get https://global-api-sandbox.afterpay.com/v1/orders/
This endpoint retrieves an incomplete individual order by token.
Note
Order details are only retained in this temporary format for up to 60 minutes. If an order token expires or has a payment captured against it, it can no longer be retrieved from this endpoint.
To retrieve a completed payment along with its associated order details, see Get Payment By Token.
Successful Response (200)
If an order belonging to the authenticated merchant account is found, returns the order details in response. Fields that were not included in the original Create Order request may not be included in any corresponding Get Order request.
Attribute | Type | Description |
---|---|---|
expires | string | The UTC timestamp of when the order token will expire, in ISO 8601 format. |
token | string | Order token to be used to complete payment. |
totalAmount | Money | Total amount for order to be charged to consumer. |
consumer | Consumer | The consumer requesting the order. |
billing | Contact | Billing address. |
shipping | Contact | Shipping address. |
courier | Shipping Courier | Shipping courier details. |
description | string | A description of the order. |
merchant .redirectConfirmUrl | string | The consumer is redirected to this URL on confirmation. |
merchant .redirectCancelUrl | string | The consumer to redirected to this URL if the payment process is cancelled. |
paymentType | string | "PAY_BY_INSTALLMENT" |
merchantReference | string | The merchant's id/reference that this order corresponds to. |
items | Item[] | An array of order items. |
discounts | Discount[] | An array of discounts. |
shippingAmount | Money | The shipping amount. |
taxAmount | Money | The included tax amount after applying all discounts. |
Connection Timeouts
Timeout | Time (Seconds) |
---|---|
Open | 10 |
Read | 20 |
Errors
In addition to the GET Errors applicable to all GET endpoints, the following errors are specific to Get Order:
HTTP Status Code | errorCode | Description |
---|---|---|
404 Not Found | not_found | The order token is invalid, expired, completed, or does not exist. |