#rstocker99

1 messages · Page 1 of 1 (latest)

haughty spindleBOT
grave pecan
#

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

meager quarry
#

Ok, thanks. I'll give that a try.

grave pecan
#

No problem! Happy to help 😄

meager quarry
#

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.

grave pecan
#

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

meager quarry
#

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?

grave pecan
#

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

meager quarry
#

Ok so:

  1. Create clock and customer
  2. Add sub with trial that ends on Aug 7th
  3. Look at 0 invoice to get time
  4. Adavance clock to Aug 7th time from 3 + 1 hour
  5. Now sub should show as past due?
grave pecan
#

Can you share the subscription ID (sub_xxx)?

meager quarry
#

Sadly no b/c I just ended the sim. I'll retry and share.

#

sub_1NcJTtCZ3jbVsfoGDqEA7RMf

#

^^ sub

grave pecan
#

Above subscription is active as it's still in trial status

meager quarry
#

I've only gone to setup 2 above, until I hear from you so I don't mess anything up :).

grave pecan
#

Yup! That looks right. You can advance to Aug 7 for invoice creation, then advance again to an hour after for invoice finalisation

meager quarry
#

Ok, I've moved it to Aug 7th at 7:46, but it stills shows a trialling.

#

Maybe it needs to be 7:47?

grave pecan
#

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

meager quarry
#

Ok, I advanced to 7:47 and I got a new invoice in draft. So no advance to 8:47 right?

grave pecan
#

Yup!

meager quarry
#

Success!

grave pecan
#

Yay! The subscription status in past_due now

meager quarry
#

Thanks for the help. Appricate it!