Option 1: Upgrade to a higher plan.
The new contract price is higher than the unused price of the previous contract (which was already paid). In this case, a new invoice is generated for that usage difference with the prorated amount
Option 2: Downgrade to a lower plan (customer has to pay a difference)
The new contract price is lower than the unused price of the previous contract (which was already paid) but the customer still has to pay a difference. In this case, a new invoice is generated for that usage difference with the prorated amount.
Option 3: Downgrade to a lower plan (customer has a balance on his favor)
The new contract price is lower than the unused price of the previous contract (which was already paid). In this case, a credit note is generated for that usage difference with the prorated amount and the customer will have a remaining balance on his/her favor.