#wayo - invoice list
1 messages ยท Page 1 of 1 (latest)
Hi ๐
That should be an empty array if no invoices match the filter/search parameters you specify
How can I test fail a payment for a subscription based customer?
What do you mean by this?
We have many ways to test various payment failures. If you could be specific that will help me track down the right approach
Okay you want to test when a payment fails on a recurring invoice?
Yes
In that case you would update the invoice_settings.default_payment_method payment method on the Customer object to one of our Test payment methods that will fail when charged.
https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method
After I update the payment method, is there a way to manually try to take payment so I can test the failed payment scenario instantly?
The best way to do that with Subscriptions is to use Test Clocks.
https://stripe.com/docs/billing/testing/test-clocks
That way you can actually test how the subscription will behave. You update the Payment Method to one that fails, then advance time to when the next invoice will be generated.
I see. I will try that, thanks for your help! ๐