#_obo_

1 messages · Page 1 of 1 (latest)

hollow trailBOT
eternal moth
#

There's no such thing as a general default for the customer for one-off payments

#

You can set a default for invoice payments using invoice_settings[default_payment_method] but for Payment Intents that you manage yourself you always need to specify a saved payment method by id

glacial cobalt
#

@eternal moth We'll be using this payment method for a monthly subscription

eternal moth
#

Ok, then you can use that customer setting

glacial cobalt
#

basically we'll be creating the payment method via payment elements react component

#

and want it to automatically be set as the default payment method for the customer

glacial cobalt
#

can we not do this with a singular action? you're saying we have to first create the payment method and then update the customer in a second follow-up request?

eternal moth
#

yes, you need to make an api call to set that on the customer explicitly, there is currently no way to do that otherwise

glacial cobalt
#

Is this the recommended path then for subscriptions?

#

or do we not really need a "Default" payment method

#

(basically am I trying to do something weird and should actually be handling this whole flow differently)

eternal moth
#

It's not weird, no, you're trying to set a customer default for all subscriptions and invoices that dont specify a payment method themselves

#

When you set up the subscription, if collecting a new payment method then, you can have it set automatically on the subscription (subscription.default_payment_method) but not the customer
https://stripe.com/docs/api/subscriptions/create?lang=curl#create_subscription-payment_settings-save_default_payment_method

glacial cobalt
#

good to know. Thank you