Scenario 1: new purchase and renewal Example: A customer purchases a one-month subscription (validity from January 1 to 31) of an ECS instance on January 1, 2023. The order number is Order001 and the fee is ¥62. On January 20, the customer renews the subscription for another month (validity from February 1 to 28). The order number is Order002 and the fee is ¥ 62. Then the fees are allocated as follows. From January 1 to 31, 2023:
Order001 is within its period of validity. Daily allocated amount = ¥ 62/31 = ¥ 2.
Order002 is not within its period of validity and its fee is not allocated.
From February 1 to 28, 2023:
Order001 is not within its period of validity and its fee is not allocated.
Order002 is within its period of validity. Daily allocated amount = ¥ 62/28 = ¥ 2.21. Scenario 2: new purchase and unsubscription A customer purchases a one-month subscription (validity from January 1 to 31) of an ECS instance on January 1, 2023. The order number is Order001 and the fee is ¥ 62. On January 20, the customer unsubscribes and an unsubscription order Order002 is generated with a refund of ¥ 20. Then the fees are allocated as follows. From January 1 to 19, 2023, Order001 is within its period of validity. Daily allocated amount = ¥ 62/31 = ¥ 2.
On January 20 when the customer unsubscribes, the amount in Order001 that has not been allocated is ¥ 62 - ¥ 2*19 = ¥ 24. The refund generated by Order002 is ¥ 20.
The total fee allocated to January 20 is ¥ 24 - ¥ 20 = ¥ 4. Scenario 3: new purchase and specification change A customer purchases a one-month subscription (validity from January 1 to 31) of an ECS instance on January 1, 2023. The order number is Order001 and the fee is ¥ 62. On January 20, the customer upgrades the instance specifications, thereby generating Order002 including SubOrder001 (remaining value of the original specification) and SubOrder002 (value of the new specification within the remaining period of validity). The period of validity of Order002 is from January 20 to 31, 2023. The remaining value of the original specification is ¥ 18 and the value of the new specification within the remaining period of validity is ¥ 36. Then the fees are allocated as follows. From January 1 to 19, 2023: Order001 is within its period of validity. Daily allocated amount = ¥ 62/31 = ¥ 2. From January 20 to 30:
Order001 is within its period of validity. Daily allocated amount = ¥ 62/31 = ¥ 2. SubOrder001 is within its period of validity. Daily allocated amount = ¥ -18/12 = ¥ -1.5.
SubOrder002 is within its period of validity. Daily allocated amount = ¥ 36/12 = ¥ 3. On January 31, 2023, the allocated amount = (Total value of the orders - Total amount allocated over the previous days = (¥ 62 - ¥ 2*30) + ¥ [-(18-1.5*11)] + ¥ 36 - ¥ 3*11= ¥ 3.5.