#fdc8cd4cff2c19e0d1022e78481ddf36

1 messages · Page 1 of 1 (latest)

merry juncoBOT
vague valley
#

Which webhook can I expect after the trial is over, if the payment doesnt come?
invoice.payment_failed for the payment on the Invoice that's created at the start of the next period. Also customer.subscription.updated.

  • Which webhook can I expect if payment (1) would be succesful and it would fail the next month?
    invoice.payment_failed on the Invoice at the start of the relevant month
cerulean minnow
#

So if payment fails, user can try the payment again. When Stripe changes the status of the subscription to ie past_due, I will just reflect it in my application.

Is there any way I can simulate that the first payment went through and the second one (with saved payment method) did not?

#

ie some card with balance?

vague valley
cerulean minnow
#

Alright, thanks!

#

Hmm it seems like such card is being declined

vague valley
#

oh yeah I forgot you were doing an initial payment, confused you with a different thread

#

you want to use 4242424242424242 for the first payment, and then later replace the customer's saved card with 4000000000000341 (you could do it in the Dashboard easily enough I think) before the next billing period or before advancing your TestClock

cerulean minnow
#

How can I simulate the event after 1 month with TestClock?

#

I have created a clock with 1 month in advance and I would like to apply such clock to the subscription I just created

#

Or I need to create a customer within such clock, do a checkout session for him, create a subscription and change the date?

vague valley
cerulean minnow
#

I would need to create such customer under a connected account tho

vague valley
#

if you're using Connect with Direct Charges, then yes

#

same with the TestClock too, that would have to be created on the connected account

cerulean minnow
#

Maybe it will work the same way either its on the connected account or its on the main platform account?

vague valley
#

I don't think it would no.

#

if you try to pass a test_clock object that you create on the platform, to a Customer on a connected account, you'd get a "No such test_clock" error

#

if you're using Connect with Direct Charges then all involved objects (Customer/CheckoutSession/TestClock etc) have to be created on the connected account, via the Stripe-Account header

cerulean minnow
#

All I am trying to achieve right now is to see if the payment fails if Stripe will update the subscription immediately to past due (if the first payment went through)

#

Seems like customer.subscription.updated arrived and the subscription is marked as past_due, therefore such behavior can be expected in the live mode aswell?

vague valley
#

yes

cerulean minnow
#

However it seems like I did not receive any webhooks from the test clocks to my application, not sure if this is desired behavior?

#

I could only see such events in the subscription detail in the test clock tab

vague valley
#

if you're using Connect you need to have Connect webhook endpoints so you recieve events on a connected account

merry juncoBOT