#DramaLlama-set-default-pm

1 messages · Page 1 of 1 (latest)

storm shoal
#

Hey! It all depends on how you created the Setup Intent. If you pass the customer parameter, the resulting PM will be attached

dapper wraith
#

aha, if I already have a subscription and add a payment method and send in the customer parameter so it becomes customer standard. If the subscription then does not have any standard payment at all, will it then be used for payments on the subscription

#

basically, will it go up the tree to customer and check for default PM?

#

Ah wait I misread your answer upi kist said it will be attached, so I need a second api call

#

Then my question instead is. Can I get a callback webhook when a setup intent is successful and there now exists a new PM

storm shoal
# dapper wraith basically, will it go up the tree to customer and check for default PM?

Yes, if there's no default_payment_method set on the Subscription then it'll fallback to the invoice_settings.default_payment_method on the associated Customer object. Alluded to here: https://stripe.com/docs/api/subscriptions/object#subscription_object-default_payment_method

storm shoal
dapper wraith
#

Excellent, thanks for all the help!
Have a great day!

storm shoal
#

Np!