#elBR-proration-preview
1 messages · Page 1 of 1 (latest)
Hi, the default behavior is to create_prorations: https://stripe.com/docs/api/subscriptions/create#create_subscription-proration_behavior
thank you
I have another question
if I define proration_behaviour as always_invoice in an invoice preview it means that the upcoming invoice will be the invoice created by the prorations?
and not the new billing cycle invoice?
What does 'not the new billing cycle invoice' mean?
Are you passing a billing_cycle_anchor, https://stripe.com/docs/billing/subscriptions/billing-cycle#changing?
Can you add more details to ensure that I'm providing the best answer?
I want to get the upcoming invoice of a subscription
in case I provide proration_behaviour as always_invoice does it mean that the upcoming invoice that I will get will be the invoice immediately created by prorations
?
Ah I see, I'll need to test this in my test environment.
ok thanks
please let me know
Also I wanted to ask why every time I change the quantity I get two invoice items respectively:
Unused time on 5 × Custom Single Seats after 05 Oct 2022
Remaining time on 6 × Custom Single Seats after 05 Oct 2022.
In this case I changed the quantity from 5 to 6
Why not getting only one invoice item that says:
Remaining time on 1 × Custom Single Seats after 05 Oct 2022.
because we just incremented the quantity by 1
if we would increment for example by 3:
Remaining time on 3 × Custom Single Seats after 05 Oct 2022.
wouldn't it be more clear to the customer when he checks the invoice?
I suspected this would be the case but I had to confirm... When you set proration_behavior: 'always_invoice' while updating a Subscription, the prorated amount would be invoiced and the upcoming invoice would be for the next billing cycle.
I just tried and to me results the opposite
while using always_invoice I get the prorated amount as invoice total
Can you share the request id with me? Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
I'm happy to further investigate once I have the request_id here.
sure
req_Ihvppf955IT3lG
as you can see the subtotal is equal to the subscription item price amount - unused amount
so it means that the upcoming invoice represents the prorated invoice amount and not the next billing invoice amount
Comparing it to my request
ok
It looks like there a discount that was deleted from the subscription which is not what I my test did https://dashboard.stripe.com/test/logs/req_frcegiegmAQegL
Can you share the exact flow you're goinng through so I can accurately try reproducing it?
you can do a test in general
to add a new subscription item
to a subscription
and check the upcoming invoice amount
Is it the total billing cycle subscription amount or just the prorated amount
would this be doable?
and please tell about this
elBR-proration-preview
👋 taking over, I'm happy to help but I'm struggling a bit to understand your real question
But if you go from quantity 1 to quantity 2 and pass proration_behavior: 'always_invoice' then that Invoice would just contain the proration for the quantity change and be created/cut immediately yes
Instead I get always two invoice items when I change the quantity from 1 to 2. I am referring to changing the subscription item’s quantity of an occurring subscription
one that says unused time and one remaining time as I wrote before
the amount is ok for the invoice
but I don’t understand why the calculation is made in that way
I'm sorry I don't really follow
You have a $100 Price monthly. mid month you switch to a $450 Price. We owe the customer $50 in credit (what they overpaid for the first Price) and they owe you $225 (half the new Price)
that creates 2 separate items
I am just adding a new subscription item
so you have Price A and then you add Price B mid-month?
if the quantity is 50 and the customer decides to go to 55 than we can tell in the invoice that the amount he has to pay is remaining time for 5 items
why we should tell:
this is for unused 50 itemes and this is for remaining 55
so you do increase the quantity?
we can just tell 5
sure
we can
we don't though
Like your approach could work, it's just not how we built this
ok
So you have to always get 2 line items, it's always how we do this