#pavlina_code
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/1380532939087151244
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- pavlina_best-practices, 1 day ago, 25 messages
- pavlina_best-practices, 1 day ago, 23 messages
With out API, you should achieve this by specifying a single subscription item by id in the update with the new price:
https://docs.stripe.com/billing/subscriptions/change-price#changing
I do cashier swapAndInvoice method - reading though the docs as well as testing I see it removes all old prices
Unfortunately I can't really offer any advice about this Cashier method, that's third party code with abstractions over our API/SDK
I'm not sure if that supports a update to 1 of many items like you're trying to do
You'll need to contact the Cashier developers/support team for guidance on that
I'm aware of that I wanted to ask in general how is that supposed to be handled. I see the doc you've given me, if I manage to update it, how I'm supposed to invoice only of a single item?
Having in mind they have already paid for their previous feature and are upgrading on the main plan
how I'm supposed to invoice only of a single item
You don't, if there are multiple suscription items they will be included on all invoices. That said, the proration should mean that there is only a difference on the changed price/item, in most cases.
Yep, proration credit should account for this part
Can you give me an example, I'm having a hard time understanding what you mean?
I mean, if you have two items on the sub: base price of 10/mo, some add-on at 10/mo
then you're mid-cycle, and they want to upgrade to "premium add on" for 20/mo
then if you replace the price on the add-on item, invoicing for prorations immediately: https://docs.stripe.com/billing/subscriptions/prorations#create-immediate-prorations
then the result should be a net invoice for 5. the base price doesnt change, so the proration cancels out on that. for the addon the prorated charge is half a month * 20 = 10, and tht prorated credit for the time they paid but havent used is half a month * 10 = 5. 10 - 5 = 5.