Skip to content
Create account or Sign in
The Stripe Docs logo
/
Ask AI
Create accountSign in
  • Get started
  • Payments
  • Revenue
  • Risk
  • Data
  • Money management
  • Stablecoins
  • Embedded finance
  • Developer resources
More
APIs & SDKsHelp
Overview
Billing
OverviewAbout the Billing APIs
Subscriptions
Invoicing
Usage-based billing
Quotes
Customer management
Retention
Revenue recovery
Automations
Scripts
    Overview
    Stripe-authored scripts
    Author your own scripts
    Configure a script in the Dashboard
Test your integration
Tax
Overview
Use Stripe Tax
Tax rates
Manage compliance
Accounting
Revenue recognition
United States
English (United States)
  1. Home/
  2. Revenue
Public preview

Customize Billing with scriptsPublic preview

Use scripts to program custom billing logic that runs directly on Stripe.

You can use script extensions to customize how Stripe Billing behaves at specific steps in the billing flow. Scripts let you modify the Stripe default behavior when it doesn’t match your billing requirements. Add custom logic to change how to calculate proration amounts, control how to apply customer balances, or define how to route items across invoices. You can configure this and similar behavior through scripts, without building or maintaining anything outside of Stripe.

You can use two types of scripts, both of which run on the Stripe infrastructure as part of the billing workflow. Stripe packages both as apps.

TypeDescriptionWhen to use
Stripe-authored scriptsPrebuilt, ready to use scripts you can activate and configure in the Dashboard.
  • When you need to start quickly with a prebuilt solution.
  • You don’t want to write or maintain any code.
User-authored scriptsYou create the scripts in TypeScript to support logic specific to your business.
  • Your use case requires custom logic to support business rules unique to your operations.
  • You need full control over the behavior.

Get started

Stripe-authored scripts

Activate and configure a prebuilt script directly from the Dashboard without writing any code.

User-authored scripts

Create a custom script with TypeScript and package it as an app.

Configure a script in the Dashboard

Activate and configure a script in the Dashboard.

Was this page helpful?
YesNo
  • Need help? Contact Support.
  • Chat with Stripe developers on Discord.
  • Check out our changelog.
  • Questions? Contact Sales.
  • LLM? Read llms.txt.
  • Powered by Markdoc