#gracine

1 messages · Page 1 of 1 (latest)

sick ospreyBOT
muted jackal
#

Hi there!

#

What is your question?

warped cobalt
#

Hi! I just made a video of my experimentation

#

I am expecting that when a monthly subscription period end is reached, if I have no payment method set, I expect the subscription to change to past_due

#

but it remains active

muted jackal
#

Can you share the subscription ID (sub_xxx)?

warped cobalt
#

The customer does not have any payment method set

#

Because I used a 1 month free coupon to subscribe

#

ok

#

sub_1LhXlXDDSPupZJdPjxVnNpPb

muted jackal
#

The new invoice for that subscription is still in draft

warped cobalt
#

The period ended on Oct 13th, so I advanced time to oct 14th expecting the subscription state to become past_due

muted jackal
#

When it will move to open (one hour after it was created), we will attemt a payment. This will fail (since there are no payment method), and the subscription should move to past_due.

warped cobalt
#

So the Test Clock is not really simulating reality then ? because in the clock I am way past 1 hout after period end

#

in the end what i am trying to do is simply to understand perfectly the order of events so our UI can react accordingly

muted jackal
#

Did you made a change? I now see the subscription in past_due

warped cobalt
#

So if I would have advance the clock 1 week more instead of 1 day after i would still end up in active state right

#

yes i just made a test, advancing 1 more day

#

its just that i was expecting to be past_due on 14th

#

instantly

#

we had weird behaviours last week where we had to advance several days like that to see the subscription change to past_due

muted jackal
#

So the Test Clock is not really simulating reality then ?
It should, please give me a few minutes to see if I can reproduce this.

warped cobalt
#

so in short, as soon as the period end is reached:

#

1 - Draft invoice is created

#

2 - Charge is attempted 1 hour after

#

3 - If it fails, the subscription changes to past due

#

and the above will happen whether I advance past the period end by 1 hour or 1 month

#

I think this is what confused me

#

I was expecting to become instantly past_due s

muted jackal
#

so in short, as soon as the period end is reached:
1 - Draft invoice is created
2 - Charge is attempted 1 hour after
3 - If it fails, the subscription changes to past due
Yes that's exactly how subscriptions work.

warped cobalt
#

since more than 24h past the period end

#

and my other question is, from the moment the subscription is past_due, what is the business logic of state change is the customer does not pay?

#

to become unpaid or cancelled

muted jackal
warped cobalt
#

Yes I played with it but the simulation differed from my expectations, hold on I will re-validate

#

Is is to late to change the config to test with my existing subscription

#

or i would need to create a new subscription

muted jackal
#

I would recommend testing with a new subscription

warped cobalt
#

ok

#

now it seems to work as expected

#

last week it was pretty random

#

One last question, i configured email to be sent for upcoming renewal and payment failed, I never receive email in my simulations, how can I test that ?

muted jackal
#

Stripe doesn't sent any email in test mode.

#

So you cannot really test that in test mode.

warped cobalt
#

ah

#

so the only way to test is to maybe use a coupon in production mode

muted jackal
#

We don't recommend doing tests in live mode. But yes this could work.

warped cobalt
#

Is there a better way to test emails then ?

muted jackal
#

No you can't really test emails. But you should be able to preview most emails form the Stripe dashboard.

#

For example for failed payments, click on the eye icon here to see the email