#gracine
1 messages · Page 1 of 1 (latest)
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
Can you share the subscription ID (sub_xxx)?
The customer does not have any payment method set
Because I used a 1 month free coupon to subscribe
ok
sub_1LhXlXDDSPupZJdPjxVnNpPb
The new invoice for that subscription is still in draft
The period ended on Oct 13th, so I advanced time to oct 14th expecting the subscription state to become past_due
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.
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
Did you made a change? I now see the subscription in past_due
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
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.
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
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.
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
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?
There are settings in the Stripe dashboard here https://dashboard.stripe.com/settings/billing/automatic
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
I would recommend testing with a new subscription
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 ?
Stripe doesn't sent any email in test mode.
So you cannot really test that in test mode.
We don't recommend doing tests in live mode. But yes this could work.
Is there a better way to test emails then ?