#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, 2 days ago, 34 messages
At the moment I have created the subscription as suggested to me beforehand. The subscription status shows "Paid".
Now,I would like to know what actions should I take in-case a customer's payment method is declined on the next due date of the subscriptions.
I am using the Stripe API for integration.
If the payment fails for an invoice, Stripe will not send email to the customer. An invoice.paid event will be sent to inform about the payment failure and you will bring the customer back to collect the new payment method. Here's the guide to handle such scenario: https://stripe.com/docs/billing/subscriptions/webhooks#payment-failures
Noted. Do I use the PaymentIntents API or the SetupIntent API to create a flow to collect new payments ?
Secondly, how can I use a previously stored card, which was supplied by a customer for a one-time payment, and re-use that card for a subscription?
The steps will be:
- Update the Payment Intent of the latest invoice to save the new payment method with
setup_future_usage: 'off_session': https://stripe.com/docs/api/payment_intents/update#update_payment_intent-setup_future_usage - Use Payment Intent to collect the payment method details
- After the payment method details is collected, the update the
default_payment_methodof the subscription: https://stripe.com/docs/api/subscriptions/update#update_subscription-default_payment_method
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Secondly, how can I use a previously stored card, which was supplied by a customer for a one-time payment, and re-use that card for a subscription?
If the payment method has been saved, it can be updated to thedefault_payment_methodof the subscription as well