#Daichi
1 messages · Page 1 of 1 (latest)
It's because of the proration behaviour you're setting when performing the update: https://stripe.com/docs/billing/subscriptions/prorations
Can you share the sub_xxx ID?
si_MtCehJubgL7r3n
I removed that proration line of code but still didn't work.
Well removing the parameter won't make a difference as create_prorations is the default
To be more clear:
Invoice shows the correct amount (First choice of subscription is more expensive than second subscription, so it makes sense ).
Although the "Upcoming invoice" shows that Amount due and total including next month is 0. I felt this is problematic. I believe it should be 30$ (20$ + 10$)
well the way this works in Stripe is :
-the first invoice was for for ¥5000 (1000 x quantity 5)
-you change to quantity 1
-that means the customer gets a refund/credit of the ¥4000 they paid for but aren't going to be using, which is prorated by time. So if there's 90% of the month left at the time you do the update, they get 90% of ¥4000 back
- the customer gets a charge/debit of ¥1000 for the new amount they are going to be using, which is prorated by time. So if there's 90% of the month left at the time you do the update, they get 90% of ¥1000 charged
in your case you did the update immediately after creating the subsription, so the percentage is basically 99.999% so 100%
that's what the upcoming invoice looks like it does(it's those two percentage based prorations, plus the ¥1000 for the upcoming month)
and next month the user will be charged ¥1000 (1000 x quantity 1), correct?
It seems like my implementation has no problem but I misunderstood about the proration....
yes
But in this case, the user has credit of ¥4000, will it be carried to next month? (we don't want to)
if the overall invoice is negative, then the negative amount is added to the customer's balance and applied to future invoices yes
in your case you can see the overall invoice is -¥3000 so the overall effect will be their next 3 invoices will be free since the ¥1000 charges on them will be cancelled out by the accumulated balance