Skip to main content
All list endpoints in the TRXN API return paginated results. The default page size is 25 items per page.

Request parameters

page
integer
default:"1"
The page number to retrieve. Pages are 1-indexed.

Making a paginated request

curl https://api.gettrxn.com/v1/customers?page=2 \
  -H "Authorization: Bearer $TRXN_TOKEN"

Response format

Every paginated response includes a pagination object alongside the resource array:
{
  "customers": [
    {"id": "cust_abc123", "email": "[email protected]", "...": "..."},
    {"id": "cust_def456", "email": "[email protected]", "...": "..."}
  ],
  "pagination": {
    "page": 2,
    "pages": 5,
    "count": 112
  }
}
page
integer
The current page number.
pages
integer
The total number of pages available.
count
integer
The total number of items across all pages.

Page size

All endpoints return 25 items per page. This is not configurable.

Iterating through all pages

To retrieve all records, increment the page parameter until page equals pages:
page = 1
all_customers = []

loop do
  response = api_client.list_customers(page: page)
  all_customers.concat(response["customers"])

  break if page >= response["pagination"]["pages"]
  page += 1
end

Paginated endpoints

All list endpoints support pagination:
EndpointResource key
GET /v1/customerscustomers
GET /v1/productsproducts
GET /v1/pricesprices
GET /v1/invoicesinvoices
GET /v1/subscriptionssubscriptions
GET /v1/walletswallets
GET /v1/crypto_addressescrypto_addresses
GET /v1/crypto_transactionscrypto_transactions
GET /v1/crypto_payment_claimscrypto_payment_claims
GET /v1/payment_claim_linkspayment_claim_links
GET /v1/webhook_endpointswebhook_endpoints
An empty page (no results) still returns a valid pagination object with count: 0 and pages: 0.