#dingkai031
1 messages · Page 1 of 1 (latest)
hello! what you want is pretty complex and is not achievable using Dashboard settings. It's not impossible, but you need to implement your own logic to do everything that you want
yes, I'm understand. I just need the flow, Im quite confuse with the webhooks that I need to listen
i think this list might be helpful : https://stripe.com/docs/billing/subscriptions/webhooks#events
- you'll probably want to listen for
invoice.payment_failed - to pause collection : https://stripe.com/docs/billing/subscriptions/pause, or alternatively stop autoadvance : https://stripe.com/docs/api/invoices/update#update_invoice-auto_advance to handle everything via your own logic
- understanding invoice statuses and transitions : https://stripe.com/docs/invoicing/integration/workflow-transitions
- to pay an invoice : https://stripe.com/docs/api/invoices/pay
Hello I got another question, how to simulate a failed second invoice in test mode?
As example, a customer paid the first subscription cycle (the initial one). Then the next month, when stripe going to charge again.. it will fail.
Can I achieve it using test cards? or maybe with other method?
you will need to use a test card that succeeds first, then later update the card to : 4000000000000341
listed here : https://stripe.com/docs/testing
understand, thank you