Updating a Subscription
Available via: Dashboard and API
Every change to an existing subscription goes through a single declarative endpoint:
PATCH /subscription/{subscriptionId}
You describe the desired change in the request body, and Inflow figures out the rest — whether it is an upgrade or a downgrade, whether something needs to be charged or credited, and when the change takes effect.
Exactly one operation group is accepted per call. Mixing groups (for example, a plan change and a pause in the same request) returns a 400:
| Operation group | Fields | What it does |
|---|---|---|
| Plan change | amountInCents, interval, intervalCount, cycleCount, name, description, prorationBehavior | Upgrade, downgrade, change the billing cycle, or set an end date |
| Pause / resume | pauseCollection | Pause payment collection (object) or resume it (null) |
| Trial / billing date | trialEnd | Extend a trial, postpone the next charge, or end a trial now |
| Cancel / reactivate | cancelAtPeriodEnd | Schedule a cancellation at period end, or undo one |
Sending only
nameand/ordescriptionis a plain rename of the subscription: no billing change, nothing is charged.
Changing the Plan (Upgrades & Downgrades)
Set the new price and/or billing cycle:
| Field | Description |
|---|---|
amountInCents | New recurring price (minimum 50 cents) |
interval | New billing interval: day, week, month, year |
intervalCount | Number of intervals between charges (defaults to the current value) |
cycleCount | End the subscription after this many billing cycles (only on a subscription without an existing cycle limit) |
prorationBehavior | How and when the money side is settled — see below |
Whether a change is an upgrade or a downgrade is resolved from the price per day, not the absolute amount. Moving from €10/month to €96/year raises the invoice amount but lowers the daily price — Inflow treats it as a downgrade.
Proration Behaviors
prorationBehavior folds two choices into one value: when the change applies (now or at the next billing date) and whether to prorate.
| Value | Effect |
|---|---|
PRORATE_NOW | Apply immediately, with proration. A price increase is charged pro-rata for the days remaining in the cycle. A price decrease or a longer cycle starts a fresh billing cycle now, the unused portion of the current cycle is credited to the customer's balance, and only the net is charged. |
FULL_CHARGE_NOW | Apply immediately, without proration. A price increase is charged in full now (not scaled down for the days remaining). A price decrease or a longer cycle starts a fresh cycle now at the full new amount, with no credit for the unused portion. |
NEXT_PERIOD | The new plan takes effect at the next billing date. Nothing is charged or credited now. |
Defaults
If you omit prorationBehavior, Inflow picks the behavior a customer would expect:
| Change | Default | Notes |
|---|---|---|
| Price increase (same cycle) | PRORATE_NOW | Prorated difference charged immediately |
| Price decrease (same cycle) | NEXT_PERIOD | New price at the next billing date |
| Longer cycle (e.g. month → year) | PRORATE_NOW | New amount must be greater than or equal to the current amount |
| Shorter cycle (e.g. year → month) | NEXT_PERIOD only | The customer finishes the period they already paid, then switches. PRORATE_NOW and FULL_CHARGE_NOW are rejected. |
Rules & Restrictions
- Plan changes require the subscription to be
ACTIVE. - No cash refunds — when a change generates a credit, it stays on the customer's balance and is consumed by upcoming invoices.
- Instant price decreases (
PRORATE_NOW/FULL_CHARGE_NOW) are available for EUR and USD subscriptions. cycleCountcan only be combined with a cycle change when that change applies immediately (not withNEXT_PERIOD), and never with a shorter cycle.- Only one plan change can be in flight at a time; canceling the subscription also cancels any pending plan change.
Examples
Upgrade — prorated charge now (default):
curl -X PATCH https://api.inflowpay.xyz/subscription/{subscriptionId} \
-H "X-Inflow-Api-Key: your_private_key" \
-H "Content-Type: application/json" \
-d '{ "amountInCents": 4999, "name": "Premium Plan" }'The customer is charged (new price − old price) × (days remaining / days in cycle) immediately, and the new price applies from now on.
Downgrade — takes effect at the next billing date (default):
curl -X PATCH https://api.inflowpay.xyz/subscription/{subscriptionId} \
-H "X-Inflow-Api-Key: your_private_key" \
-H "Content-Type: application/json" \
-d '{ "amountInCents": 1999 }'Nothing changes until the current period ends; the next invoice uses the new price.
Downgrade — immediately, with credit for the unused portion:
curl -X PATCH https://api.inflowpay.xyz/subscription/{subscriptionId} \
-H "X-Inflow-Api-Key: your_private_key" \
-H "Content-Type: application/json" \
-d '{ "amountInCents": 1999, "prorationBehavior": "PRORATE_NOW" }'A fresh billing cycle starts today. The unused portion of the old cycle is credited to the customer's balance and deducted from the amount due; if the credit exceeds the new price, the remainder covers future invoices.
Switch from monthly to yearly billing:
curl -X PATCH https://api.inflowpay.xyz/subscription/{subscriptionId} \
-H "X-Inflow-Api-Key: your_private_key" \
-H "Content-Type: application/json" \
-d '{ "amountInCents": 9900, "interval": "year", "intervalCount": 1 }'The yearly cycle starts today, the unused days of the current month are credited, and the net is charged.
End an unlimited subscription after a set number of cycles:
curl -X PATCH https://api.inflowpay.xyz/subscription/{subscriptionId} \
-H "X-Inflow-Api-Key: your_private_key" \
-H "Content-Type: application/json" \
-d '{ "cycleCount": 12 }'The subscription automatically cancels after 12 billing cycles, the current cycle counting as the first.
Understanding the Response
The response tells you exactly what happened, so a preview call is not needed:
| Field | Description |
|---|---|
status | Subscription status after the update |
planChange.changeType | AMOUNT_ONLY, CYCLE_EXTENSION, CYCLE_REDUCTION, or END_DATE_ONLY |
planChange.mode | INSTANT (applied now) or DEFERRED (applied at period end) |
planChange.prorated | Whether the change was settled with proration |
planChange.creditAmountInCents | Credit for the unused portion of the current cycle (instant changes only) |
planChange.dueAmountInCents | Amount charged now, net of any credit |
planChange.effectiveAt | When the change takes effect |
payment | Payment details when an amount is due now (absent for deferred changes or when nothing is due) |
Pausing & Resuming Billing
Pause payment collection on an active subscription — invoices generated while paused are voided and the status becomes PAUSED:
curl -X PATCH https://api.inflowpay.xyz/subscription/{subscriptionId} \
-H "X-Inflow-Api-Key: your_private_key" \
-H "Content-Type: application/json" \
-d '{ "pauseCollection": { "resumesAt": "2026-09-01T00:00:00.000Z" } }'resumesAt is optional — without it, the subscription stays paused until you resume it explicitly by passing null:
curl -X PATCH https://api.inflowpay.xyz/subscription/{subscriptionId} \
-H "X-Inflow-Api-Key: your_private_key" \
-H "Content-Type: application/json" \
-d '{ "pauseCollection": null }'Extending Trials & Postponing Billing
trialEnd moves the next billing date — forward only, at most one year ahead. Nothing is charged during the gap.
| Value | Effect |
|---|---|
| ISO 8601 date | Extends a trial, or postpones the next charge of an active subscription |
"now" | Ends a trial immediately and starts billing |
"cancel" | Reverts a pending postponement or trial extension to its original date (only while that original date is still in the future) |
curl -X PATCH https://api.inflowpay.xyz/subscription/{subscriptionId} \
-H "X-Inflow-Api-Key: your_private_key" \
-H "Content-Type: application/json" \
-d '{ "trialEnd": "2026-09-01T00:00:00.000Z" }'Canceling & Reactivating
Schedule a cancellation at the end of the current billing period (the subscription enters PENDING_CANCELLATION):
curl -X PATCH https://api.inflowpay.xyz/subscription/{subscriptionId} \
-H "X-Inflow-Api-Key: your_private_key" \
-H "Content-Type: application/json" \
-d '{ "cancelAtPeriodEnd": true }'Reactivate a subscription in PENDING_CANCELLATION before the period ends:
curl -X PATCH https://api.inflowpay.xyz/subscription/{subscriptionId} \
-H "X-Inflow-Api-Key: your_private_key" \
-H "Content-Type: application/json" \
-d '{ "cancelAtPeriodEnd": false }'To cancel immediately instead, use DELETE /subscription/{subscriptionId} with { "cancelNow": true } — see Managing Subscriptions.
From the Dashboard
The same operations are available from the subscription details page in your Dashboard:
- Go to Subscriptions and open a subscription.
- Choose the action: Change Plan (price, billing cycle, end date, with the same proration options), Pause / Resume, Extend Trial, or Cancel / Reactivate.
- For plan changes, the Dashboard shows the amount charged or credited before you confirm.
Dashboard-initiated charges are always settled on the customer's saved payment method.
Migrating from Deprecated Endpoints
The following endpoints are deprecated and fully replaced by the unified PATCH:
| Deprecated endpoint | Replacement |
|---|---|
POST /subscription/{id}/upgrade | PATCH /subscription/{id} with amountInCents (and optionally prorationBehavior) |
POST /subscription/{id}/reactivate | PATCH /subscription/{id} with cancelAtPeriodEnd: false |
See the API Reference for the full request and response schemas.
Updated 1 day ago