#rstocker99
1 messages · Page 1 of 1 (latest)
You can create a subscription with trial and use 4000000000000341 (Decline after attaching): https://stripe.com/docs/testing#declined-payments
When you advance the test clock after the trial period, the payment will then be failed that led the subscription to past due status
Ok, thanks. I'll give that a try.
No problem! Happy to help 😄
Ok, I tried that but it didn't leave the subscription in past due. Instead the subscription ended up in active and I don't see any failed payments.
Can you advance the time to one hour later as the latest invoice is still in draft status, but not yet finalised and had payment failure
I created a sub and set the trial for one day i.e. Aug 7th. Are you saying I should look at the time it ends say Aug 7th at 7pm and set the clock to Aug 7th at 8pm?
Does it seem weird that the sub would end up active even though the card gets declined?
The subscription will be active since it's still in trial. It'll only become past due when the non-zero invoice has payment failures. The invoice will only be finalised one hour after creation, so that automatic payment will kick in
From the screenshot you shared, the payment isn't debited yet as the non-zero invoice isn't finalised
Ok so:
- Create clock and customer
- Add sub with trial that ends on Aug 7th
- Look at 0 invoice to get time
- Adavance clock to Aug 7th time from 3 + 1 hour
- Now sub should show as past due?
Can you share the subscription ID (sub_xxx)?
Sadly no b/c I just ended the sim. I'll retry and share.
sub_1NcJTtCZ3jbVsfoGDqEA7RMf
^^ sub
Above subscription is active as it's still in trial status
I've only gone to setup 2 above, until I hear from you so I don't mess anything up :).
Yup! That looks right. You can advance to Aug 7 for invoice creation, then advance again to an hour after for invoice finalisation
Ok, I've moved it to Aug 7th at 7:46, but it stills shows a trialling.
Maybe it needs to be 7:47?
You may advance to 8pm, so that we don't have to care about the few seconds difference for advancing
Then advance to 9pm again after creating the invoice successfully
Ok, I advanced to 7:47 and I got a new invoice in draft. So no advance to 8:47 right?
Yup!
Success!
Yay! The subscription status in past_due now
Thanks for the help. Appricate it!