How to prorate a plan
Current plan change behavior and scheduling options.
The subscription update endpoint supports immediate or scheduled plan changes.
Endpoint
POST /v1/subscriptions/{subscription_id}
Modes
- Immediate switch: send
plan_id. - Next-cycle switch: send
plan_idandapply_at_next_reset: true.
Constraints
Plan switches require matching:
currencyintervalinterval_count
Example (scheduled)
curl -sS -X POST "$PORTCALL_API_BASE/v1/subscriptions/sub_x" \
-H "x-api-key: $PORTCALL_API_KEY" \
-H "content-type: application/json" \
-d '{"plan_id":"plan_pro","apply_at_next_reset":true}'