Endpoint
List subscriptions
GET
/v1/subscriptionsReturns your subscriptions, newest first, a page at a time. Filter by status, customer, price or current_period_end[lte], and by the time each was made, with created[gte] and created[lt].
- Scope a restricted key needs
subscriptions:read- Publishable key
- Not allowed: secret or restricted key only
- Idempotency-Key
- Not used. A GET is already safe to repeat.
Parameters
| Parameter | Type and place | Meaning |
|---|---|---|
status | stringquery | One state or a comma-separated list. |
customer | stringquery | Only subscriptions of this cus_ id. |
price | stringquery | Only subscriptions charging this price_ id. |
current_period_end[lte] | string (date-time)query | Also [gte], [gt], [lt]. |
limit | integerquery | Items per page, 1 to 100. Default 20. |
starting_after | stringquery | An object id: return the items after it. |
ending_before | stringquery | An object id: return the items before it. |
created[gte] | string (date-time)query | Created at or after. Also created[gt], created[lte], created[lt]. |
created[lt] | string (date-time)query | Created before. |
expand | stringquery | Comma-separated fields to expand (Filtering, sorting and expanding), up to 5, one level deep: data.customer, data.latest_order. Each field needs the read scope that its object's own GET needs (customers:read for a customer, payments:read for a payment); without it the call answers insufficient_scope naming that scope, and nothing is expanded. |
Orrerie-Version | stringheader | API version date. Default: the version the key was created with. Example 2026-10-11. |
Example request
curl
curl https://api.orrerie.com/v1/subscriptions \
-H "Authorization: Bearer $ORRERIE_SECRET_KEY"JavaScript
const response = await fetch("https://api.orrerie.com/v1/subscriptions", {
headers: {
Authorization: `Bearer ${process.env.ORRERIE_SECRET_KEY}`,
},
});
const result = await response.json();
if (!response.ok) throw new Error(`${result.error.code}: ${result.error.message}`);
console.log(result);Python
import os
import requests
response = requests.get(
"https://api.orrerie.com/v1/subscriptions",
headers={"Authorization": f"Bearer {os.environ['ORRERIE_SECRET_KEY']}"},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(f"{result['error']['code']}: {result['error']['message']}")
print(result)PHP
<?php
$request = curl_init('https://api.orrerie.com/v1/subscriptions');
curl_setopt_array($request, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('ORRERIE_SECRET_KEY'),
],
]);
$body = curl_exec($request);
if ($body === false) {
throw new RuntimeException(curl_error($request));
}
$result = json_decode($body, true);
if (curl_getinfo($request, CURLINFO_HTTP_CODE) >= 400) {
throw new RuntimeException($result['error']['code'] . ': ' . $result['error']['message']);
}
print_r($result);Responses
200 OK
A list whose data holds subscription objects. Headers: Orrerie-Request-Id.
Example response, 200
{
"object": "list",
"url": "/v1/subscriptions",
"has_more": false,
"data": [
{
"id": "sub_9q5v9rq2naessbxsrec2tsw0",
"object": "subscription",
"livemode": true,
"created": "2026-10-01T08:05:00.000Z",
"updated": "2026-10-01T08:09:00.000Z",
"status": "active",
"customer": "cus_8ea07c40qsvv19f7rgmeb8ha",
"items": [
{
"price": "price_s5n6hhtmyv5erqb81efqgjy6",
"quantity": 1
}
],
"amount": "18.00",
"currency": "USD",
"interval": "month",
"interval_count": 1,
"reminder_days": [
7,
3,
1
],
"grace_days": 3,
"prepaid_periods_allowed": [
1,
3,
6,
12
],
"proration": "none",
"current_period_start": "2026-10-01T08:09:00.000Z",
"current_period_end": "2026-11-01T08:09:00.000Z",
"prepaid_until": "2026-11-01T08:09:00.000Z",
"latest_order": "ord_ayyh1f26ajmj807xjy6ezyfd",
"renewal": {
"order": null,
"checkout_url": null,
"opens_at": "2026-10-25T08:09:00.000Z",
"due_at": "2026-11-01T08:09:00.000Z",
"grace_ends_at": "2026-11-04T08:09:00.000Z"
},
"cancel_at_period_end": false,
"cancelled_at": null,
"paused_at": null,
"ended_at": null,
"cancellation_reason": null,
"metadata": {}
}
]
}Any other status: an error
A status of 400 or above answers with the error object. Branch on its code, never on its message.
Errors
This call has no error of its own. It answers with the errors every call can answer with: a bad key, a missing scope, an object that does not exist, the rate limit. Every error code has its own entry.