Glossary

Stripe Proration Factor

A Stripe proration factor is the multiplier Stripe applies to an item’s full price to work out a proration line: normally the time remaining divided by the billing period, positive for a debit and negative for a credit.

Also called: proration factor, prorationFactor, currentProrationFactor, Stripe proration multiplier

14-day free trial · card required · cancel anytime

Definition

When a subscription changes partway through a billing period, Stripe creates proration lines: a credit for the unused time on what the customer had, and a debit for the remaining time on what they have now. Each line’s amount is the item’s full cost multiplied by a proration factor. Stripe’s billing scripts documentation defines it as “a multiplier to the item’s full cost to compute the final prorated cost.”

The standard formula is the item’s service period, the time it is actually used, divided by the billing period. An item that runs for the whole period has a factor of 1. A change exactly halfway through a period gives 0.5. Stripe states the sign rule plainly: the factor “is a positive number for DEBIT items (charges) and negative for CREDIT items (credits).”

You won’t usually set the factor yourself. Stripe calculates it, down to the second by default, and you meet it as a named field when you customize prorations with a billing script. Knowing how it works still lets you check any proration line by hand, which is the fastest way to answer a customer who asks where an odd amount like 10.32 USD came from.

Key points

  • +Proration amount = the item’s full price × the proration factor.
  • +For a debit, the factor is the service period divided by the billing period, so a full period is 1 and half a period is 0.5.
  • +Debits have positive factors and credits have negative factors.
  • +A credit’s factor is measured against the service period of the debit it reverses, not against the billing period.
  • +Stripe calculates prorations down to the second by default, so factors are rarely round numbers.
  • +Stripe applies the factor to the subscription’s discounted price, and proration lines are marked discountable=false.
  • +In proration scripts the factor appears as currentProrationFactor (input) and prorationFactor (output), capped at 1,000.

How Stripe calculates the factor

For a debit, Stripe takes the time from the change to the end of the item’s current period and divides it by the length of the billing period. Stripe’s scripts documentation describes the debit factor as “the fraction of the original billing period” that the remaining time represents.

Take a monthly price in a 31-day January. A change that takes effect at the start of January 16 leaves 16 of the month’s 31 days, so the factor is 16 ÷ 31, about 0.516. The debit for the new price is that fraction of the new price, and the credit for the old one is the same fraction of the old price, with a minus sign.

Because the default is by the second, a change at 6:00 pm gives a slightly different factor from a change at 6:00 am on the same day. If you preview an invoice before making the change, Stripe suggests passing the same proration_date to the preview and the update so both use the same moment. If you want factors in whole days, hours, weeks or months, Stripe’s Prorate by custom interval script rounds them for you.

Why credits are measured against the debit

A credit doesn’t refund a fraction of a billing period. It refunds a fraction of a specific charge. Stripe’s documentation says a credit proration’s factor “is negative and represents the fraction of the debit to credit back.” Its example: if the debit covered 30 days and you credit the remaining 6, the factor is -0.2, because 6 is a fifth of 30.

This matters most when the charge being reversed didn’t cover a full billing period, such as an earlier proration debit. Measured against the billing period, the credit would come out wrong. Measured against the debit it reverses, it returns exactly the unused share of what the customer paid.

The billing mode decides which charge counts as the debit. Stripe’s example is a 10 USD monthly subscription billed on April 1, upgraded to 20 USD on April 11 with no prorations, then downgraded back to 10 USD on April 21 with prorations. In classic billing mode, Stripe credits a third of a month at the 20 USD price, 6.67 USD, though the customer never paid it, and the invoice total is -3.34 USD. In flexible billing mode, Stripe credits a third of the 10 USD actually billed on April 1, the debit and credit cancel, and the invoice total is 0 USD. Credit items carry proration_details.credited_items when Stripe can identify the debit they reverse, so you can trace each credit back to its charge.

Checking a proration line by hand

You can work any proration line back to its factor with three numbers: the price, the line’s period, and the billing period.

