Stripe | Financial Infrastructure to Grow Your Revenue

Stripe | Financial Infrastructure to Grow Your Revenue

4466 articles

Update a plan


Update a plan

POST / v1 / plans /:id

Updates the specified plan by setting the values of the parameters passed. Any parameters not provided are left unchanged. By design, you cannot change a plan’s ID, amount, currency, or billing cycle.

Parameters

  • active boolean Whether the plan is currently available for new subscriptions.
  • metadata map Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.
  • nickname string A brief description of the plan, hidden from customers.

More parameters

  • product string
  • trial _ period _ days integer

Returns

The updated plan object is returned upon success. Otherwise, this call raises an error.

Response

{ "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": { "order_id": "6735" }, "nickname": null, "product": "prod_NjpI7DbZx6AlWQ", "tiers_mode": null, "transform_usage": null, "trial_period_days": null, "usage_type": "licensed"}

Retrieve a plan

GET / v1 / plans /:id

Retrieves the plan with the given ID.

Parameters

No parameters.

Returns

Returns a plan if a valid plan ID was provided. Raises an error otherwise.

Response

{ "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"}

List all plans

GET / v1 / plans

Returns a list of your plans.

Parameters

  • active boolean Only return plans that are active or inactive (e.g., pass false to list all inactive plans).
  • product string Only return plans for the given product.

More parameters

  • created object
  • ending _ before string
  • limit integer
  • starting _ after string

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.

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" } ]}
Last verified 2026-09-24

Is this helpful?