#Benoît

1 messages · Page 1 of 1 (latest)

knotty shadowBOT
west cape
#

We close threads after some time of inactivity so our list of threads doesn't get too long and unmaintainable

#

What's your question?

#

@plush harness Are you there? You said you needed the thread back open

plush harness
#

Sorry !

#

My problem was that i needed to resume a paused subscription, but reseting in the same time its billing cycle anchor. So, your collegue suggested me this :

Thinking out loud, I think you could make somethign like this work:

I believe when Jan 14th rolls around you should get a customer.subscription.updated webhook event and you can see if pause_collection was changed. If it was, you can reset the billing cycle anchor immediately
*

west cape
#

Ok yeah that makes sense. Did you have some follow up questions?

plush harness
#

Yes, i have a problem with my IDE when i try to set the resumes_at property

#

Can i show you my method ?

west cape
#

Sure. What's the error you're getting?

plush harness
#

I have to write this for my code to work :

(<Stripe.SubscriptionUpdateParams.PauseCollection>params.pause_collection).resumes_at = reactivateAtTimestamp;

west cape
#

So it does work if you specify the type like that?

#

Sorry not the best with typescript

plush harness
#

Yes, if i cast the PauseCollection object, it works

west cape
#

Not sure I understand the question

plush harness
#

To resume a subscription, i have to set pause_collection: ''

#

If i set it to pause_collection: '', how could i also set pause_collection.resumed_at in the same time ?

#

That's impossible

#

You see what i mean ?

west cape
#

You wouldn't do both. In the example you shared you'd just set pause_collection.resumed_at so that it resumes payment collection on that date

plush harness
#

Property 'behavior' is missing in type '{ resumes_at: number; }' but required in type 'PauseCollection'

#

I can't only set resumes_at, behavior is needed

#

If think i will have to find another way to do what i want

west cape
#

How did you pause the sub?

#

you should have already passed behavior

#

You'd just pass the same thing again

plush harness
#

pause_collection: { behavior: 'void', },

west cape
#

Yeah so just pass void again when setting resumes_at

plush harness
#

Ah ? Ok i will try

west cape
#

You wouldn't want to change the current pause behavior. Idea is to only set the date you want to resume

plush harness
#

ok, i try this

#

I will know if it worked in 1 minute

knotty shadowBOT
plush harness
#

I haven't finished my tests

#

@west cape unfortunately, the subscription.updated webhook has not been fired after the end of the resumes_at timestamp

fluid dirge
#

Hello! I'm taking over and catching up...

#

Can you give me the Subscription ID where you tried this?

plush harness
#

Hello ! Yes

#

That was this one : sub_1NYY0qAYYvne95SHKMaiYiDj
But i made another test since. would you like me to reproduce and warn you when the resumes_at has been done ?

fluid dirge
#

Let me take a look at this one, hang on...

plush harness
#

i saw you "idle" so i retried

fluid dirge
#

Oh, I always show as idle on Discord. 😅

plush harness
#

Here is my last events :

Subscription pause : evt_1NYxpLAYYvne95SH84Wx3jpV
Subscription resume : evt_1NYxuSAYYvne95SHrUA4yelZ

#

For the resume, i set a resumes_at after 2 minutes, so i was waiting a new subscription.updated webhook event to be triggered 2 minutes later, but there was no event fired, althought i see on the dashboard that the subscription pause has well been resumed

#

(qorry if i'm not clear :/)

fluid dirge
plush harness
#

You think 2 minutes is to few ?

fluid dirge
#

It's usually best to test with actual, real world durations in a test clock rather thank fake short durations in actual time when it comes to testing this kind of thing.

#

Yes.

plush harness
#

Ok

#

I try test clock

plush harness
#

Ok i made some tests, i see the update

fluid dirge
#

Meaning it worked?

plush harness
#

I don't really know :/

#

i make some more tests

plush harness
#

I doesn't worked like i would have expected

fluid dirge
#

How so?

plush harness
#

My need is : My customer subscribe to a plan on august 1st. He pause his subscription on august 10th (so he used only 10 days, and 20 days remains).
He resume his subscription on december 25th.
I wanted the billing cycle anchor to be reset to (december 25th + 20 unused days) = january 14th

#

In my test clock, i can see that an invoice has been paid on december 25th

fluid dirge
#

To clarify, will you know in advance when they resume their Subscription?

plush harness
#

I don't know when they will resume, but i will know how many days would normaly remains until his next invoice

#

So when he will resume, i will know the date i would like the billing cycle anchor to be reset

fluid dirge
plush harness
#

I don't want to cancel the subscription, because i need to limit the churn rate

fluid dirge
#

Not sure I understand? How the Subscription is handled is an implementation detail, how would it impact churn?

plush harness
#

Churn is impacted when the cancelation comes to its end, doesn't it ?

fluid dirge
#

I guess it depends on what you define as churn. As I understand it your ultimate goal is to allow people to put their subscriptions on hold for an undefined period of time, and then resume them later, where the amount of time they were on hold shifts the subscription period into the future. Is that correct?

plush harness
#

Yes but it must shift only the number of days between the resume date and the "normal" invoice date. In my example, althought the subscription is hold for several month, the shift must only be 20 days

fluid dirge
#

If I were implementing something like that I would cancel the current Subscription and then create a new one when they "resumed", but I wouldn't expose the fact that there were multiple Subscriptions involved to the customer, it would just be an implementation detail.

plush harness
#

You're talking of the churn rate ?

fluid dirge
#

I'm not sure what you're defining as the churn rate, to be honest.

#

How do you calculate the churn rate?

knotty shadowBOT
plush harness
#

In fact, we are preparing a fund raising, and we need to low our actual churn rate because it's to high (17%)
Until we are able to low it by "improving" our app, we must "artificialy" low it by some other ways.

When our customer cancel their subscriptions (after 1 to 3 months max), the churn rate is highly impacted.
I thought if we pause the subscription instead of cancel it, the churn rate would not be impacted because the customer is "artificialy" still a customer, you see ?

slim garnet
#

Hi, stepping in and catching up.

plush harness
#

hi 🙂

slim garnet
#

Yeah, helping you lower your churn rate is not something we can advise, you'd want to test these first to make sure that it fits your business use case. We're happy to help with any integration related questions.

plush harness
#

I know, that was not my default question

#

My need is : My customer subscribe to a plan on august 1st. He pause his subscription on august 10th (so he used only 10 days, and 20 days remains).
He resume his subscription on december 25th.
I want the billing cycle anchor to be reset to (december 25th + 20 unused days) = january 14th

slim garnet