Subscriptions
List subscriptions
Returns subscriptions for the account, newest first. Cursor-paginated, and filterable by customer and status.
GET/v1/subscriptions
Parameters
| Parameter | Description |
|---|---|
| customer_idstring | null · queryoptional | At most 64 characters. |
| statusstring | null · queryoptional | At most 128 characters. |
| renewal_statestring | null · queryoptional | At most 128 characters. |
| limitinteger · queryoptional | Defaults to 10. Between 1 and 100. |
| starting_afterstring | null · queryoptional | At most 128 characters. |
| expandstring | null · queryoptional | At most 256 characters. |
Cursor-paginated. limit caps a page and starting_after takes the last id you
saw.
Returns
A list object: data holds the page and has_more says whether another one exists. Page forward by passing the last id of the page as starting_after; a short page is not the end of the list.
Paging is forward-only. To go back, keep the cursors you have already used.
Test it
Filter to status=past_due against a sandbox with an advanced test clock to see the dunning cohort your retry job would pick up.
Errors
| Status | Cause |
|---|---|
| 401 | Missing or invalid API key. |
| 403 | Key is missing the subscriptions:read scope. |
| 422 | Validation Error |
| 429 | Rate limited. Back off and retry. |
Other subscriptions operations
- Retrieve a subscription GET /v1/subscriptions/{subscription_id}
- Cancel a subscription POST /v1/subscriptions/{subscription_id}/cancel
- Pause subscription POST /v1/subscriptions/{subscription_id}/pause
- Preview update subscription POST /v1/subscriptions/{subscription_id}/preview_update
- Reactivate subscription POST /v1/subscriptions/{subscription_id}/reactivate
- Reauthorize payment method POST /v1/subscriptions/{subscription_id}/reauthorize_payment_method
- Resume subscription POST /v1/subscriptions/{subscription_id}/resume
- Change a subscription's plan POST /v1/subscriptions/{subscription_id}/update
BillKit