Pagination and filtering
List charges, refunds, disputes, and other resources, filter them, and read every page.
Pay.com supports bulk requests of certain resources. You
query these resources by sending a GET request to each
resource's endpoint. Each request accepts query parameters
to filter and paginate the search results. The endpoints below
use cursor-based pagination. Four additional endpoints use
page-number pagination.
| Resource | Endpoint |
|---|---|
| Charges | GET /v1/charges |
| Holds | GET /v1/holds |
| Refunds | GET /v1/refunds |
| Disputes | GET /v1/disputes |
| Payouts | GET /v1/payouts |
| Payment sessions | GET /v1/sessions/payment |
| Cash flow transactions | GET /v1/cashflow/transactions |
| Settlements | GET /v1/settlements |
| Fraud warnings | GET /v1/fraud_warnings |
| Collaborations | GET /v1/collaborations |
| Value list items | GET /v1/value_lists/{list_id}/items |
Results filtering
All bulk endpoints accept the created.* date filters and cursor
pagination. customer_reference_id filters charges, holds, refunds, payouts,
payment sessions, fraud warnings, and cash flow transactions. Disputes reject
it with 400. Some endpoints add their
own filters, for example status on holds and settlement_id on cash flow
transactions. See each endpoint's reference page for its full list. See
Pagination for result limits.
Filter the results based on the creation date, using the created query parameter with comparison operators.
| Parameter | Description |
|---|---|
created.greater_than | Returns results created after the specified date |
created.greater_than_or_equals | Returns results created on or after the specified date |
created.less_than | Returns results created before the specified date |
created.less_than_or_equals | Returns results created on or before the specified date |
Example
This request returns refunds created in January 2025.
curl -X GET \
'https://api.sandbox.pay.com/v1/refunds?created.greater_than_or_equals=2025-01-01&created.less_than=2025-02-01' \
-u ':sk-pay-com-sandbox-…'{
"resource": "refunds",
"has_more": false,
"data": [
{ "id": "rfnd_685125114794084352", "created": "2025-01-15T10:30:00Z" },
{ "id": "rfnd_685125114794084399", "created": "2025-01-16T14:22:00Z" }
]
}Pagination
Bulk endpoints use cursor-based pagination and return results oldest
first. Each response includes a has_more field that tells you whether
more results exist beyond the current page.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Maximum number of results to return. Default: 10, maximum: 100. |
starting_after | string | Returns results created after the given resource ID. Use the ID of the last object from the previous page to fetch the next page. The ID must be of the resource you are listing (for example, rfnd_… for refunds), or the request returns 400. |
ending_before | string | Returns results created before the given resource ID. Use this to paginate backwards. |
starting_after and ending_before are mutually exclusive.
You can't use both in the same request.
Cursor-based pagination is stable under concurrent writes. Unlike offset-based pagination, adding or removing records between requests won't cause you to skip or duplicate results.
Paginate through results
To retrieve all results, repeat requests using starting_after
until has_more is false.
curl -X GET 'https://api.sandbox.pay.com/v1/refunds?limit=25' \
-u ':sk-pay-com-sandbox-…'{
"resource": "refunds",
"has_more": true,
"data": [
{ "id": "rfnd_685125114794084352" },
{ "id": "rfnd_685125114794084399" }
]
}To fetch the next page, pass the last object's ID as
starting_after:
curl -X GET 'https://api.sandbox.pay.com/v1/refunds?limit=25&starting_after=rfnd_685125114794084399' \
-u ':sk-pay-com-sandbox-…'Continue until has_more is false.
Lists that use page numbers
These lists take page and limit in place of cursors, and their own
filters. They don't accept starting_after or ending_before.
| Resource | Endpoint | Filters |
|---|---|---|
| Adjustments | GET /v1/adjustments | settlement_id |
| Value lists | GET /v1/value_lists | from_date, to_date |
| Card blacklist | GET /v1/value_lists/card_blacklist | None |
| Reconciliation transactions | GET /v1/reconciliation/transactions | settlement_id, date, from_date, to_date |
page starts at 1. limit defaults to 10, and you can set it up to 100. Each
response has page, total_pages, total_records, and last_page, which is
true on the last page.
Response structure
All bulk endpoints return a consistent response shape. Amounts are
integers in the minor currency unit (the smallest unit), for example
10000 for $100.00.
| Field | Type | Description |
|---|---|---|
resource | string | The type of resource returned, for example "refunds" or "payouts". |
has_more | boolean | true if more results exist beyond this page. |
data | array | The list of resource objects. |
{
"resource": "refunds",
"has_more": true,
"data": [
{
"id": "rfnd_296645958265997314",
"resource": "refund",
"amount": 10000,
"amount_human_readable": "100.00",
"charge": "chrg_296645958265997312",
"created": "2025-01-15T10:30:00Z",
"currency": "usd",
"status": "succeeded"
},
{
"id": "rfnd_296645958265997422",
"resource": "refund",
"amount": 5000,
"amount_human_readable": "50.00",
"charge": "chrg_296645958265997418",
"created": "2025-01-16T14:22:00Z",
"currency": "usd",
"status": "succeeded"
}
]
}