Skip to content

Filter lists

The filters of every list operation, and how lists are ordered.


Filters are query parameters of a list operation. They combine: an item has to match all of them. Lists are always newest first; there is no sort parameter.

Operation Filters
GET /v1/payments status, project_id, merchant_reference, payment_method, payment_link_id, q (a payment id, or the start of your reference), from and to (days as YYYY-MM-DD in Jakarta time, both included)
GET /v1/webhook-deliveries endpoint_id, payment_id, status (pending, retrying, succeeded, failed)
GET /v1/invoices project_id, status, q (the number, or part of the customer’s name or email)
GET /v1/payment-links project_id, state, q (search by title or reference)
GET /v1/events type (a type such as payment.succeeded, or a family such as payment.*), project_id, payment_id, payment_link_id
GET /v1/webhook-endpoints project_id
GET /v1/balance/movements account (pending or available)

The values each filter takes are on the page of the operation, in the API reference.

The paid payments for one order:

Terminal window
curl "https://api.baiyar.com/v1/payments?status=paid&merchant_reference=order-1001" \
-H "Authorization: Bearer $BAIYAR_KEY"

Every event of one payment, to see what happened to it:

Terminal window
curl "https://api.baiyar.com/v1/events?payment_id=pay_01k7q3m8x2v5t9n4b6c1d0e7fa" \
-H "Authorization: Bearer $BAIYAR_KEY"

Only the payment events (a family), for the last 30 days that events are kept:

Terminal window
curl "https://api.baiyar.com/v1/events?type=payment.*" \
-H "Authorization: Bearer $BAIYAR_KEY"

Keep the same filters on every page request. The cursor continues that filtered list. See Pagination.