#jasonfish568
1 messages · Page 1 of 1 (latest)
Then you should just set proration_behaviour to none , You customer will be billed in the new price in next renewal.
But I'd like to bill the customer $200 for the current month, too
If the customer upgrades, he needs to pay the gap for the current month.
Can you walk me through with an example?
I have a subscription A $100/month, B $200/month.
Customer Tom purchased a subscription on 01/08/23, he paid $100 on that day.
On 14/08/23, Tom wants to switch to Subscription B. Now Tom should be charged another $100 because B is $100 more expensive than A.
That's the exactly what proration is doing
Tom can enjoy the benifits of Subscription B if the payments succeeds.
But proration is calculating the time, right?
I believe proration_behaviour:always_invoice is exactly for your use case. have you tried it out?
I tried but I'm confused with the logic.
For example, if Tom switches from A to B on 25/08/23, how does proration calculate the price gap?
Ok, when you do a proration, a few things happen
I don't think I will be charging Tom $200 after the upgrading. Total charged amount will be:
$100 x (25/31) + $200 x (6/31) =$119.36
Basically
- The customer is getting back the money that don't need to spend on the old plan for the remaining month
- The customer needs to pay the money that they are going to spend on the new plan for the remaining month.
- The proration amount is the sum of these two
Not exactly like what your formula shows
That's the problem. If Tom enjoyes all the benefits, I'd like to charge him $200. How can I get this done?
No, Tom only enjoys the benefits for the remainig month, not the full month, am I right?
Nope. For example, Subscription A allows Tom to download 10 copies of the files, Subscription B allows him 100 copies of the files. After upgrading, he would be able to download the total 100 copies. Which means he enjoys the total benefits.
Still, Tom can only use the download service for just the remaining month, not the full month
I think that's the problem. Proration is only based on time, but I'd like to charge on the actual number of copies he can download. So what is the best practice charging him the $100 gap.
Is proration_date helping ?
Your business model is indeed unique and you need to do some cutomization for it.
yes you can still set proration_behaviour:always_invoice to bill your customer immeidately, and you need to listen to invoice.created event, add add your custom invoice item, and manually finalize the invoice so that you can charge your customer with additional amount.
Or you can manually create a separate invoice of $100, and update your subscription with proration_behaviour:none when your customer has paid the invoice.
For the second process, I will need custom meta data to identify this new invoice and process it right?
Yes you are right
Let me read through the docs, I'll come back create a new chat in case I have more questions. Thanks!