Lists, filters and search
Page through a list, filter it, search it, sort it and expand related objects.
Every list endpoint, such as GET /v1/payment_intents, /v1/refunds, /v1/customers or /v1/events, works the same way. It returns the newest objects first, in the same envelope, and you page through it with a cursor.
{
"object": "list",
"url": "/v1/payment_intents",
"has_more": true,
"data": [
{
"id": "pi_01J9ZQ4V8K2M3N5P7R9T1W3Y5A",
"object": "payment_intent",
"amount": 12500,
"currency": "try",
"status": "succeeded",
"capture_method": "automatic",
"created": 1795167000,
"livemode": false
}
]
}
Pagination
| Parameter | Meaning |
|---|---|
limit |
Page size, from 1 to 100. The default is 10. |
starting_after |
The id of the last object on the current page. Returns the next page. |
ending_before |
The id of the first object on the current page. Returns the previous page. |
Send only one of starting_after and ending_before. While has_more is true, request the next page with the last id as starting_after:
curl "https://api.pf.organizer.tr/v1/payment_intents?limit=100&starting_after=pi_01J9ZQ4V8K2M3N5P7R9T1W3Y5A" \
-H "Authorization: Bearer sk_sandbox_YOUR_KEY"
- A page fetched with
ending_beforeis in the same order as the others, newest first. There,has_more: truemeans there are newer objects before it. - Objects created while you page do not move the cursor: no object is skipped or shown twice.
- A cursor that is not an object of this list in your account returns
404 resource_missing, andparamnames the cursor.
To get the number of matching objects, add include[]=total_count. We count up to 10000. Above that, total_count_capped is true.
curl -g "https://api.pf.organizer.tr/v1/refunds?status=succeeded&include[]=total_count" \
-H "Authorization: Bearer sk_sandbox_YOUR_KEY"
Filters
An object must match every filter you send.
- Several values:
status=succeeded,canceled. On events,typetakes one event type, or a prefix that ends in*, such aspayment_intent.*. - Ranges:
created[gte]=1795126800&created[lte]=1795213199in unix seconds,amount[gte]=10000in minor units,arrival_date[gte]=2026-11-01as a date. - Your own references on payments:
metadata[order_id]=SIP-2026-10423. The value must match exactly. You can filter on up to five keys.
| Resource | Filters |
|---|---|
| Payments | status, amount, currency, card[brand], card[last4], card[bin], installments, capture_method, fraud_status, three_d_secure, refunded (none, partial, full), disputed, customer, payment_link, metadata[key], q, created |
| Refunds | payment_intent, status, method, amount, created |
| Customers | email, q, created |
| Payouts | status, arrival_date, created |
| Disputes | status, payment_intent, evidence_due_by, evidence_submitted, created |
| Events | type, object_id, request_id, created |
A malformed value, such as a text where a time is expected, returns 400 parameter_invalid, and param names it. A filter we do not know is ignored, so a misspelled name returns the unfiltered list. Check the spelling.
Search
To search payments, use q on GET /v1/payment_intents. To search payments, refunds, customers and disputes at once, use GET /v1/search?q=…. Both find an object by its id, by a customer's exact email address or by the start of a payment description.
On GET /v1/customers, q finds a customer by id or by the start of a name or email address.
Sorting
sort=amount sorts in ascending order and sort=-amount in descending order. The default is -created. Payments, refunds, payouts and disputes sort by created or amount. Payouts also sort by arrival_date, and disputes by evidence_due_by.
Expanding related objects
Some fields hold the id of another object. To get the full object in the same response, add expand[]=<field>:
curl -g "https://api.pf.organizer.tr/v1/payment_intents/pi_01J9ZQ4V8K2M3N5P7R9T1W3Y5A?expand[]=customer&expand[]=line_items" \
-H "Authorization: Bearer sk_sandbox_YOUR_KEY"
On payments you can expand customer, line_items, latest_attempt, attempts and balance_transactions.
In the API reference
Next: Use Webhooks instead of polling, and check the numbers in Rate limits.