#JohnTheFrog
1 messages · Page 1 of 1 (latest)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Our system creates a separate price for every customer so that every customer can be handled individually.
The point is that some customers may want to move from yearly price to monthly price; API docs seems to not support that kind of price change
I see. You will need to update the subscription with the new monthly price.
Not update the price itself
You can use the items.price_data instead of the price so you don't have to create each price individually: https://stripe.com/docs/api/subscriptions/update#update_subscription-items-price_data
Don't forget to pass items.id to update the items, not add a new one.
Thanks, looks like this is what I need
One more question if I can ask
If customer paid for yearly subscription upfront, what is the default stripe behaviour if I move it to monthly in a middle of the period?
They will be credited and the credit applied to every new invoice until it's exhausted: https://stripe.com/docs/billing/customer/balance