#Benoît

1 messages · Page 1 of 1 (latest)

gloomy houndBOT
fast summit
naive cobalt
#

Thanks !

fast summit
#

I see what you mean 🙂 however there are no endpoints specific to pausing like /v1/subscriptions/:id/pause

So not sure if we can add a section there but will flag to our docs team just in case

naive cobalt
#

Ok, in fact i only check the API docs, my bad

fast summit
#

No worries!

naive cobalt
#

I read the Billing docs, but i haven't found my answers :/
And i don't know what kind of pause i must choose between "unable-provide-services" and "free", they seems to be the same

#

I just want my customer to be able to pause his subscription when he wants, and reactivate it when he wants. I know now that i must use subscriptions.update(), but that's all

fast summit
#

So pausing subscription doesn't really "stop"/"pause" the billing cycle
It only pauses payments collection. The subscription cycle will keep on going and depending on the behaviour you choose, the invoices will either be voided or kept as draft.

If you're providing a service to these customers and want to control the access/provisioning then you'd need to keep the above in mind.

So for example, if they've paid for the full month of July but decide to pause subscription the 10th then you need to decide if you want to provide them the services for the rest of the month OR do you want to pause now and consider the other 20/21 days as proration (which you can add as trial days when your customers decide to unpause).

naive cobalt
#

Ah, ok, that's not what i expected. Both case doesn't fit my need

#

My idea behind this, was to avoid my customer to cancel his subscription because it count on the churn rate (we are pareparing a fund rising and we would like to make our datas as clean as possible)

#

Maybe you would have an advice for me to make our datas clean ?

fast summit
#

Can you give me an example of how you see the flow working so I am on the same page?

naive cobalt
#

Ok

#

My user subscribe to a plan on august 1st. On august 10th, he pause his subscription. We he decide to reactive it on december 25th for example (but whatever the date is in fact), then his billing cycle is reset to january 14th (december 25th + his previous 20 unused days)

#

Don't know if i'm clear, sorry

fast summit
#

So the user's natural billing date would still stay 1st of the month, in which case they'll not be getting their 20 unused days by default.

If they resume on December 25th and assuming you're voiding the invoices when the collection is paused, the next invoice would be generated and will be due on January 1st.

If you want to give them their 20 unused days, then you'd need to move the billing cycle anchor by either adding 20 trial days OR setting the billing cycle date explicitly when you unpause the subscription

naive cobalt
#

Great ! If it's possible to set the billing cycle date explicitly to a specific date, it solve my problem it seems !

fast summit
naive cobalt
#

Great !

#

So it seems that this code will do the trick to reactivate the subscription :

const subscription = await stripe.subscriptions.update( '{{SUBSCRIPTION_ID}}', { pause_collection: { behavior: '', }, billing_cycle_anchor: 1611008505, } );

fast summit
naive cobalt
#

Yes of course, i will test this

#

Thank you for your answers !

fast summit
#

NP! 🙂 Happy to help