#sarcasm_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1247479411683491851
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
๐ happy to help
Hello
looking at the subscription please give me a moment
My guess is that it's happening because the unused phase started before the creation of the discount and these items preexist.
When we are making the migration to the new item prices, we use the 'proration_behavior' => 'none'
sorry, please give me a moment I still didn't have the chance to look at this
There's a typo at my message. It should write:
After the migration, when increasing the quantity of the subscription item and use the 'always_invoice' option for the proration, the "unused" invoice line is computed without the discount, resulting to a credit balance.
I'm having trouble figuring out what you would expect in each step
would you mind sharing a small example please?
Of course
When this subscription started, the invoice correctly looked like this
One single item for a month that costs $25
ok perfect
After that we changed the subscription item to a different one, with quantity 4 and added a coupon that resulted to the next invoice being also $25
Which was also correct.
Then through our app, we increased the item quantity to 5
With "always_invoice" proration
Which resulted to this
that's not correct
What do you mean?
ok let me go back and send you each invoice ID for each action
in_1PNeXGJ3ZSOORD28KEHBuWGe is the creation invoice
the one you shared
in_1PNrI2J3ZSOORD28oEJvU0D3 is the one where you change the price and qty to 4
this resulted in a -$40.75 credit balance to the customer
We just changed the quantity at the second invoice
Between the first and second invoice, we changed the subscription item with proration_behaviour = none
It was this event evt_1PNr5XJ3ZSOORD28XPYUNiQQ
oh so there was no invoice that was created ๐คฆ
And this Log ID req_Se5B91a959p6Gm
We do not want an invoice to be created at this point. We need this to be done seemlessly to our customers
yes but without prorations you're saying that your customer has access to the 4 * 18$ subscription price without paying anything in return
but then we you do apply the next change you're saying "now do prorations"
But at the same time we add a coupon that would limit this to a $25 total
which will be calculated based on the 4*18 price rather than the 25
I don't think this is applied at all
since you didn't generate any invoice
that's why you should have done the proration and invoice the first change
exactly
if you want you can use test clocks to simulate the subscription advancing in time
so you don't have to wait till the next day to perform your different tests
I didn't wait, I just created the first subscription at the end of my work day ๐คฃ
yes but regardless just giving you an alternative here
Yeah, I know and I've been using them. Thanks though!
sure let me know if you need any more help
Thank you!