For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
HomeGuidesAPI Reference
HomeGuidesAPI Reference
  • Online API
    • API Environments
    • Direct Payment Flow
    • REST
    • HTTPS
    • Dates
    • Pagination
    • Authentication
    • Idempotent Requests
    • Timeouts
    • API Simulator
  • Models
    • Introduction
    • Contact Object
    • Consumer Object
    • Discount Object
    • Item Object
    • Money Object
    • Order Details Object
    • Payment Object
    • Refund Object
    • Shipping Courier Object
  • Service Status
    • GETPing
  • Configuration
    • GETGet Configuration
  • Orders
    • Introduction
    • GETGet Order
    • POSTCreate Order
  • Javascript afterpay.js
    • Information
    • Redirect Method
  • Payments
    • Introduction
    • POSTCapture Payment
    • PUTUpdate Shipping Courier
    • GETGet Payment By Order ID
    • GETGet Payment By Token
    • GETList Payment(s)
    • POSTCreate Refund
    • PUTUpdate Payment by Order ID
    • POSTReverse Payment By Token
  • Errors
    • Introduction
    • Get Errors
    • Put/Post Errors
  • Reference
      • POSTCreate Order
      • GETGet Order
LogoLogo
ReferenceOrders

Get Order

GET
https://global-api-sandbox.afterpay.com/v1/orders/:token/environment::environment
GET
/v1/orders/:token/environment::environment
$curl https://global-api-sandbox.afterpay.com/v1/orders/token/environment:environment \
> -H "User-Agent: User-Agent" \
> -u "<username>:<password>"
1{}
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. ### Connection Timeouts | Timeout | Time (Seconds) | | ------- | ------------ | | Open | 10 | | Read | 20 |
Was this page helpful?
Previous

Get Configuration

Next
Built with

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.

Connection Timeouts

TimeoutTime (Seconds)
Open10
Read20

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.

tokenstringRequired
The token of the order to be retrieved.

Headers

User-AgentstringRequired
AcceptstringOptionalDefaults to application/json

Response

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](http://www.iso.org/iso/home/standards/iso8601.htm) 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. |

Errors

404
Not Found Error

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.

AttributeTypeDescription
expiresstringThe UTC timestamp of when the order token will expire, in ISO 8601 format.
tokenstringOrder token to be used to complete payment.
totalAmountMoneyTotal amount for order to be charged to consumer.
consumerConsumerThe consumer requesting the order.
billingContactBilling address.
shippingContactShipping address.
courierShipping CourierShipping courier details.
descriptionstringA description of the order.
merchant.redirectConfirmUrlstringThe consumer is redirected to this URL on confirmation.
merchant.redirectCancelUrlstringThe consumer to redirected to this URL if the payment process is cancelled.
paymentTypestring”PAY_BY_INSTALLMENT”
merchantReferencestringThe merchant’s id/reference that this order corresponds to.
itemsItemAn array of order items.
discountsDiscountAn array of discounts.
shippingAmountMoneyThe shipping amount.
taxAmountMoneyThe included tax amount after applying all discounts.