Skip to content

Stripe proration: why plan changes bill the way they do

When a Stripe subscription changes price or quantity mid-period, Stripe credits the unused time on the old price and charges the rest of the period on the new one, to the second. With the default proration_behavior, create_prorations, both land as pending invoice items on the next invoice. That is why an upgrade charges nothing today and a bigger renewal later, and why a downgrade leaves a credit instead of a refund.
Verified against official documentationReviewed Send a correction (opens in a new tab)

The short answer on Flint

Flint bills a plan change the moment it happens. Every plan change and seat change takes a billing_starts timing. With prorated_now, Flint credits the unused paid time, charges the difference in the same request, keeps the billing date, and applies the new plan only if the payment succeeds. A preview endpoint returns the credit and today's charge before the subscriber confirms, and downgrades wait for renewal with period_end, so there is no stray credit to explain. The Flint requests are below.

How Stripe calculates and bills a proration

Stripe's own example: a customer moves from a $10 monthly plan to a $20 one halfway through the month. Stripe credits $5 for the unused half of the $10 plan and charges $10 for the remaining half of the $20 plan, a net of $5. Changes that create prorations include a new price, a new quantity, adding or removing items, adding a trial, resetting billing_cycle_anchor, and a mid-period cancel_at.

Where that $5 goes depends on proration_behavior, which you set on each update:

  • create_prorations (the default) creates proration invoice items and leaves them for the next invoice. A customer who moves from $100 to $200 on May 15 pays $250 on June 1: the $200 renewal plus $50 for the rest of May.
  • always_invoice invoices the prorations immediately and attempts payment.
  • none creates no prorations for that request. The new price starts at the next invoice, and there is no setting to turn prorations off for a whole subscription.

Stripe charges at once without always_invoice only when the update changes the billing interval, resets the billing cycle anchor, moves the subscription from free to paid, or starts or ends a trial. Credits from a downgrade are never refunded automatically: they reduce the next invoice through the customer's invoice balance.

Billing a Stripe upgrade now, with a preview

To charge for an upgrade when it happens and show the amount first, you combine a preview invoice, a pinned proration_date, always_invoice, and pending updates. The upcoming invoice endpoint, GET /v1/invoices/upcoming, was removed in API version 2025-03-31.basil; previews now use the Create Preview Invoice API:

JavaScript
const sub = await stripe.subscriptions.retrieve(subscriptionId);
const item = sub.items.data[0];
// Send the item ID and the current quantity, or Stripe adds a second
// item or resets the quantity to 1
const items = [{ id: item.id, price: newPriceId, quantity: item.quantity }];

// Stripe prorates to the second: pin the time once for preview and update
const prorationDate = Math.floor(Date.now() / 1000);

const preview = await stripe.invoices.createPreview({
  customer: sub.customer,
  subscription: sub.id,
  subscription_details: { items, proration_date: prorationDate },
});
// The preview is the next invoice: proration lines plus the renewal.
// The amount due now is the sum of the proration lines.
const dueNow = preview.lines.data
  .filter((line) => line.parent?.subscription_item_details?.proration)
  .reduce((sum, line) => sum + line.amount, 0);

// ...show dueNow, then after the customer confirms:
const updated = await stripe.subscriptions.update(sub.id, {
  items,
  proration_date: prorationDate,
  proration_behavior: "always_invoice", // bill now, not at renewal
  payment_behavior: "pending_if_incomplete", // apply only if payment succeeds
});
if (updated.pending_update) {
  // Not applied yet. Retry payment on updated.latest_invoice before
  // pending_update.expires_at, or Stripe voids it and drops the change.
}

Pending updates work only with automatic collection and the payment methods Stripe lists, such as cards, and only for some update parameters. For downgrades, Stripe suggests a subscription schedule that switches the price at the end of the period. These are the places proration surprises come from:

