When a customer upgrades or downgrades their plan in the middle of a billing period, PayBridge NP can automatically calculate the unused credit on their current plan and the cost of the new plan for the remaining time - then generate a proration invoice for the net difference.Documentation Index
Fetch the complete documentation index at: https://docs.paybridgenp.com/llms.txt
Use this file to discover all available pages before exploring further.
How proration works
Proration is calendar-day based:- Credit = (remaining days / total days in period) × current plan amount
- Debit = (remaining days / total days in period) × new plan amount
- Net = debit − credit
Preview before applying
Always preview the proration amounts before committing a change so you can show the customer what they’ll owe:Apply a plan change with proration
PassprorationBehavior: "create_prorations" to apply the change immediately:
Schedule for next billing cycle (default)
To keep the existing behaviour - plan change applies at next renewal with no proration:Proration invoice
When a proration invoice is created it:- Has
status: "open"ifnetAmount > 0(customer owes money) - Is skipped (no invoice) if
netAmount ≤ 0 - Contains two line items:
proration_credit(negative) andproration_debit(positive) - Is due immediately - link the customer to the hosted invoice page to collect payment
API reference
| Endpoint | Description |
|---|---|
GET /v1/billing/subscriptions/:id/preview-proration?newPlanId= | Preview amounts without committing |
POST /v1/billing/subscriptions/:id/change-plan | Change plan; pass prorationBehavior |