#Himel
1 messages · Page 1 of 1 (latest)
I am looking for a way to test my subscription implementation. Let's say I have a subscription where the first payment went smoothly, but later on, there might be issues such as insufficient funds on the card or other problems that could cause payment failures. Now, how can I simulate this scenario for testing my subscription? Even if I try something like "stripe trigger invoice.payment_failed," that event doesn't involve an actual subscription. So, I'm having trouble understanding how to perform the test.
👋 happy to help
you can use test clocks
but with test clock how can i simulate failed payment with subscription i ddint find a single articale about it
with test clocks you can advance in time to the next billing cycle
i did manage to go through time to see my subscription but how can make failed! and that trigger my webhook so can be sure that user is getting notified in frontend
after the first invoice
you can attach this card (Decline after attaching) https://stripe.com/docs/testing#declined-payments to your customer and set it as the invoice_settings.default_payment_method