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
    • Errors
LogoLogo
On this page
  • Query Parameters
  • Response
  • Example Request
  • Example Response
Online API

Pagination

Was this page helpful?
Previous

Authentication

Next
Built with

All GET based endpoints that return a list of resources support pagination. The default limit is 20 and maximum is 250. The results are in descending order by default, newest first.

Query Parameters

ParameterTypeDescription
limitintegerThe number of results to retrieve. Must be between 1 and 250 (inclusive). Default value is 20.
offsetintegerThe position to start the results at. The first result has a position of 0. Default value is 0.

Response

ParameterTypeDescription
limitintegerThe number of results that this page was limited to.
offsetintegerThe position of the first result retrieved for this page.
totalResultsintegerThe total number of results matching the given criteria. If this number is greater than limit, one or more results were excluded from this page.
resultsarrayA page of matching results. This may be a subset of the total.

Example Request

1curl https://api.eu-sandbox.afterpay.com/v1/payments \
2 -H 'Authorization: Basic <Base64EncodedString>' \
3 -H 'User-Agent: <MyUserAgent>' \
4 -H 'Accept: application/json'

Example Response

1{
2 "totalResults": 213,
3 "offset": 0,
4 "limit": 20,
5 "results": [
6 ...
7 ]
8}