#[LBG] India-subscription
1 messages · Page 1 of 1 (latest)
Hello, that setup_future_usage is specifically for payment mode. It means you are going to charge some amount immediately, but going to charge them more later on. While Setup is a little bit different when you set up $0 (don't charge anything) but will reuse the collected PaymentMethod to charge later
Hi @trim crown, ok so in setup mode, the off_session is automatically added to the payment method config ?
evt_1Ko0uELJLkeHRLt1QSEhn6it, it seems so 👍
yes
We let the possibility for the customer to update his payment_method (we are using credit cards only) via this Session in setup mode. We want to keep only one payment method for each customer, and the Session in setup mode adds a new payment method to the existing ones. Is there a way to directly REPLACE the payment_method existing by the new one ? Or do we have to delete the old one ourselves (after a webhook event like payment_method.attachedfor exemple) ?
Yeah great question and it's a common ask. For now you have to manage to set the new default payment method yourself.
If I set the payment method to be the default one on the customer object OR on the subscription object, does Stripe will retry with another payment method available on the customer object if subscription payment fails and Stripe retries ? Or Stripe will keep trying by the default one ?
Keep trying the default one AFAIK, sorry for the inconvenience
If there is no default pm_, neither on cus_ nor sub_, which pm_ will it use ?
(maybe there is always a default payment method? the last one setup ?)
If there is none, you wouldn't be able to create the Subscription at all. It will error like "no payment_method to be used"
For the priority
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over default_source. If neither are set, invoices will use the customer’s invoice_settings.default_payment_method or default_source.
Thanks
In order to set a default payment method on the customer object, should I focus on default_source or on invoice_settings.default_payment_method ?
invoice_settings.default_payment_method is better
If you are using payment methods created via the PaymentMethods API, see the invoice_settings.default_payment_method field instead.
Ok thanks
We are using Session in sub mode
Yeah, default_source is from a legacy API. It's there for compability for legacy users only