const options = {
method: 'POST',
headers: {
'x-api-version': '<x-api-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({customer_id: 'cus_123', statuses: ['expired']})
};
fetch('https://api.useautumn.com/v1/subscriptions.list', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.useautumn.com/v1/subscriptions.list"
payload = {
"customer_id": "cus_123",
"statuses": ["expired"]
}
headers = {
"x-api-version": "<x-api-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://api.useautumn.com/v1/subscriptions.list \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-api-version: <x-api-version>' \
--data '
{
"customer_id": "cus_123",
"statuses": [
"expired"
]
}
'{
"list": [
{
"id": "sub_123",
"plan_id": "pro",
"auto_enable": false,
"add_on": false,
"status": "expired",
"past_due": false,
"canceled_at": 1771409161016,
"expires_at": 1771409161016,
"trial_ends_at": null,
"started_at": 1768817161016,
"current_period_start": null,
"current_period_end": null,
"quantity": 1,
"scope": "customer",
"customer_id": "cus_123",
"entity_id": null,
"created_at": 1768817161016
}
],
"has_more": false,
"next_cursor": null
}
List Subscriptions
Lists recurring plans (including add-ons) across customers, live or expired. Filter by customer, entity, plan, or status. Pages may hold fewer than limit rows while has_more is true.
const options = {
method: 'POST',
headers: {
'x-api-version': '<x-api-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({customer_id: 'cus_123', statuses: ['expired']})
};
fetch('https://api.useautumn.com/v1/subscriptions.list', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.useautumn.com/v1/subscriptions.list"
payload = {
"customer_id": "cus_123",
"statuses": ["expired"]
}
headers = {
"x-api-version": "<x-api-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://api.useautumn.com/v1/subscriptions.list \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-api-version: <x-api-version>' \
--data '
{
"customer_id": "cus_123",
"statuses": [
"expired"
]
}
'{
"list": [
{
"id": "sub_123",
"plan_id": "pro",
"auto_enable": false,
"add_on": false,
"status": "expired",
"past_due": false,
"canceled_at": 1771409161016,
"expires_at": 1771409161016,
"trial_ends_at": null,
"started_at": 1768817161016,
"current_period_start": null,
"current_period_end": null,
"quantity": 1,
"scope": "customer",
"customer_id": "cus_123",
"entity_id": null,
"created_at": 1768817161016
}
],
"has_more": false,
"next_cursor": null
}
active and scheduled plans are returned; pass statuses: ["expired"] to see plans a customer no longer has.
past_due is a filter, not a status. A past-due plan is returned with status: "active" and past_due: true.limit rows (even zero) while has_more is true. Keep paginating until has_more is false.Body Parameters
Response
{
"list": [
{
"id": "sub_123",
"plan_id": "pro",
"auto_enable": false,
"add_on": false,
"status": "expired",
"past_due": false,
"canceled_at": 1771409161016,
"expires_at": 1771409161016,
"trial_ends_at": null,
"started_at": 1768817161016,
"current_period_start": null,
"current_period_end": null,
"quantity": 1,
"scope": "customer",
"customer_id": "cus_123",
"entity_id": null,
"created_at": 1768817161016
}
],
"has_more": false,
"next_cursor": null
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Body
Only return rows for this customer. Omit to list across every customer.
Only return rows for this entity. Requires customer_id.
Number of items to return. Default 50, hard ceiling 200.
1 <= x <= 200Opaque pagination cursor. Empty string (default) requests the first page; use next_cursor from a prior response for subsequent pages.
Statuses to include. Defaults to active and scheduled. past_due matches plans with overdue payments, which read as status active with past_due true.
1active, scheduled, past_due, expired Only return rows for this plan.
Response
OK
Rows on this page.
Show child attributes
Show child attributes
Whether more results exist. A page may hold fewer than limit items (even zero) while has_more is true, so paginate until has_more is false.
Pass as start_cursor to fetch the next page. Null when has_more is false.