#CGI Garfield
1 messages · Page 1 of 1 (latest)
👋 Thanks for reaching out
There are two places where you can set default payment method for payments:
Does the affected Customer has a default payment method in their invoice settings ?
I'm not 100% on how you look at the invoice settings, but I can see that they do have a default_payment_method via the billing portal
as you can see in the UI and the network response
but as you can see a default_payment_method has been set up for the subscription too
I tested this with a test clock and in the next billing cycle the default_payment_method on the sub takes priority, which kind of makes sense. All I'm really looking to do:
Have the user set the default in the billing portal; have a mechanism for the user to upgrade their sub and be billed immediately at an alternative payment method, but not change the payment method that will be billed in the future on subscription renewal
OK I see, thanks for the clarifications. First, do you want to have proration when you update the Subscription ?
But in all case you need to do this using APIs not via Customer Portal.
You need to update the Subscription with a proration behavior
https://stripe.com/docs/api/subscriptions/update#update_subscription-proration_behavior
Then you invoice/charge the customer for that amount using other PaymentMehtod.
Finally, for the next billing period you add to the customer 100% discount so that he won't be billed twice.
I am actually using the API to handle the update of the subscription at the moment. The proration behaviour is set to ALWAYS_INVOICE
which obviously bills the customer at their default payment method immediately
how do I provide the other payment method in the API request to update the subscription?
If so, no you can't unfortunately because this is handled automatically. You can update the default payment method before updating the Subscription with the other PaymentMethod. Once the prorated invoice is charged, you update back the default payment with the previous one.
so update the customers default payment method, perform the subscription update, then change the customer default payment method back to what it was?
Yes
That's perfect, thank you