Where Stripe proration surprises people

  1. The upgrade charged nothing today#

    A customer moved to the bigger plan mid-month and no payment came in.

    With the default proration_behavior, create_prorations, Stripe creates proration invoice items and leaves them pending. Positive prorations aren't billed right away, so the customer uses the better plan now and pays for it at renewal.

    Confirm it

    List the customer's pending invoice items. Each one from the change has proration: true and no invoice yet.

    Fix

    Send proration_behavior=always_invoice on the update to invoice the prorations at once and attempt payment.

  2. The next invoice is bigger than the plan price#

    A $200 plan renewed for $250 and the customer opened a support ticket.

    Pending prorations ride on the next invoice next to the renewal. Stripe's own example: a customer on a $100 plan who moves to $200 on May 15 is billed $250 on June 1, the $200 renewal plus $50 for the second half of May.

    Confirm it

    Open the invoice and look for line items with proration: true before the subscription line.

    Fix

    Bill the change when it happens with always_invoice, or show the customer the coming amount from a preview invoice before they confirm.

  3. A downgrade left a credit, not a refund#

    The customer downgraded, expected money back, and saw nothing on their card.

    Negative prorations aren't refunded automatically. The credit for unused time reduces the next invoice, and Stripe's customer invoice balance carries it forward. That balance never sends money to the customer.

    Confirm it

    Look at the customer's invoice balance, or for an invoice with a negative proration line.

    Fix

    Refund the part of the payment you want to return yourself, or downgrade at the end of the period with a subscription schedule so there is nothing to credit.

  4. The plan changed even though the card declined#

    A customer on the premium plan has a past_due subscription and never paid for premium.

    When an update bills immediately and the payment fails, Stripe still applies the change, and the subscription moves to past_due. Rolling the change back is manual.

    Confirm it

    Find subscriptions whose latest invoice is open with a failed payment and whose items already show the new price.

    Fix

    Add payment_behavior=pending_if_incomplete so the change waits in pending_update until payment succeeds. It supports only some update attributes and payment methods, and a pending update expires after 23 hours or sooner.

  5. The preview and the charge don't match#

    Your confirm screen said $12.26 and the invoice says $12.25.

    Stripe prorates to the second, so the amount moves between the preview and the update a moment later.

    Confirm it

    Compare subscription_details.proration_date on the preview with proration_date on the update. They are different times, or one is missing.

    Fix

    Pick a timestamp once, pass it as subscription_details.proration_date on the preview, and pass the same value as proration_date on the update.

  6. A price change reset the seat count to 1#

    A 12-seat team upgraded and was billed for one seat.

    Updating a subscription item's price reverts its quantity to the default of 1 unless you send the quantity again. Leaving out the item ID is worse: Stripe adds the new price as a second item, and both bill.

    Confirm it

    Compare items.data[].quantity before and after the update, and count the items.

    Fix

    Always send the item id, the new price, and the current quantity together.

  7. The customer got credit for time they never paid for#

    A customer with an unpaid invoice downgraded and ended up with a credit.

    Stripe calculates prorations as though every earlier invoice for the subscription will be paid. If the current period's invoice is still open, the downgrade credits unused time on the higher plan anyway.

    Confirm it

    Before a change, read the subscription's latest_invoice and its status.

    Fix

    When the latest invoice is unpaid, update with proration_behavior=none, and void the unpaid invoice if you bill the new plan another way, so the customer can't pay twice.

On Flint, a plan change is charged in the same call

Take a subscriber on a $29.00 monthly plan who paid for October 1 to November 1 and upgrades to $49.00 on October 13, with 19 of 31 days unused. Preview the change before they confirm. It runs the same checks as the change itself and saves nothing:

cURL
curl -X POST https://api.withflintpay.com/v1/subscription-previews \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mode": "plan_change",
    "subscription_id": "sub_1kmn0aExample",
    "subscription_plan_id": "plan_1kmn0bExample",
    "billing_starts": "prorated_now"
  }'

