#DeputyCheese
1 messages · Page 1 of 1 (latest)
Hi there!
Yes you can test payments failures as mentioned here: https://stripe.com/docs/billing/testing#payment-failures
So the simplest way is to;
- Create a subscription with a shirt free trial (a few seconds)
- Use this test card 4000000000000341 (https://stripe.com/docs/testing#declined-payments) that can be attached to a customer but will decline
- So when the trial ends and the invoice is finalized, the payment will fail
Ah okay that makes sense, thanks 😄
I could also start a standard subscription with another card (that gets paid immediately) and then set the mentioned testcard to my account to trigger the fail event, right?
Yes, if you change the default payment method of the subscription/customer to a card that will fail, it should work.
Note that you can also use Test Clocks to more easily test subscriptions: https://stripe.com/docs/billing/testing/test-clocks
Okay thanks, got it.