Returns a list of your plans.
Parameters
- activeboolean
Only return plans that are active or inactive (e.g., pass
false
to list all inactive plans). - productstring
Only return plans for the given product.
More parameters
- createdobject
A filter on the list, based on the object
created
field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.- created.
gtinteger Minimum value to filter by (exclusive)
- created.
gteinteger Minimum value to filter by (inclusive)
- created.
ltinteger Maximum value to filter by (exclusive)
- created.
lteinteger Maximum value to filter by (inclusive)
- ending_
beforestring A cursor for use in pagination.
ending_
is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting withbefore obj_
, your subsequent call can includebar ending_
in order to fetch the previous page of the list.before=obj_ bar - limitinteger
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
- starting_
afterstring A cursor for use in pagination.
starting_
is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending withafter obj_
, your subsequent call can includefoo starting_
in order to fetch the next page of the list.after=obj_ foo
Returns
A object with a data
property that contains an array of up to limit
plans, starting after plan starting_
. Each entry in the array is a separate plan object. If no more plans are available, the resulting array will be empty.
{ "object": "list", "url": "/v1/plans", "has_more": false, "data": [ { "id": "plan_NjpIbv3g3ZibnD", "object": "plan", "active": true, "amount": 1200, "amount_decimal": "1200", "billing_scheme": "per_unit", "created": 1681851647, "currency": "usd", "interval": "month", "interval_count": 1, "livemode": false, "metadata": {}, "nickname": null, "product": "prod_NjpI7DbZx6AlWQ", "tiers_mode": null, "transform_usage": null, "trial_period_days": null, "usage_type": "licensed" } ]}