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
    • API Simulator
    • JavaScript afterpay.js
      • POSTCapture Payment
      • PUTUpdate Shipping Courier
      • GETGet Payment By Order ID
      • GETGet Payment By Token
      • GETList Payments
      • POSTCreate Refund
    • Errors
LogoLogo
Online APIPayments

Get Payment By Token

GET
https://global-api-sandbox.afterpay.com/v1/payments/token::token
GET
/v1/payments/token::token
$curl https://global-api-sandbox.afterpay.com/v1/payments/token:token \
> -H "User-Agent: User-Agent" \
> -u "<username>:<password>"
This endpoint retrieves an individual payment along with its order details. ## Successful Response (200) Returns a [Payment object](/v-1/payment-object) in response. ## Connection Timeouts | Timeout | Time (Seconds) | | :------ | :------------- | | Open | 10 | | Read | 20 | ## Errors In addition to the [GET Errors](/v-1/get-errors) applicable to all GET endpoints, the following errors are specific to Get Payment By Token: | HTTP Status Code | errorCode | Description | | :-- | :-- | :-- | | **404** <br />Not Found | `not_found` | No Clearpay Order was found matching the `token` provided. |
Was this page helpful?
Previous

List Payments

Next
Built with

This endpoint retrieves an individual payment along with its order details.

Successful Response (200)

Returns a Payment object in response.

Connection Timeouts

TimeoutTime (Seconds)
Open10
Read20

Errors

In addition to the GET Errors applicable to all GET endpoints, the following errors are specific to Get Payment By Token:

HTTP Status CodeerrorCodeDescription
404
Not Found
not_foundNo Clearpay Order was found matching the token provided.

Authentication

AuthorizationBasic

Basic authentication of the form Basic <base64(username:password)>.

Path parameters

tokenstringRequired
Order token that was used to complete payment.

Headers

User-AgentstringRequired
AcceptstringOptionalDefaults to application/json