#vickygiyst

1 messages ยท Page 1 of 1 (latest)

warm daggerBOT
steep rune
#

Stripe allows multiple subscriptions to exist for the same customer, so yes it would be possible for your integration to do this

#

How are your subscriptions created now? Do you have a payment link or something set up?

amber cave
#

yes, i have products created on strip and i m using the price_id on web portal for purchase

#

can you tell me how to do that?

#

because under manage subscription, that renew subscription comes only when existing ends

steep rune
#

Can you tell me more about what you are trying to do? Are you asking how to allow them to purchase a new subscription?

amber cave
#

yes correct !. basically what i want is to cancel their exiting subscription if the limit exceeds . so that they can go to manage subscription page (provided from stripe this) and purchase a new one

#

if you can tell me, how can i cancel their subscription through api manually

steep rune
#

Stripe's Customer Portal cannot create new subscriptions though, so you would have to create a new Checkout Session for the user to get a new subscription

amber cave
#

you mean the cancel plan button on this page will not show- buy a new plan if i will cancel the subscription manually

formal nexus
#

Hello ๐Ÿ‘‹
Taking over as Pompey needs to step away soon

amber cave
#

Hi Hanzo

formal nexus
#

The cancel plan button should still be rendered on the customer portal page. I think what Pompey meant was that it can't start a new subscription when the customer cancels the old subscription via the portal

#

So you'd need to handle that using a Checkout Session OR via the API

#

does that clarify?

amber cave
#

no, what i m thinking is , if i will cancel the subscription through stripe API , then on customer portal page this cancel button should be changed to Renew Subscription

#

is it not the case

#

like tghis

formal nexus
#

Ah, yeah if you've already cancelled then the customer portal shouldn't show the "cancel" button anymore

amber cave
#

then what it would show instead of cancel plan, renew ?

#

like this screenshot

formal nexus
#

I think it depends on how exactly you're cancelling, the screenshot version seems like that the plan cancels at the end of current period vs immediate cancellation.

I'm trying to run a quick test but if you have some test subscriptions then you can test this out too. My understanding is that if you cancel immediately (and not at the period end) then there shouldn't be a subscription listed under current plan

#

My understanding is that if you cancel immediately (and not at the period end) then there shouldn't be a subscription listed under current plan
Yup that's exactly what happens.
First screenshot is when I have an active sub and the second is when I cancel it immediately. There's no current plan section on the page

#

Since I reused a test customer, its showing a past due invoice from before, in your case if the customer doesn't have any past due invoices then there won't be an outstanding section on the page either

amber cave
#

i have canceled this particular subscription and when i went to portal session, there's no button as renew subscription or buy subscription

formal nexus
#

That's correct. You can only cancel/upgrade/renew using Customer Portal.
You can't start new subscriptions all together

amber cave
#

oh okay !

#

so then stripe.checkout.sessions.create is the only option left?

#

to buy a new suscription

formal nexus
amber cave
#

i see ,this is directly creating a subscription without asking the payment details. so does that mean it will auto debit the money from the existing payment method?

formal nexus
#

Yes as long as it is set as default on the customer.invoice_settings.default_payment_method

amber cave
#

is it something which is controlled by developer or the customer?

formal nexus
#

You as a developer can set this by calling the API. Typically folks set this when a PaymentMethod is generated initially.

amber cave
#

is there any doc to refer this

formal nexus
#

hmm checking..