Based on the four scenarios you have described for changing billing types, I will try to break down each scenario. Additionally, I would also suggest prorating scenarios for changes during the billing cycle, aka outside the grace period.
1. Monthly → Yearly
a) Grace period: The new plan could take effect at the start of the next billing cycle.
b) During billing period: When switching from a monthly to a yearly plan, calculate the unused portion of the monthly payment and apply it as a deduction towards the yearly fee. This would ensure that users are not paying twice for the same period.
Example: Switching after 4 days in a 31-day month.
1,000,000 - (100,000 / 31 * 4) ≈ 987,097 sats
2. Monthly → Once
a) Grace period: The one-time payment could be made effective at the beginning of the next billing cycle.
b) During billing period: For a switch from a monthly to a one-time payment, calculate the cost of the days used under the monthly plan and deduct this from the one-time payment.
Example: Switching after 7 days in a 30-day month.
3,000,000 - (100,000 / 30 * 7) ≈ 2,976,667 sats
3. Yearly → Monthly
a) Grace period: Switch to a monthly plan at the beginning of the next billing year.
b) During the yearly billing period: If switching from a yearly to a monthly plan, calculate the credit for the unused portion of the year and apply this towards the monthly payments, refunding the remaining balance. Note: This scenario may not align with your business interests, but follows the pattern described for the other changes. Maybe just reconsider that option
4. Yearly → Once
a) Grace period: The one-time payment plan becomes effective at the start of the next billing year.
b) During the yearly billing period: For switching from a yearly to a one-time payment plan, determine the cost for the portion of the year already used and subtract this from the one-time payment amount.
I'm not entirely sure if this addresses all outcomes, but it could provide a fair method to calculate prorations for founders who wish to change their billing types.
YearlyPaymentAdjusted = YearlyRate - (MonthlyRate / DaysInMonth * DaysUsed)
1,000,000 - (100,000 / 31 * 4) ≈ 987,097 sats
OncePaymentAdjusted = OnceRate - (MonthlyRate / DaysInMonth * DaysUsed)
3,000,000 - (100,000 / 30 * 7) ≈ 2,976,667 sats
MonthlyCredit = (YearlyRate / 12) * MonthsRemaining
(1,000,000 / 12) * (12 - 6) = 500,000 sats
Step 2:500,000 - 100,000 (new monthly payment)
Step 3:400,000 refund
OncePaymentAdjusted = OnceRate - (YearlyRate / 12 * MonthsUsed)
3,000,000 - (1,000,000 / 12 * 3) = 2,250,000 sats