#NEWJOSSY
1 messages · Page 1 of 1 (latest)
The payment for the Invoice would fail: https://stripe.com/docs/billing/subscriptions/overview#requires-payment-method
Okay, if user attaches new payment method after deleting, what should we do? As I see from documentation Stripe will keep latest invoice as open
You will need to bring the customer back on-session and manually re-confirm the Payment Intent associated with the Invoice. It's outlined here: https://stripe.com/docs/billing/subscriptions/webhooks#payment-failures
Sorry need one more thing to clarify
I'll describe some cases
Case 1: User has 2 payment methods. We want user to set one payment method to set as primary or default. How can we achieve this?
Case 2: User has 1 payment method. User purchased a subscription with this payment method and then deleted it, and then added new one before his next payment date. How can we use that newly added payment method for subscription payment in upcoming invoice?
Case 1: User has 2 payment methods. We want user to set one payment method to set as primary or default. How can we achieve this?
You'd update this field on the Customer object: https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method
Case 2: User has 1 payment method. User purchased a subscription with this payment method and then deleted it, and then added new one before his next payment date. How can we use that newly added payment method for subscription payment in upcoming invoice?
You'd need to update the default PM on either the Subscription (https://stripe.com/docs/api/subscriptions/update#update_subscription-default_payment_method) or at the Customer level (as above).
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.
Thanks for clarifying