Overview
When customers upgrade their subscription:- They switch to a higher-tier plan
- Prorations credit unused time on the old plan
- New charges apply for the remaining period
- Next billing continues on the new plan
Basic Upgrade Flow
Proration Explained
When upgrading mid-cycle, Polar automatically calculates proration: Example:- Current plan: $29/month
- New plan: $99/month
- 15 days remaining in cycle
- Days in month: 30
Implementation Examples
Next.js App Router
Create a server action for upgrades:Laravel
Create a controller for upgrades:Handling Upgrade Failures
Handle common upgrade errors:Webhook Handling
Listen for subscription updates:Proration Behavior Options
Control how prorations are handled:- create_prorations (default): Credits old plan, charges new plan
- always_invoice: Immediately invoices the difference
Testing Upgrades
Test the upgrade flow:Best Practices
User Experience
User Experience
- Show proration preview before confirming
- Clearly communicate billing changes
- Send confirmation emails
- Update UI immediately after upgrade
Error Handling
Error Handling
- Handle payment failures gracefully
- Provide retry options
- Log all upgrade attempts
- Alert on repeated failures
Business Logic
Business Logic
- Validate product eligibility
- Check for active subscriptions
- Prevent downgrades via this flow
- Handle trial to paid upgrades
Related Guides
Subscription Downgrades
Handle plan downgrades and cancellations
Seat-Based Pricing
Manage team subscription upgrades