#tymm - invoce
1 messages · Page 1 of 1 (latest)
Hi, i have confirmed the first paymentintent with a paymentmethod, and am expecting the subsequent recurring invoice to use the same paymentmethod, how do i achieve that?
So the invoice has failed because your customer doesn't have a default payment method and the subscription neither doesn't have a default payment method
yeah but i have added a payment method for the customer and used that to pay for the first invoice upon the creation of the subscription
to solve this, you have two choices:
- Set a default payment method to the customer: https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method
- Save the payment method as default to the susbscription when creating it https://stripe.com/docs/api/subscriptions/create#create_subscription-payment_settings-save_default_payment_method
Yes in indeed the customer has a payment method but it's not set as default
ok so if i set savedefaultpaymentmethod to ON_SUBSCRIPTION, will it update the customer's default payment method?
ok after reading the doc again i think it will be applied only to that subscription
lemme try it out
thanks
No, it wont update the customer's default payment method, it will apply only to the subscirption. You should set a default payment method to the customer as mentioned above https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method
yeah no because im letting customers to choose which card to use when they create new subscriptions, so im good with just applying the default on subscription-basis
OK so! Let me know if there's any follow-up Qs I can answer!