Sample - Stripe API
GET/v1/plans

List all plans

Lists plans in the account, optionally filtered by active state, creation time, or product. Use cursor parameters to paginate the results, which are returned in the list format defined for plans.

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

7 parameters
activebooleanoptional
Filters plans by whether they are active; pass `false` to list inactive plans.
createdobjectoptional
Filters plans by creation time, using a Unix timestamp or a range object with `gt`, `gte`, `lt`, or `lte`.
ending_beforestringoptional
A cursor identifying an object in the list; use it to retrieve the preceding page.
expandarray<string>optional
Specifies response fields to expand; each field name can contain up to 5000 characters.
limitintegeroptional
The number of plans to return. Must be between 1 and 100 and defaults to 10 when omitted.
productstringoptional
The ID of the product whose plans to return.
starting_afterstringoptional
A cursor identifying an object in the list; use it to retrieve the following page.

2 status codes
200Returns a list object containing plan objects and pagination metadata including `has_more` and the list URL.
dataarray<Plan>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.
defaultReturned when the request cannot be processed; the response contains an error object with a `type` field.
errorobjectrequired

Error handling

limit must be between 1 and 100 and defaults to 10 when omitted. created accepts a Unix timestamp or a range object, and product must identify the product whose plans you want to list.