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 groupFieldsWhat it does
Plan changeamountInCents, interval, intervalCount, cycleCount, name, description, prorationBehaviorUpgrade, downgrade, change the billing cycle, or set an end date
Pause / resumepauseCollectionPause payment collection (object) or resume it (null)
Trial / billing datetrialEndExtend a trial, postpone the next charge, or end a trial now
Cancel / reactivatecancelAtPeriodEndSchedule a cancellation at period end, or undo one

Sending only name and/or description is 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:

FieldDescription
amountInCentsNew recurring price (minimum 50 cents)
intervalNew billing interval: day, week, month, year
intervalCountNumber of intervals between charges (defaults to the current value)
cycleCountEnd the subscription after this many billing cycles (only on a subscription without an existing cycle limit)
prorationBehaviorHow 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.

ValueEffect
PRORATE_NOWApply 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_NOWApply 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_PERIODThe 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:

ChangeDefaultNotes
Price increase (same cycle)PRORATE_NOWProrated difference charged immediately
Price decrease (same cycle)NEXT_PERIODNew price at the next billing date
Longer cycle (e.g. month → year)PRORATE_NOWNew amount must be greater than or equal to the current amount
Shorter cycle (e.g. year → month)NEXT_PERIOD onlyThe 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.
  • cycleCount can only be combined with a cycle change when that change applies immediately (not with NEXT_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:

FieldDescription
statusSubscription status after the update
planChange.changeTypeAMOUNT_ONLY, CYCLE_EXTENSION, CYCLE_REDUCTION, or END_DATE_ONLY
planChange.modeINSTANT (applied now) or DEFERRED (applied at period end)
planChange.proratedWhether the change was settled with proration
planChange.creditAmountInCentsCredit for the unused portion of the current cycle (instant changes only)
planChange.dueAmountInCentsAmount charged now, net of any credit
planChange.effectiveAtWhen the change takes effect
paymentPayment 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.

ValueEffect
ISO 8601 dateExtends 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:

  1. Go to Subscriptions and open a subscription.
  2. Choose the action: Change Plan (price, billing cycle, end date, with the same proration options), Pause / Resume, Extend Trial, or Cancel / Reactivate.
  3. 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 endpointReplacement
POST /subscription/{id}/upgradePATCH /subscription/{id} with amountInCents (and optionally prorationBehavior)
POST /subscription/{id}/reactivatePATCH /subscription/{id} with cancelAtPeriodEnd: false

See the API Reference for the full request and response schemas.


Did this page help you?