#ravisankar_api

1 messages · Page 1 of 1 (latest)

inland cloakBOT
#

👋 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.

fast marsh
#

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?

somber bloom
#

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

fast marsh
#

What is 'checkout page'?

somber bloom
#

Payment page

fast marsh
#

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

somber bloom
#

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

fast marsh
#

We don't support calculating proration between different subscriptions. You'd need to do that manually

somber bloom
somber bloom
fast marsh
#

We don't have a formula, no

somber bloom
#

How to calculate manually? what is the suggested option stripe side

fast marsh
#

You'd probably need to apply line item(s) to the invoice to reflect the prorated amounts that you'd have to calculate yourself

somber bloom
#
  1. 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
  2. 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?

fast marsh
#

Sounds good, sure. So for the 'credit' you'd probably want to 'discount' the new subscription