Glossary
Stripe Billing Scripts
Stripe billing scripts are small TypeScript functions that run on Stripe’s own infrastructure at fixed points in the billing flow, called extension points, and replace Stripe’s default logic there, such as how much customer balance an invoice uses, which items go on which invoice, or how a proration is calculated.
Also called: billing scripts, Stripe billing extensions, Billing customizations, Stripe-authored scripts, user-authored scripts, billing extension points
14-day free trial · card required · cancel anytime
Definition
Stripe describes scripts as a way to “program custom billing logic that runs directly on Stripe.” Each one targets a single decision in the billing flow. Stripe calls that point an extension point, and each extension point defines a typed interface: the inputs Stripe sends and the output your function must return. Stripe’s own example is the customer balance extension point, where Stripe passes the invoice total and the current balance, the script returns how much of the balance to apply, and Stripe “uses your result and continues the billing flow.”
There are two kinds. Stripe-authored scripts are prebuilt: you pick one in the Dashboard, set its parameters and activate it, with no code. User-authored scripts are written in TypeScript, packaged as a Stripe App and uploaded with the Stripe CLI. Stripe recommends starting with a Stripe-authored script before writing your own.
Whichever kind you use, a script applies to the whole account, and only one can run for each billing behavior at a time.
Key points
- +Scripts are configured under Settings > Billing > Billing customizations in the Dashboard.
- +Stripe groups them by billing behavior: customer balance, invoice item creation and routing, proration, and discount calculation.
- +Stripe-authored scripts need no code. User-authored scripts are TypeScript, packaged as a Stripe App and reviewed by Stripe before install.
- +Only one script can run per billing behavior or extension point at a time, and it applies account-wide.
- +Most billing scripts run only on subscriptions in flexible billing mode, and none affect standalone invoices.
- +If a user-authored script fails, Stripe falls back to its default behavior for that operation.
- +Switching versions affects future billing only. Invoices already processed stay as they were.
The billing behaviors you can change
Stripe’s Billing customizations page lists each behavior a script can replace and the scripts available for it. The Stripe-authored set covers four.
Customer balance: Minimum amount before collection defers small invoices to the customer balance until the total owed reaches a threshold, and Maximum credit per invoice caps how much credit one invoice can use.
Invoice item creation and routing (the item handling extension point): Separate invoice for metered items puts metered usage on its own invoice, Skip creating a partial period proration item drops partial-period prorations for products you tag with metadata, and Remove zero-quantity metered items before creation drops usage lines with a quantity of exactly zero.
Proration: Prorate by custom interval rounds prorations to whole hours, days, weeks or months instead of seconds, and Credit and debit full product price bills chosen products in full when a subscription changes.
Discount calculation: scripts behind custom coupons, such as a percentage off up to a maximum amount, quantity promotions, and amount or percent off for prices selected by metadata. This extension point also supports classic billing mode, which the others don’t.
For code you write yourself, Stripe’s author-your-own page currently lists customer balance and recurring billing item handling as the billing extension points, and Stripe’s step-by-step build guide uses a prorations extension as its worked example.
How a script is built, reviewed and switched on
Scripts run on Stripe’s managed runtime, so there is nothing to host. At the billing extension points, Stripe says scripts “receive data from Stripe, run your logic, and return a result. External API calls aren’t permitted.” The runtime also rules out patterns such as fetch() and timer functions like setTimeout().
A user-authored script goes through a fixed path: create a Stripe App with the CLI, generate an extension for the extension point, write the TypeScript, upload the app, and wait for Stripe’s review before installing it, even in a sandbox. Stripe starts with an automated review and might require more. Approval for sandbox testing “doesn’t necessarily include live mode,” so a second approval comes before production.
Stripe-authored scripts skip all of that. The first time you set one up, Stripe installs the Stripe Billing Extensions app in the background. Either way, activating or changing a script needs the Super Administrator, Administrator or Developer role, and selecting Default on the same page reverts to Stripe’s standard behavior immediately.
Limits, failures and versions
Stripe lists the limits on every billing script. Only one script can run per billing behavior or extension point. Billing scripts run for subscriptions in flexible billing mode (API version 2025-06-30.basil and later) and for pricing plan and license fee subscriptions, with discount calculation the exception that also supports classic mode. Scripts don’t affect standalone invoices that aren’t tied to a subscription, can’t be shared to connected accounts through Stripe Connect, and don’t support INR invoices that need e-mandates for off-session payments. In Checkout, scripts that need flexible billing mode run only when the session’s mode is subscription and its billing_mode is flexible.
For scripts you write, a run fails if it takes longer than 500 milliseconds, throws an exception, or returns a result that breaks the extension point’s validation rules. Then “Stripe defaults to standard functionality for the operation that caused the failure.” Stripe-authored scripts are worded more broadly: if they fail, Stripe “reserves the right to default to standard functionality or pause subscription processing.” Stripe emails the account when a billing script fails, at most once per extension per UTC calendar day, and every run is visible in Workbench under Extension runs.
Versions only move forward in effect. A version switch applies to all future billing operations for that extension point, and invoices already processed under the earlier version “aren’t retroactively affected.”
What billing scripts mean for QuickBooks
A script never writes to your books. It changes the invoices Stripe produces, and your QuickBooks file is built from those invoices and the payments against them. Each behavior changes something different.
A customer balance script changes when cash is collected, not what was sold. An invoice can be finalized with little or nothing charged while the amount moves to the customer’s balance, which belongs on the balance sheet until a later invoice collects it.
An item handling script changes how many invoices a cycle produces and what is on each one. Splitting metered usage onto its own invoice turns one invoice and one payment into two for the same revenue. Deferring an item leaves it as a pending invoice item that isn’t billed yet, which matters at an accrual-basis month end.
Proration and discount scripts change amounts: the size of the credit and debit lines when a subscription changes, and the discount on an invoice. The revenue and contra-revenue figures in QuickBooks follow them.
Two habits keep the books honest. Note the date any script is activated, changed or reverted in your close notes, because months before and after will not look alike and no earlier invoice changes. And when a cycle looks wrong, check the Extension runs on that subscription before editing anything in QuickBooks. A failed run means Stripe used its default for that operation.
Frequently asked questions
What are Stripe billing scripts?
They are TypeScript functions that run inside Stripe Billing at fixed points called extension points and replace Stripe’s default logic there. Stripe offers prebuilt Stripe-authored scripts you configure in the Dashboard, and you can write your own and upload them as a Stripe App. They cover customer balance, invoice item creation and routing, proration, and discount calculation.
Do I need to write code to use a Stripe billing script?
No. Stripe-authored scripts are selected and configured under Settings > Billing > Billing customizations, and Stripe installs its Stripe Billing Extensions app in the background the first time. Writing your own means TypeScript, a Stripe App uploaded with the CLI, and a review by Stripe before you can install it.
Can I run more than one billing script at a time?
Only one per billing behavior. Stripe says you can only run one script for each billing behavior or extension point at a time, so you could have a customer balance script and an item handling script together, but not two customer balance scripts. Each one applies to the whole account.
What happens if a Stripe billing script fails?
For a script you wrote, Stripe defaults to standard functionality for the operation that failed. A run fails on a timeout over 500 milliseconds, an exception, or an invalid result. For Stripe-authored scripts, Stripe reserves the right to use the default or pause subscription processing. Stripe emails the account about failures, and every run is listed in Workbench.
Do billing scripts change invoices that were already created?
No. Switching to a different script version affects future billing operations only, and Stripe says invoices already processed under a previous version aren’t retroactively affected. Your existing QuickBooks records stay as they were, so note the change date in your close notes.
What customers say about running Stripe through Acodei

