Creating Plan

34 views
Skip to first unread message

Rui Fernandes

unread,
Nov 20, 2017, 5:57:34 PM11/20/17
to Stripe API Discussion
Good evening,

If I create via API a Stripe plan, and then I create it again, will it remain equal as it was, or will it be deleted disconfigurating my customers previous plans?

I ask this because I can't get a relevant answer from my testing mode.

Kind regards,

Kepler

Jonathan Lomas

unread,
Nov 20, 2017, 6:02:55 PM11/20/17
to api-d...@lists.stripe.com
Hi Kepler!

If you create a Stripe Plan, and then create Subscriptions to that Plan, and then delete the Plan, the already-subscribed Customers will remain on the originally-specified Plan.

If you then create it again with the same ID, but with different parameters, the previously subscribed Customers will still be on the previously created Plan - with the previous parameters - but any new Customers would go on the new Plan.

For example:

- You create `awesome-plan` at $5/mo;
- 50 Customers subscribe to `awesome-plan` at $5/mo;

- You delete the plan, but all 50 Customers stay subscribed at $5/mo;
- The 50 Customers that had already described are still on the `awesome-plan`, and still paying $5/mo;

- You recreate `awesome-plan` but at $10/mo;
- Any new Customers that sign up for `awesome-plan` will be paying $10/mo, but the original 50 Customers will remain at $5/mo for as long as their Subscription is active;

Hopefully that clears things up a bit!

Cheers,

Jonathan

--
You received this message because you are subscribed to the Google Groups "Stripe API Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to api-discuss...@lists.stripe.com.
To post to this group, send email to api-d...@lists.stripe.com.
Visit this group at https://groups.google.com/a/lists.stripe.com/group/api-discuss/.

Rui Fernandes

unread,
Nov 21, 2017, 3:32:53 AM11/21/17
to api-d...@lists.stripe.com
Hi

Definetly clears things up :) But what if I create a plan and then - without deleting it - create it again with the same id? Will it be erased or stay equal? Or will I get an error?

Kid regards

Kepler

Sem vírus. www.avast.com

On Mon, Nov 20, 2017 at 11:02 PM, 'Jonathan Lomas' via Stripe API Discussion <api-d...@lists.stripe.com> wrote:
Hi Kepler!

If you create a Stripe Plan, and then create Subscriptions to that Plan, and then delete the Plan, the already-subscribed Customers will remain on the originally-specified Plan.

If you then create it again with the same ID, but with different parameters, the previously subscribed Customers will still be on the previously created Plan - with the previous parameters - but any new Customers would go on the new Plan.

For example:

- You create `awesome-plan` at $5/mo;
- 50 Customers subscribe to `awesome-plan` at $5/mo;

- You delete the plan, but all 50 Customers stay subscribed at $5/mo;
- The 50 Customers that had already described are still on the `awesome-plan`, and still paying $5/mo;

- You recreate `awesome-plan` but at $10/mo;
- Any new Customers that sign up for `awesome-plan` will be paying $10/mo, but the original 50 Customers will remain at $5/mo for as long as their Subscription is active;

Hopefully that clears things up a bit!

Cheers,

Jonathan
On Mon, Nov 20, 2017 at 2:57 PM Rui Fernandes <rui.k...@gmail.com> wrote:
Good evening,

If I create via API a Stripe plan, and then I create it again, will it remain equal as it was, or will it be deleted disconfigurating my customers previous plans?

I ask this because I can't get a relevant answer from my testing mode.

Kind regards,

Kepler

--
You received this message because you are subscribed to the Google Groups "Stripe API Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to api-discuss+unsubscribe@lists.stripe.com.

To post to this group, send email to api-d...@lists.stripe.com.
Visit this group at https://groups.google.com/a/lists.stripe.com/group/api-discuss/.

--
You received this message because you are subscribed to the Google Groups "Stripe API Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to api-discuss+unsubscribe@lists.stripe.com.

To post to this group, send email to api-d...@lists.stripe.com.
Visit this group at https://groups.google.com/a/lists.stripe.com/group/api-discuss/.



--

Rui Miguel Fernandes
Porto - Portugal

Websites:

Novo Milénio - Harmonice Mundi (A Harmonia dos Mundos)
http://novomilenio.eu

Cosmos - Portal Interactivo de Astronomia / Interactive Gate of Astronomy
http://cosmos.pt

Olivier Bellone

unread,
Nov 21, 2017, 3:37:06 AM11/21/17
to api-d...@lists.stripe.com
Hey Kepler,

If you try to create a plan while a plan with the same ID already exists, then the API would return an error. You can easily test this in live mode:

  -u $STRIPE_SECRET_KEY: \
  -d id=awesome-plan \
  -d name="My Awesome Plan" \
  -d amount=500 \
  -d currency=usd \
  -d interval=month
{
  "id": "awesome-plan",
  "object": "plan",
  ...
}

  -u $STRIPE_SECRET_KEY: \
  -d id=awesome-plan \
  -d name="My New Awesome Plan" \
  -d amount=1000 \
  -d currency=usd \
  -d interval=month
{
  "error": {
    "type": "invalid_request_error",
    "message": "Plan already exists."
  }
}

Hope this helps!

Best,
Olivier

To unsubscribe from this group and stop receiving emails from it, send an email to api-discuss...@lists.stripe.com.

To post to this group, send email to api-d...@lists.stripe.com.
Visit this group at https://groups.google.com/a/lists.stripe.com/group/api-discuss/.

--
You received this message because you are subscribed to the Google Groups "Stripe API Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to api-discuss...@lists.stripe.com.

To post to this group, send email to api-d...@lists.stripe.com.
Visit this group at https://groups.google.com/a/lists.stripe.com/group/api-discuss/.
--

Rui Miguel Fernandes
Porto - Portugal

Websites:

Novo Milénio - Harmonice Mundi (A Harmonia dos Mundos)
http://novomilenio.eu

Cosmos - Portal Interactivo de Astronomia / Interactive Gate of Astronomy
http://cosmos.pt

--
You received this message because you are subscribed to the Google Groups "Stripe API Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to api-discuss...@lists.stripe.com.

Olivier Bellone

unread,
Nov 21, 2017, 3:38:36 AM11/21/17
to api-d...@lists.stripe.com
Oops! I obviously meant "You can easily test this in test mode", not "in live mode".

Andre Marcelo-Tanner

unread,
Nov 21, 2017, 3:40:11 AM11/21/17
to api-d...@lists.stripe.com
This is magic, i wish i knew about this sooner. Pls document this quirk. Ive been toying with coupons and discounts to get subscriptions with different prices to use the same plan

Olivier Bellone

unread,
Nov 21, 2017, 3:41:33 AM11/21/17
to api-d...@lists.stripe.com
Hey Andre,


> Deleting a plan does not affect any existing subscribers of that plan, but new customers cannot be subscribed to it.

Best,
Olivier
Reply all
Reply to author
Forward
0 new messages