Skip to content
Create account
or
Sign in
The Stripe Docs logo
/
Ask AI
Create account
Sign in
Get started
Payments
Revenue
Platforms and marketplaces
Money management
Developer resources
Overview
Billing
OverviewAbout the Billing APIs
Subscriptions
Invoicing
Usage-based billing
Quotes
Customer management
Billing with other products
Revenue recovery
Automations
Revenue recognition
Test your integration
Tax
Overview
Use Stripe tax
Manage compliance
Reporting
Overview
Select a report
Configure reports
Reports API
Reports for multiple accounts
Revenue recognition
    Get started
    How Revenue Recognition works
    Data freshness
    Pricing
    Multi-currency
    Connect platforms
    Revenue Recognition for Usage-Based Billing
    Revenue contracts
    Reports
    Overrides
    Audit your numbers
    Examples
    Revenue recognition rules
      Create a rule
      Examples
    Revenue Recognition settings
    Map to your chart of accounts
    Performance obligations API
    Import data to Stripe
    Export data from Stripe
Data
OverviewSchema
Custom reports
Data Pipeline
Data management
HomeRevenueRevenue recognitionRevenue recognition rules

Rules examples

Learn how to use rules through examples.

Tax treatment

To categorize a tax line item (for example, created by Avalara), you can set one rule like the one in this example:

ComponentsValue
Apply toInvoices > Line item description contains all of the following: AvaTax
Effective periodStart: All past dates - End: Indefinite
TreatmentsTax (100%)

If you have a 10 USD invoice line item with the description “Sales Tax calculated by AvaTax," and the invoice finalizes in April, you’d see the account balances as in the following example:

AccountApril
AccountsReceivable10 USD
TaxLiability10 USD

Passthrough fees

To categorize 10% of an amount as a passthrough fee, you can set one rule like the following example:

ComponentsValue
Apply toInvoices > All line items
Effective periodStart: All past dates—End: Indefinite
TreatmentsAmortization over line item service period (90%) and Passthrough fee (10%)

If you have a 100 USD invoice line item (without a service period) that finalizes in April, you’d see the account balances like the following example:

AccountApril
AccountsReceivable100 USD
Revenue90 USD
PassthroughFees10 USD

Exclude transactions from a test customer

To exclude all the standalone payments from a test customer, you can set one rule like the following example:

ComponentsValue

Apply to

Customers > Customer email contains all of the following: test@stripe.com

Other payments > All other payments

Effective periodStart: All past dates—End: Indefinite
TreatmentsExclude revenue (100%)

Other payments from the customer, whose email is test@stripe.com, would be excluded from the report completely.

Exclude standalone payments

To exclude all standalone payments from the report, set a rule like the following:

ComponentsValue
Apply toOther payments > All other payments
Effective periodStart: All past dates—End: Indefinite
TreatmentsExclude revenue (100%)

This rule restricts Revenue Recognition to only include recurring payments and one-time invoice payments in your revenue accounting reports. Standalone payments are excluded from the report.

Amortize revenue over custom time period

In this example, we want to (1) amortize other payments from a small set of customers (for example, cus_AAA and cus_BBB) over one year and (2) amortize the remaining other payments over one month.

We can make two rules and use the order of the rules as shown in the following example:

Rule 1: Amortize other payments over one year

ComponentsValue

Apply to

Customers > Customer ID matches any of the following: cus_AAA, cus_BBB

Other payments > All other payments

Effective periodStart: All past dates - End: Indefinite
TreatmentsAmortization over custom service period (100%) > Amortization starting 0 days from paid time over 1 year

Rule 2: Amortize other payments over one month

ComponentsValue
Apply toOther payments > All other payments
Effective periodStart: All past dates - End: Indefinite
TreatmentsAmortization over custom service period (100%) > Amortization starting 0 days from paid time over 1 month

Other payments from cus_AAA or cus_BBB would match Rule 1, and the revenue would be amortized over one year. Other payments from any other customer would match Rule 2, and the revenue would be amortized over one month.

Was this page helpful?
YesNo
Need help? Contact Support.
Join our early access program.
Check out our changelog.
Questions? Contact Sales.
LLM? Read llms.txt.
Powered by Markdoc