Take a customer on a 20 USD monthly plan who upgrades to 40 USD at the start of January 16, with 16 of 31 days left. The factor is 16 ÷ 31, about 0.516. The debit for the new price is 40 × 0.516, about 20.65 USD. The credit for the old price is -20 × 0.516, about -10.32 USD. The net charge for the upgrade is about 10.33 USD. These are illustrative figures. Stripe’s own amounts will differ slightly if the change didn’t land exactly at midnight, because the default is by the second.

If a line doesn’t match, check three things before assuming an error. First, Stripe uses the subscription’s discounted price, not the list price, to calculate prorations. Second, a credit is measured against the debit it reverses, which may not be the current price in classic billing mode. Third, an active proration script may have rounded the period or replaced the factor. When a script sets a custom factor, Stripe requires it to equal the line’s displayed period divided by the billing period for debits, or by the corresponding debit’s service period for credits, so the line’s period still tells you the factor.

What the factor means for QuickBooks

Proration lines reach your books as ordinary invoice lines: a negative line for the credit and a positive line for the debit, usually on the same invoice. The factor explains each amount, so it is what a bookkeeper uses to check that a mid-period change was billed correctly before it is recorded.

The factor also tells you which period the money belongs to. A 20.65 USD debit with a factor of 0.516 pays for the last 16 days of January, not for the whole month. If you recognize subscription revenue over the service period rather than on the invoice date, the line’s period is what you spread it over. Your accountant should confirm the treatment for your business.

Two details make proration lines look different from other revenue lines. They are marked discountable=false, so an invoice-level discount on the same invoice never reduces them, even though Stripe calculated them from the discounted price. And in classic billing mode a credit can be larger than anything the customer paid at that price, which can leave a negative invoice total that your books have to handle as a credit rather than a sale.

Frequently asked questions

What is a proration factor in Stripe?

It is the multiplier Stripe applies to an item’s full price to get a proration amount. For a debit it is normally the remaining service period divided by the billing period, so a change halfway through a month gives 0.5. Debits have positive factors and credits have negative ones.

Why is a Stripe proration credit factor negative?

Stripe uses the sign to tell credits from charges: debit items have positive factors and credit items have negative ones. A credit’s factor is the fraction of the original debit to give back. If the debit covered 30 days and 6 remain, the factor is -0.2.

How do I check a Stripe proration amount?

Divide the line’s period by the billing period to get the factor, then multiply by the price. For a 40 USD monthly price with 16 of 31 days left, 40 × 16 ÷ 31 is about 20.65 USD. Use the discounted price if the subscription has a discount, and remember that Stripe prorates to the second by default.

Why doesn’t my Stripe proration match the formula?

The usual reasons are that Stripe prorated to the second rather than whole days, that it used the subscription’s discounted price, or that the credit was measured against an earlier debit. In classic billing mode a credit uses the current price even if the customer never paid it. A proration script can also change the factor.

Can I change the proration factor Stripe uses?

Yes, with a proration script. Stripe’s Prorate by custom interval script rounds prorations to whole hours, days, weeks or months. A custom script can return its own prorationFactor for each item, but it must be positive for debits, negative for credits, no more than 1,000, and consistent with the line’s displayed period.

What customers say about running Stripe through Acodei

Stripe Verified Partner BadgeIntuit QuickBooks
★★★★★
“If you're testing out all the different Stripe/QuickBooks integration apps right now, let me save you some time. This one is the best one by far.”
RyanOwner at Indie Music Academy
★★★★★
“Works well and is really helpful for massive transactions. The support is really fast and helpful. 100% recommended.”
AndresCo-founder and CEO at Kanguro Collections and Reinsurance

Related reading

More glossary terms

See the full glossary

Ready to try Acodei?

Connect Stripe to QuickBooks Online in minutes and let the fees, refunds, and payouts land where your accountant expects them.

14-day free trial · card required · cancel anytime