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
LogoLogo
On this page
  • Attributes
  • Example Payment object
  • Australia
  • New Zealand
  • United States of America
Models

Payment object

Was this page helpful?
Previous

Refund Object

Next
Built with

Attributes

AttributeTypeDescription
idstringThe unique, permanent, Afterpay-generated Order ID.
tokenstringOrder token that was used to complete payment.
statusstringAn order status of “APPROVED” or “DECLINED”. Note: in response to a Capture Payment call, an object in this format will only be returned if the status is “APPROVED”.
createdstringThe UTC timestamp of when the payment was completed, in ISO 8601 format.
totalAmountMoneyTotal amount charged to the consumer for the order.
merchantReferencestringThe merchant’s order id/reference that this payment corresponds to.
refundsRefund[]An array of refunds. Note: in response to a Capture Payment call, this array will always be empty, since refunds cannot occur before payment is captured.
orderDetailsOrder DetailsThe order bound to the payment.
eventsarrayThis array is an obsolete field; it will always be empty.

Example Payment object

Australia

1{
2 "id": "12345678",
3 "token": "ltqdpjhbqu3veqikk95g7p3fhvcchfvtlsiobah3u4l5nln8gii9",
4 "status": "APPROVED",
5 "created": "2019-01-01T00:00:00.000Z",
6 "totalAmount": {
7 "amount": "29.99",
8 "currency": "AUD"
9 },
10 "merchantReference": "merchantOrderId-1234",
11 "refunds": [
12 ...
13 ],
14 "orderDetails": {
15 ...
16 },
17 "events": []
18}

New Zealand

1{
2 "id": "12345678",
3 "token": "ltqdpjhbqu3veqikk95g7p3fhvcchfvtlsiobah3u4l5nln8gii9",
4 "status": "APPROVED",
5 "created": "2019-01-01T00:00:00.000Z",
6 "totalAmount": {
7 "amount": "29.99",
8 "currency": "NZD"
9 },
10 "merchantReference": "merchantOrderId-1234",
11 "refunds": [
12 ...
13 ],
14 "orderDetails": {
15 ...
16 },
17 "events": []
18}

United States of America

1{
2 "id": "12345678",
3 "token": "ltqdpjhbqu3veqikk95g7p3fhvcchfvtlsiobah3u4l5nln8gii9",
4 "status": "APPROVED",
5 "created": "2019-01-01T00:00:00.000Z",
6 "totalAmount": {
7 "amount": "29.99",
8 "currency": "USD"
9 },
10 "merchantReference": "merchantOrderId-1234",
11 "refunds": [
12 ...
13 ],
14 "orderDetails": {
15 ...
16 },
17 "events": []
18}