#usamarashad
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- usamarashad-webhooks, 10 hours ago, 16 messages
- usamarashad, 18 hours ago, 4 messages
- usamarashad, 19 hours ago, 8 messages
- usamarashad, 22 hours ago, 6 messages
- usamarashad, 23 hours ago, 11 messages
- usamarashad, 3 days ago, 34 messages
Once the invoice payment is failed, invoice.payment_failed event will be sent. Your system should listen to invoice.payment_failed event, then:
- Retrieve the payment intent of the invoice
- Update the payment intent to use
setup_future_usage: 'off_session' - Use the client secret of this payment intent to collect the new payment method
- Upon successful invoice payment in Step 3, set the
default_payment_methodof the subscription to the saved payment method in Step 3
You shouldn't need to create a new payment intent. Existing payment intent on the unpaid invoice should be used
yeah. I thought so. Thanks for filling the gap.
and how about creating a procedure where the customer can change the card info manually for whatever reason. Same procedure right ?
But the trigger will be a button on the webpage rather than the webhook.
If the customer would like to change the payment method at any time, your system can use Setup Intent to collect the new payment method and set it to the subscription's default_payment_method: https://stripe.com/docs/payments/save-and-reuse
ok noted. let me try this out
thanks
One question. How can I trigger a failed invoice payment webhook?
for testing purposes?
Hi @short thistle I'm taking over this thread
Sure