#hy1989_api

1 messages · Page 1 of 1 (latest)

dusk salmonBOT
#

👋 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/1409410074673156169

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

drifting citrus
#

Sorry could you clarify what is expected vs. what happened?

steel gate
#

Sure...We need pro-rata credits apply in first upgrade as well..how to achieve this

drifting citrus
#

Could you elaborate a bit more with a detailed example?

#

You mentioned you have $500 off Coupon

#

Price = $49

#

How would you expect prorate?

steel gate
#

First subscription with coupon

When the customer subscribes with a coupon (e.g., 100% off for the first month), the initial invoice is 0 (or reduced by the coupon).

Since the invoice is fully covered by the coupon, no charge is applied — and Stripe does not record an actual paid amount for that period.

Same-day upgrade (first time)

When the customer upgrades on the same day, Stripe generates an upgrade invoice.

Because the original subscription cost was effectively 0 (coupon made it free), Stripe has no amount to credit back from the unused portion.

Result: Stripe charges the full new plan price, and since you’re using customer invoice balance, it deducts from there.

Second upgrade (later change)

On subsequent changes, the system now has a "real" paid subscription invoice amount to prorate against.

Stripe correctly applies pro-rata credits (unused time from the old plan) and offsets the new amount.

drifting citrus
#

Because the original subscription cost was effectively 0 (coupon made it free), Stripe has no amount to credit back from the unused portion.
It looks like you want the change here, correct?

#

I think it will take the original amount. Please give it a try