Sample - Stripe API
GET/v1/customers/{customer}/subscriptions

List active customer subscriptions

Lists the active subscriptions belonging to a customer. Use cursor parameters to page through subscriptions beyond the 10 most recent items available on the customer object, and use limit to control page size.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

5 parameters
customerstringrequired
The identifier of the customer whose active subscriptions to list. Maximum 5000 characters.
ending_beforestringoptional
A pagination cursor identifying an object before the page you want to retrieve. Maximum 5000 characters.
expandarray<string>optional
Fields to expand in the response. Each entry can be no longer than 5000 characters.
limitintegeroptional
The number of subscriptions to return. Must be between 1 and 100; defaults to 10 when omitted.
starting_afterstringoptional
A pagination cursor identifying an object after the page you want to retrieve. Maximum 5000 characters.

2 status codes
200Returns a subscription list containing `data`, a `has_more` indicator, the list object type, and the list URL.
dataarray<Subscription>required
Details about each object.
has_morebooleanrequired
True if this list has another page of items after this one that can be fetched.
objectstringrequired
String representing the object's type. Objects of the same type share the same value. Always has the value `list`.
Allowed:list
urlstringrequired
The URL where this list can be accessed.
defaultError response.
errorobjectrequired

Error handling

customer must identify the customer whose subscriptions you want to list. limit must be between 1 and 100, and ending_before, starting_after, and each expand entry must be no longer than 5000 characters.