List all plans 

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

  • ending_beforestring

  • limitinteger

  • starting_afterstring

Returns

A dictionary with a data property that contains an array of up to limit plans, starting after plan starting_after. Each entry in the array is a separate plan object. If no more plans are available, the resulting array will be empty.

GET /v1/plans
curl -G https://api.stripe.com/v1/plans \
-u "sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:" \
-d limit=3
Response
{
"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"
}
]
}

Delete a plan 

Deleting plans means new subscribers can’t be added. Existing subscribers aren’t affected.

Parameters

No parameters.

Returns

An object with the deleted plan’s ID and a deleted flag upon success. Otherwise, this call raises an error, such as if the plan has already been deleted.

DELETE /v1/plans/:id
curl -X DELETE https://api.stripe.com/v1/plans/plan_NjpIbv3g3ZibnD \
-u "sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:"
Response
{
"id": "plan_NjpIbv3g3ZibnD",
"object": "plan",
"deleted": true
}

Metered Items v2

A MeteredItem represents any item that you bill customers for based on how much they use it, such as hourly cloud CPU usage or tokens generated by an AI service.

Custom Pricing Units v2