credit_adjustment_money is the credit for the unused $29.00 time, and renewal.total_money is what the change charges today. Each adjustment is a named discount, so your confirm screen can show the math:

JSON
{
  "data": {
    "mode": "plan_change",
    "billing_starts": "prorated_now",
    "subscription_plan_id": "plan_1kmn0bExample",
    "recurring_subtotal_money": { "amount": 4900, "currency": "USD" },
    "credit_adjustment_money": { "amount": 1777, "currency": "USD" },
    "renewal": {
      "subtotal_money": { "amount": 4900, "currency": "USD" },
      "discounts": [
        {
          "name": "Elapsed time in current period",
          "source": "proration",
          "promotion_id": null,
          "discount_money": { "amount": 1897, "currency": "USD" }
        },
        {
          "name": "Unused time on Starter",
          "source": "plan_change_credit",
          "promotion_id": null,
          "discount_money": { "amount": 1777, "currency": "USD" }
        }
      ],
      "discount_money": { "amount": 3674, "currency": "USD" },
      "total_money": { "amount": 1226, "currency": "USD" }
    }
  }
}

When the subscriber confirms, make the change:

cURL
curl -X POST https://api.withflintpay.com/v1/subscriptions/sub_1kmn0aExample/change-plan \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: upgrade-sub-ada-001" \
  -H "Content-Type: application/json" \
  -d '{
    "subscription_plan_id": "plan_1kmn0bExample",
    "billing_starts": "prorated_now"
  }'
JSON
{
  "data": {
    "billing_starts": "prorated_now",
    "subscription": {
      "subscription_id": "sub_1kmn0aExample",
      "subscription_plan_id": "plan_1kmn0bExample",
      "status": "active",
      "current_period_end_at": "2026-11-01T00:00:00Z",
      "next_billing_at": "2026-11-01T00:00:00Z"
    },
    "order": {
      "order_id": "ord_1kmn0bExample",
      "pricing_amounts": {
        "subtotal_money": { "amount": 4900, "currency": "USD" },
        "discount_money": { "amount": 3674, "currency": "USD" },
        "total_money": { "amount": 1226, "currency": "USD" }
      }
    },
    "order_payment_attempt": {
      "order_payment_attempt_id": "opat_1kmn0bExample",
      "status": "succeeded"
    }
  }
}

The subscriber paid $12.26 today, the billing date stays November 1, and the next renewal is a plain $49.00. Read order_payment_attempt.status: when it is failed, Flint closed the unpaid order and the subscription is exactly as it was, still on the $29.00 plan. Nothing to roll back and no past_due subscription on a plan nobody paid for. Flint measures unused time when you call, so the charge a moment later can be slightly lower than the preview.

Pick the timing per change

billing_startsCharged todayBilling date
prorated_nowNew terms for the rest of the period, less unused paid time: $12.26Stays November 1
nowA full new period, less unused paid time: $31.23Moves to October 13
next_renewalNothing; the new plan applies now and bills from the next chargeStays November 1
period_endNothing; the current plan runs until renewal, then the new one billsStays November 1

now is also how a subscriber moves from monthly to yearly mid-month.

Seats are prorated the same way

Add seats with change-quantity. With prorated_now, Flint charges the prorated difference for the new count and keeps the period. Add seats twice in one period and Flint credits each order that paid for the time:

cURL
curl -X POST https://api.withflintpay.com/v1/subscriptions/sub_1kmn0aExample/change-quantity \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: seats-sub-ada-001" \
  -H "Content-Type: application/json" \
  -d '{
    "billing_starts": "prorated_now",
    "line_items": [{ "subscription_line_item_id": "sli_1kmn0aExample", "quantity": 10 }]
  }'

The same preview endpoint takes mode: "quantity_change" with the line_items you plan to send.

Downgrades wait for renewal

A downgrade with period_end keeps the plan the subscriber paid for until November 1, then bills $29.00. The subscription shows the pending change in scheduled_plan_change until it takes effect:

