#Richard-Checkout

1 messages · Page 1 of 1 (latest)

quaint goblet
#

Hi there, so basically you want to update the subscription's default_payment_method with the one your customer use in the hosted invoice page?

young lintel
#

That would be great.

#

(I think there are other ways to achieve what I want, but that would work!)

quaint goblet
#

When your customer paid the invoice via hosted invoice page, Stripe will automatically create payment_method and attach it to the customer.

#

So you can listen to the invoice.paid event, set the subscription's default_payment_method with the payment_method that your customer uses to pay the invoice

young lintel
#

that is another option I hadn't considered

#

subscription[payment_settings][save_default_payment_method]"=on_subscription

works great, but you can't set it via checkout