#kirito
1 messages · Page 1 of 1 (latest)
Hi there, if I understand correctly, you are saying that the subscription's default_payment_method is gone after changing it from free to paid plan?
yeah
Can you share with me the subscription ID?
I don't see this subscription has been set with a default_payment_method before.
Emm, the update just worked then without even having a payment method, is there a method to make it charge imedeatly?
You still need to set a default_payment_method so that Stripe can charge the customer automatically.
From the logs, I don't see any request to set a default_payment_method for this subscription.
For completeness, if default_payment_method is not set, Stripe will use the customer’s invoice_settings.default_payment_method or default_source to pay inovices generated by the subscription
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
All client in my website start with a free subscription, then they can chose to pass a paid one, at that moment I need to update their payment method then update the subscription, or can I update both a the same time ?
It's up to you, you can collect a payment method from customer when they sign up, or prompt them to set up one when the trial is about to end.
How can I do the second?
The problem is I use subscription schedule to manage the subscription and I'm not even sure if I can directly update the subscription like that
Hey! Taking over for my colleague. Let me catch up.
You can update the Subscription Schedule and the default payment method with the same request:
https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-default_settings-default_payment_method
I invite you to test this scenario using Stripe Test Clocks:
https://stripe.com/docs/billing/testing/test-clocks
OK, thank you, but normally the subscription schedule take more than hour the charge to be made, how can charge the user immediately?
Yes, Stripe finalize and send the invoice in 1 hour in case you want to edit it. You can force this behavior by finalizing and paying the invoice via API
https://stripe.com/docs/api/invoices/finalize
https://stripe.com/docs/api/invoices/pay
Thank you so much
You're welcome!