Group
  • Payments

    Handle plan upgrades, downgrades, and proration

    Implements plan changes with correct proration timing, immediate vs. end-of-period logic, and clear customer messaging.

    • Improve quality
    • Plan & validate
    • Intermediate
    • General

Free Prompt

Audit how my app handles subscription plan changes. Find the upgrade/downgrade flow and check what actually happens to billing and access when a customer switches plans. Implement deliberate rules: upgrades take effect immediately with prorated billing (the provider computes the proration; use its mechanism rather than calculating partial amounts myself, since providers handle the edge cases around billing cycle dates); downgrades take effect at the end of the current paid period (the customer paid for the higher tier, they keep it until it expires), unless the product decision is immediate downgrade with prorated credit, which should be a deliberate choice; access changes match the billing timing exactly (immediate access to the new tier on upgrade, scheduled change on downgrade); and the customer sees what they'll be charged and when before confirming, including the prorated amount. Handle the pending-change state: a scheduled downgrade must be stored, applied by the renewal webhook, and cancellable if the customer changes their mind. Don't change prices on existing subscribers silently as part of this; plan changes are customer-initiated. Don't roll my own proration math. Deliver: the rules per change direction, the implementation using provider proration, the pending-change handling, and verification in test mode: upgrade mid-cycle (immediate access, prorated invoice), downgrade mid-cycle (current tier until period end, then the change applies), and cancel a pending downgrade.

What This Does / How This Helps

Makes plan switching behave the way customers expect: upgrades now with fair prorated billing, downgrades when the paid period ends, and no surprise charges. Plan changes are where billing bugs directly become refund requests: charging the full new price on top of the old one, downgrading instantly and eating the customer's paid days, or applying a scheduled downgrade twice. Provider proration exists specifically to get the money math right, and this prompt wires it instead of reinventing it. The pending-downgrade handling is the part quick implementations skip, and it's what makes 'cancel my downgrade' possible instead of a support ticket.

Want to skip doing this by hand?

Fortivibe audits your app for all of the areas these prompts cover (and more).

See What We Check

Related Prompts