#devendra_api

1 messages ยท Page 1 of 1 (latest)

deft meteorBOT
#

๐Ÿ‘‹ 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/1348951244802097235

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

jolly hareBOT
silk arrow
weak dune
#

Hi there ๐Ÿ‘‹ taking a closer look at the history of the Subscription.

#

I see this Subscription is also being controlled by a Subscription Schedule

silk arrow
#

prorations i just use for charge.

#

{
"items": {
"0": {
"id": "si_RvFVKOLtrWXL0r",
"price_data": {
"currency": "GBP",
"product": "prod_MyCH7O83sYIl",
"recurring": {
"interval": "month"
},
"unit_amount": "5000"
},
"quantity": "2"
}
},
"proration_behavior": "always_invoice"
}

this is payload which i used for Subscription update

weak dune
#

Yup, I saw that, which created an Invoice that is now paid for. Since the Invoice is paid, that shouldn't be contributing to what's on the upcoming Invoice. So instead I'm looking at this request that was made to update the Subscription Schedule that is controlling this Subscription:
https://dashboard.stripe.com/test/logs/req_0MhrexfznEIV14

silk arrow
#

please explain me more

weak dune
#

Happy to, can you help me understand what you want me to elaborate on further?

silk arrow
#

If a subscription is active and I want to update all phases while charging for the changes, I need to ensure that the first phase (which is active) reflects the updated quantity. I also want to charge the customer immediately and prevent any invoice items from being marked as "remaining" or "unused" in the invoice.

deft meteorBOT
weak dune
#

Gotcha, so then when updating the Subscription Schedule, since you're making changes to the current phase, you'll want to leverage the top-level proration_behavior parameter. That's the parameter that is used to indicate whether prorations should be created for the update you're making to the current phase, and in this case it sounds like you want to set that to always_invoice.

Those Invoice lines on the generated invoice will show our remaining and unused verbiage. If you want to charge the customer for these changes, and also avoid that verbiage, then you will need to disable our proration logic and instead build your own.

silk arrow
#

if I disable our proration then stripe don't take any charge when update Subscription.
I need to charge but i dont want showing item remaining and unsed like item in next invoice. its mean upcoming invoices.