#Jasuno
1 messages · Page 1 of 1 (latest)
You can't do that after payment -- the payment method is one time use if not attached
Instead, you need to revise your payment intents to include future use setup:
setup_future_usage=off_session (or on_session)
so do i need to attrach it to the customer first?
using that parameter will attach the payment method during the payment flow
ok great but if i want to ask the customer if they want to say their card info first, then i would have to attach it before hand
With the card element yes, you'd need to use createPaymentMethod to get a payment method to send to your own backend to achieve that
then use that with the payment intent during confirmation
that may take a bit longer, thanks that all help
Ooooh
one more question
once i attach the payment method do the customer, and set subscriptions,collection_method to charge_automatically, will that change that payment method or do i also have to update subscriptions.default_payment_method?
You can set the subscription[default_payment_method] or the customer invoice_settings[default_payment_method] depending on whether you want it to be used for all invoices or just that subscription