#[LBG] India-subscription

1 messages · Page 1 of 1 (latest)

trim crown
#

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

gilded field
#

Hi @trim crown, ok so in setup mode, the off_session is automatically added to the payment method config ?

#

evt_1Ko0uELJLkeHRLt1QSEhn6it, it seems so 👍

trim crown
#

yes

gilded field
#

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) ?

trim crown
#

Yeah great question and it's a common ask. For now you have to manage to set the new default payment method yourself.

gilded field
#

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 ?

trim crown
#

Keep trying the default one AFAIK, sorry for the inconvenience

gilded field
#

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 ?)

trim crown
#

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

#

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.

gilded field
#

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 ?

trim crown
#

invoice_settings.default_payment_method is better

gilded field
#

If you are using payment methods created via the PaymentMethods API, see the invoice_settings.default_payment_method field instead.

#

Ok thanks

gilded field
trim crown
#

Yeah, default_source is from a legacy API. It's there for compability for legacy users only

gilded field
#

Great thanks

#

Does it also apply for the subscription object ?

#

We should use default_payment_method