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
    • Request Headers
    • Dates
    • Pagination
    • Authentication
    • Idempotent Requests
    • Timeouts
      • Contact object
      • Consumer object
      • Discount object
      • Item object
      • Money object
      • Order Details object
      • Payment object
      • Refund object
      • Shipping Courier object
    • API Simulator
    • JavaScript afterpay.js
    • Errors
LogoLogo
On this page
  • Attributes
  • Example Order Details object
Online APIModels

Order Details object

Was this page helpful?
Previous

Payment object

Next
Built with

Attributes

AttributeTypeDescription
consumer Consumer requiredThe consumer who placed or is placing the order.
billingContactThe consumer’s billing address.
shippingContactThe consumer’s shipping address.
courierShipping CourierThe consumer’s chosen shipping courier.
itemsItem[]An array of order items.
discountsDiscount[]An array of discounts.
taxAmountMoneyThe included tax amount, after applying all discounts.
shippingAmountMoneyThe shipping price charged to the consumer.

Example Order Details object

UK
1{
2 "consumer": {
3 "phoneNumber": "07000000000",
4 "givenNames": "Joe",
5 "surname": "Consumer",
6 "email": "test@example.com"
7 },
8 "billing": {
9 "name": "Joe Consumer",
10 "line1": "1 Market Street",
11 "suburb": "MANCHESTER",
12 "postcode": "M4 3AT",
13 "countryCode": "GB",
14 "phoneNumber": "07000000000"
15 },
16 "shipping": {
17 "name": "Joe Consumer",
18 "line1": "Trafalgar House, 17-19 Cockspur St",
19 "suburb": "LONDON",
20 "postcode": "SW1Y 5BL",
21 "countryCode": "GB",
22 "phoneNumber": "07000000000"
23 },
24 "courier" : {
25 "shippedAt" : "2019-01-01T00:00:00+01:00",
26 "name" : "Parcelforce Worldwide",
27 "tracking" : "AAAA1234567890",
28 "priority" : "STANDARD"
29 },
30 "items": [
31 {
32 "name": "T-Shirt",
33 "sku": "12341234",
34 "quantity": 1,
35 "price": {
36 "amount": "10.00",
37 "currency": "GBP"
38 }
39 },
40 {
41 "name": "Jeans",
42 "sku": "12341235",
43 "quantity": 1,
44 "price": {
45 "amount": "20.00",
46 "currency": "GBP"
47 }
48 }
49 ],
50 "discounts": [
51 {
52 "displayName": "10% Off Subtotal",
53 "amount": {
54 "amount": "3.00",
55 "currency": "GBP"
56 }
57 }
58 ],
59 "taxAmount": {
60 "amount": "7.40",
61 "currency": "GBP"
62 },
63 "shippingAmount": {
64 "amount": "10.00",
65 "currency": "GBP"
66 }
67}