“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.”
“Works well and is really helpful for massive transactions. The support is really fast and helpful. 100% recommended.”
Related reading
- Stripe item handling scripts and QuickBooks
- Stripe billing mode
- Stripe proration
- Stripe invoice item
- Stripe preview invoice
More glossary terms
- Undeposited Funds
- Stripe Balance Transaction
- Available vs Pending Balance
- Stripe Dispute
- Stripe Dispute Evidence
- Stripe Fee
- Stripe Balance Adjustment
- QuickBooks Credit Memo
- Stripe Tax
- QuickBooks Tax Code
- Stripe Reserve
- Stripe Tax Rate
- Stripe Fee Credit
- Stripe Credit Note
- QuickBooks Product/Service Item
- Stripe Payout
- QuickBooks Sales Receipt
- QuickBooks Bank Deposit
- QuickBooks Transfer
- Stripe Authorization Hold
- QuickBooks Refund Receipt
- QuickBooks Payment
- QuickBooks Expense
- QuickBooks Journal Entry
- Stripe Financial Account
- Holding Account
- Accounts Receivable
- Bank Feed
- Deferred Revenue
- Stripe PaymentIntent
- Stripe Checkout Session
- Stripe SetupIntent
- Stripe PaymentMethod
- Stripe Charge
- Stripe Refund
- QuickBooks Invoice
- QuickBooks Class Tracking
- QuickBooks Location Tracking
- QuickBooks Project
- QuickBooks Closing Date
- Stripe Invoice Line Item
- Stripe Proration
- Stripe Invoice Status
- Stripe Shipping Rate
- Stripe Transfer
- Stripe Mandate
- Stripe on_behalf_of
- Stripe Invoice Item
- QuickBooks Estimate
- Stripe Invoice Payment
- Stripe Invoice Payment Settings
- Stripe Billing Meter
- Stripe Invoice Template
- Stripe Price
- Stripe Subscription Schedule
- Stripe Subscription Item
- QuickBooks Recurring Transaction
- QuickBooks Sub-Customer
- QuickBooks Audit Log
- QuickBooks Bank Rule
- Stripe Subscription Status
- Stripe Mixed Interval Subscription
- Stripe Trial Settings
- QuickBooks Payment Terms
- Stripe Pending Update
- QuickBooks Tags
- QuickBooks Credit Card Credit
- QuickBooks Vendor Credit
- QuickBooks Bill
- QuickBooks Delayed Charge
- Stripe Billing Mode
- QuickBooks Billable Expense
- Stripe Customer Cash Balance
- QuickBooks Purchase Order
- QuickBooks Opening Balance
- QuickBooks Account Type
- QuickBooks Sales Tax Center
- Stripe Webhook
- Stripe Metadata
- Stripe Outbound Payment
- Stripe Received Credit
- Stripe Outbound Transfer
- Stripe Inbound Transfer
- Stripe Received Debit
- Stripe Payout Method
- Stripe Financial Account Transaction
- Stripe Financial Address
- Stripe Application Fee
- Stripe Connected Account
- Stripe Destination Charge
- Stripe Separate Charges and Transfers
- Stripe Direct Charge
- Stripe Payment Method Configuration
- Stripe Dynamic Payment Methods
- Stripe Payment Method Rules
- QuickBooks Bundle
- Stripe Account Capability
- Stripe Merchant of Record
- Stripe Data Pipeline
- Settlement Currency
- Hosted Invoice Page
- Stripe Customer
- Stripe Product
- QuickBooks Home Currency
- QuickBooks Exchange Gain or Loss
- QuickBooks Trial Balance
- QuickBooks General Ledger Report
- QuickBooks Retained Earnings
- QuickBooks Profit and Loss Report
- QuickBooks Balance Sheet Report
- QuickBooks Account Register
- QuickBooks Reclassify Transactions
- QuickBooks A/R Aging Report
- QuickBooks Sales Tax Liability Report
- QuickBooks Sales Tax Payable
- Stripe Tax Transaction
- Stripe Tax Location Report
- Stripe Tax Summarized Export
- Stripe Tax Itemized Export
- Stripe Product Tax Code
- QuickBooks Vendor
- Economic Nexus
- Reverse Charge
- Stripe Statement Descriptor
- Stripe Taxability Reason
- Stripe Tax Filing Currency
- Stripe Tax Cross-Border Goods Option
- Stripe Tax Threshold Monitoring
- QuickBooks Uncategorized Income
- QuickBooks Sales by Product/Service Report
- QuickBooks Sales by Customer Report
- QuickBooks Group Tax Rate
- Form 1099-NEC
- SEPA Direct Debit
- Bacs Direct Debit
- Canadian Pre-Authorized Debit (PAD)
- Australia BECS Direct Debit
- Stripe PayTo
- Stripe Test Clock
- QuickBooks Customer Display Name
- Backup Withholding
- QuickBooks Multicurrency
- Form 1042-S
- Form W-8BEN
- Form W-9
- Form 8233
- Form 1042
- Form 1099-K
- Form W-8BEN-E
- Stripe Tax Behavior
- Stripe Customer Tax ID
- Form 945
- ITIN (Individual Taxpayer Identification Number)
- Form 1099-MISC
- Stripe Customer Tax Exempt Status
- EFTPS (Electronic Federal Tax Payment System)
- Tax Representative (Fiscal Representative)
- Nil Return
- Sales Tax Exemption Certificate
- EU One Stop Shop (OSS)
- Place of Supply
- Simplified Tax Invoice
- Input VAT (Input Tax)
- Streamlined Sales Tax (SST)
- Fixed Establishment (VAT)
- VIES VAT Number Validation
- E-Invoicing Mandate
- Tax Point (Time of Supply)
- Sales Tax Holiday
- Digital Services Tax
- VAT Invoice (Full Tax Invoice)
- Output VAT (Output Tax)
- VAT Bad Debt Relief
- Sales Tax Sourcing
- Gross Receipts Tax
- VAT Cash Accounting Scheme
- Reduced VAT Rate
- VAT Flat Rate Scheme (UK)
- VAT Annual Accounting Scheme (UK)
- EU VAT SME Scheme
- Making Tax Digital for VAT
- VAT Payments on Account (UK)
- Stripe Tax Registration
- Non-Established Taxable Person (NETP)
- VAT Group Registration (UK)
- Zero-Rated vs Exempt Supply
- Electronically Supplied Services (ESS)
- Zero-Decimal Currency
- UK VAT Registration Threshold
- QuickBooks Deposit Detail Report
- Payment Settlement Entity (PSE)
- QuickBooks Reconcile
- QuickBooks Bad Debt Write-Off
- Stripe Radar
- Stripe Smart Retries
- Stripe Decline Code
- QuickBooks Voided Transaction
- Stripe Minimum Charge Amount
- Stripe 3D Secure
- Stripe Preview Invoice
- Stripe Quantity Transformation (transform_quantity)
- Stripe Customer-Chosen Price (custom_unit_amount)
- Stripe Adjustable Quantity (adjustable_quantity)
- Stripe Inline Price (price_data)
- Stripe Default Payment Method
- Stripe Multi-Currency Price
- QuickBooks Automatic Application
- QuickBooks Open Invoices Report
- QuickBooks Customer Balance Detail Report
- Stripe Customer Tax Location Status
- Stripe Customer Credit Balance
- QuickBooks Automatic Invoice Reminders
- QuickBooks Delayed Credit
- Wire Transfer Charge Codes (OUR, SHA, BEN)
- QuickBooks Inactive Customer
- Stripe Funding Instructions
- Stripe Multicapture
- Stripe Incremental Authorization
- Stripe Overcapture
- Stripe Thin Event
- Stripe Payment Attempt Record
- Stripe Balance Settings
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