Getting started
Lists and filters
What list endpoints return, how to filter them, and how many rows they send.
A list endpoint returns its items newest first. Invoices and sessions come in pages. The other lists return a JSON array, or [] with no matches, and have no page, limit, cursor, or offset parameters.
How many items a list returns
- Products, prices, customers, and subscriptions return every match.
- Events and webhook deliveries return the 50 newest matches.
- Notices return the 100 newest matches.
- Invoices and sessions return 25 by default, up to 100 with
limit.
To find something older than the newest 50 or 100, narrow the list with a filter.
Pages
A paged list returns an object, not an array. items holds the page, empty when nothing matches. next_cursor is the cursor for the next page, or null on the last one. Pass it back as cursor with the same filters. Treat it as opaque.
List invoices and List sessions have the details.
The prices list includes archived prices. An archived price has a timestamp in archived_at.
Filters
Send filters as query parameters. The API ignores a blank filter. A status it doesn't know returns 422 with code invalid.
- Invoices:
statusisopen,paid,void, oroverdue.searchmatches part of the number, name, or email, ignoring case.fromandtobound the issue date in Unix seconds. - Sessions:
typeischeckout,payment,plan_change,cancel, orportal.statusisopen,completed, orexpired.subscription_idis one subscription's ID. - Customers:
searchmatches part of the name or email, ignoring case. - Subscriptions:
statusispending,active, orcanceled.emailmatches part of the customer's email, ignoring case. - Events:
typeis one event type, such asinvoice.paid. - Webhook deliveries:
typeis one event type.statusispending,delivering,delivered, orfailed. - Notices:
subscription_idis one subscription's ID.statusispending,sending,sent,failed, orwithdrawn.
Filters combine, so a list returns only items that match all of them.
curl "https://api.abuna.app/v1/apps/01J9ZQ4Y7R3T6V8W2X5B1C0DEF/subscriptions?status=active&email=ana" \
-H "Authorization: Bearer sk_test_..."Next steps
- SubscriptionsStart, list, read, update, cancel, keep, and change the plan of a customer's subscription to a price.
- Invoices and paymentsBilling periods, their invoices, and the payments made against them, and how to list and read invoices.
- SessionsSend a customer to a hosted page to start a subscription, pay an invoice, change plan, cancel, or open the customer portal. Then list, read, and expire those sessions.
- EventsThe record of everything that happened in an app, and every event type.