#Wasabi-default-payment

1 messages · Page 1 of 1 (latest)

lucid patio
#

Yes, subscriptions will use their default payment method or the customer's default payment method if you set that setting

agile nacelle
#

Thanks @lucid patio . To confirm, a SetupIntent is not required to continue to charge a customer when updating a payment on a subscription as described above?

#

I want to account for the scenario where a customer who has an active subscription wants to change the credit card on their subscription so that the next time they are billed (X months from now), their new credit card will be charged.
In steps #1-4 in the question, I am trying to create a brand new payment method (not update an existing one) and set it as the default payment method on both the customer and subscription object. Is this a valid approach for changing the credit card on subscription so that when it’s time to renew the subscription, the user is billed with the new payment method instead of the original one?

lucid patio
#

I think that should work. And how are you collecting the details and making the call to create the PaymentMethod in step one?

agile nacelle
#

I think the current plan is to create card token, create customer, create paymentIntent, create subscription - this for the new subscription

#

Do you see any issues with step 1-4 above given how the new sub will be created?

cold chasm
#

catching up here one sec

agile nacelle
#

thank you @cold chasm

cold chasm
#

@agile nacelle why do you create a PaymentIntent? when you already create a Subscription?

agile nacelle
#

To collect a payment?

cold chasm
#

yeah but the Subscription does that for you too

#

like so far you're talking about Subscription so why would you manually create a one time payment via a PaymentIntent

agile nacelle
#

thank you

#

that make sense.

agile nacelle
dapper pagoda
#

Hello! If you want to update the Payment Method for a Customer with an existing Subscription you should use a Setup Intent to set up the new Payment Method for future use and attach it to the Customer, then set that new Payment Method as the Customer's invoice_settings.default_payment_method so it's used for future Invoices by default.

agile nacelle
#

I totally agreed with you. Are the steps above not valid to update a sub payment?

dapper pagoda
#

Update the default_payment_method on the subscription with POST

You can do this if you wish, but it may be redundant if you're also using invoice_settings.default_payment_method on the Customer as well.

agile nacelle
#

@dapper pagoda I want to recommend SetupIntent. Can you help me understand the tradeoffs if going with the payment method route? Why should user not use PaymentMethod to update subscription payment?

agile nacelle
frigid oyster