#ravisankar_api
1 messages · Page 1 of 1 (latest)
👋 Welcome to your new thread!
⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1366339347275845704
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Not sure what specific issue it is you're describing?
Tried update update subscription option, but its should not move to checkout page
Like, what does this mean? Do you see an error? What doesn't behave as you expect?
Update subscription API available , but the problem is should not move to checkout page for new subscription, The payment are adjustable in next billing cycle
What is 'checkout page'?
Payment page
OK, what 'payment page' is that? What APIs/UIs are you using?
Can you provide an example of what it is you're trying to do? An API request or something, I'm not understanding the issue
Required prorate calculation when user move to new subscription without cancel the exist one ,. I will cancel with existing subscription when the checkout completed webhook
We don't support calculating proration between different subscriptions. You'd need to do that manually
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Any formula is there ? how accurate is this
We don't have a formula, no
How to calculate manually? what is the suggested option stripe side
You'd probably need to apply line item(s) to the invoice to reflect the prorated amounts that you'd have to calculate yourself
- Manually Calculate Proration for Existing Subscription, before cancelling, fetch the current subscription details and then calculate
Example:
• $100/month, 30-day cycle
• Cancel on day 10 → 20 days unused
• Credit = $100 / 30 * 20 = ~$66.67 - Create Stripe Checkout Session for New Subscription
You don’t touch the old subscription yet — you’re waiting for the new one to complete.
3.Listen to checkout session completed Webhook
Once the new subscription is successfully created and then we cancel the existing subscription and respective balance marked as paid balance into the customer credit.
This flow will work?
Sounds good, sure. So for the 'credit' you'd probably want to 'discount' the new subscription