cURL
curl -X POST https://api.withflintpay.com/v1/subscriptions/sub_1kmn0aExample/change-plan \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: downgrade-sub-ada-001" \
  -H "Content-Type: application/json" \
  -d '{
    "subscription_plan_id": "plan_1kmn0cExample",
    "billing_starts": "period_end"
  }'

Buyers make the same changes from your account pages through /v1/me/subscriptions/{subscription_id}/change-plan, with the timing you allow on each plan, and preview them with /v1/me/subscription-previews. The proration guide works through the full math, seat changes, and every refusal.

Who Flint is built for

SaaS products, memberships, and subscription businesses that sell plans and seats and want upgrades paid the day they happen, with the subscription, its orders, and the rest of their catalog in one API. See Flint subscriptions. Subscriptions are an add-on at 0.40% of the payments collected through them, with no monthly fee.

Stripe Billing and Flint plan changes

Stripe Billing subscriptionsFlint subscriptions
Mid-period upgrade, by defaultProration items wait for the next invoiceYour choice per change; prorated_now charges in the same call
Payment declinedChange applies and the subscription goes past_due, unless you use pending updatesChange applies only if the payment succeeds
PreviewPreview invoice of the next bill; pin proration_date on both calls/v1/subscription-previews returns the credit and today's charge
DowngradeCredit on the next invoice, or a subscription scheduleperiod_end keeps the paid plan until renewal
Seat count on a price changeResets to 1 unless you send itPaired lines keep their quantities
Proration precisionTo the secondTo the second

Questions, answered

What is proration in Stripe?

When a subscription's price or quantity changes in the middle of a billing period, Stripe credits the unused time on the old price and charges the remaining time on the new one, calculated to the second. A move from a $10 plan to a $20 plan halfway through the month comes to $5: a $5 credit and a $10 charge.

What does proration_behavior do?

It decides what Stripe does with the proration on one update. create_prorations, the default, creates proration invoice items that wait for the next invoice. always_invoice invoices them immediately and attempts payment. none creates no prorations for that request. There is no setting that turns prorations off for a subscription, so you pass none on every update.

Why didn't Stripe charge the customer when they upgraded?

Because create_prorations leaves positive prorations pending until the next invoice. Stripe charges right away only when the update also changes the billing interval, resets the billing cycle anchor, moves the subscription from free to paid, or starts or ends a trial, or when you send always_invoice.

Does Stripe refund the credit when a customer downgrades?

No. Negative prorations aren't refunded automatically. The credit reduces the next invoice through the customer's invoice balance. To return money, refund part of the original payment yourself.

How do I preview a proration in Stripe?

Call the Create Preview Invoice API with the subscription, the new items, and subscription_details.proration_date, then send the same proration_date on the update. The old upcoming invoice endpoint, GET /v1/invoices/upcoming, was removed in API version 2025-03-31.basil.

Which subscription API charges for an upgrade at the moment it happens?

Flint. A plan or seat change with billing_starts set to prorated_now charges the prorated difference in the same request, keeps the billing date, and applies the change only if the payment succeeds. A preview endpoint returns the credit and today's charge before you ask the subscriber to confirm.

How does Flint handle downgrades and seat reductions?

With billing_starts set to period_end, the subscriber keeps the plan they paid for until the next renewal, which then bills the new price. Flint holds no credit balance, so a change that would leave the subscriber owed money, such as a prorated_now downgrade, is refused with credit_exceeds_charge and nothing changes. To give money back for part of a period, refund the order that paid it.

Is Flint a good alternative to Stripe Billing for plan changes?

Yes, if you want upgrades billed the day they happen, a preview before every charge, and no surprise items on the next renewal. Subscriptions are an add-on at 0.40% of the payments collected through them, with no monthly fee. Flint processes payments through Stripe, on an account Flint sets up for you or on your own connected Stripe account.

Sources

All sources accessed December 2, 2026.