Skip to content
Create account
or
Sign in
The Stripe Docs logo
/
Ask AI
Create account
Sign in
Get started
Payments
Finance automation
Platforms and marketplaces
Money management
Developer tools
Get started
Payments
Finance automation
Get started
Payments
Finance automation
Platforms and marketplaces
Money management
Overview
Billing
    Overview
    About the Billing APIs
    Subscriptions
    Invoicing
    Usage-based billing
    Connect and Billing
    Tax and Billing
    Quotes
    Revenue recovery
    Automations
      Automation recipes
    Scripts
    Revenue recognition
    Customer management
    Entitlements
    Test your integration
Tax
Reporting
Data
Startup incorporation
HomeFinance automationBilling

Automations

Learn how to customize subscription and invoice workflows with automations.

Copy page

Stripe Billing automations are a no-code way to build custom, automated workflows to streamline your business processes, enhance customer communication, and improve revenue recovery efforts.

Tailor automated workflows to fit your specific use case, for example:

  • Custom dunning flow for annual subscribers
  • Notify your team when high value invoices are overdue
  • Email a confirmation when a subscription is canceled
  • Give new users a spend credit at signup Beta

Workflows consist of triggers, filter conditions, and actions. This guide describes how to use those to build and configure your own custom automation. Follow an automation recipe to get started with common use cases.

Set up automations

To get started with automations, follow these steps:

  1. In the Stripe Dashboard, go to the Automations tab in Billing.
  2. Click New automation or press the n key.
  3. Name the automation.
  4. Select the event that you want to trigger the automation.
  5. (Optional) Add filter conditions so that your automation only runs when the specified conditions are met.
  6. Add a sequence of actions and delays.
  7. (Optional) If the selected trigger applies to other automations, drag the new automation to the desired position in the priority order, then click Save.

Warning

When using automations, the next_payment_attempt is no longer set in invoice.payment_failed webhooks but is set in invoice.updated webhooks.

Choose a trigger

You can choose from five triggers:

TriggerDescriptionExample use case
Invoice due date upcomingActions are executed relative to the due date of the invoice. The automation terminates when the invoice is paid, voided, or auto_advance is turned off. This trigger is only for invoices with collection_method set to send_invoice.Manage customer communication by scheduling invoice.will_be_due webhooks at custom intervals.
Invoice is finalizedTriggered when an invoice is finalized. The automation terminates when the invoice is paid, voided, or auto_advance is turned off.Mark invoices for certain customer segments as uncollectible (write-off) after a period of time.
Invoice is overdueTriggered when an invoice becomes overdue. The automation terminates when the invoice is paid, voided, or auto_advance is turned off. This trigger is only for invoices of type send.Manage customer communication by scheduling invoice.overdue webhooks at custom intervals. Manage collections by scheduling emails to the collections team.
Subscription is canceledTrigger when a subscription is canceled.Email a cancellation confirmation to the customer. Optionally include a cancellation reason survey.
Subscription payment failsTriggered when a subscription invoice payment fails its first attempt. The automation terminates when the invoice is paid, voided, or auto_advance is turned off.
  • Custom retry behavior for a subset of customers
  • Notify your collections team of high-value payment failures.

Choose filter conditions

After selecting a trigger, you can add one or more filter conditions. These conditions need to be met for your automation to run. For example, if you filter for customers on annual subscriptions, the automation only runs if there are annual subscriptions.

Depending on the trigger, the following filter conditions are available:

ConditionDescription
Customer metadataA key-value pair to match on customer metadata.
Invoice metadataA key-value pair to match on invoice metadata.
Invoice amountA minimum or maximum amount per invoice defined in your default currency. Invoices not denominated in your default currency are evaluated against their conversion.
Subscription intervalLimit to yearly or monthly subscriptions.
ProductLimit to invoices or subscriptions that contain at least one of the products specified.

You can use the Metadata API field to directly apply metadata for customers and invoices.

Choose actions

The following table describes the available actions for the various triggers:

ActionDescriptionSupported triggers
Set retry policyA retry policy defines how failed charges are retried. This action allows you to create a custom policy and attach it to an invoice.Subscription payment fails
Mark subscription unpaidThe subscription continues to generate invoices each billing cycle, which remain in draft state.Subscription payment fails
Cancel subscriptionCanceling subscriptions disables creating new invoices for the subscription and stops automatic collection of all invoices from the subscription by setting auto_advance to false. When you cancel a subscription, the Automation immediately stops running.Subscription payment fails
Mark invoice uncollectibleThe customer is unlikely to pay this invoice and you want to treat it as bad debt in your accounting process.
  • Subscription payment fails
  • Invoice finalized
  • Invoice overdue
Send team emailEmail a custom memo, along with details about the trigger to a team member or internal email address.All triggers
Send subscription cancellation emailEmail a cancellation confirmation to your customers. You also have the option to include a survey link to collection cancellation reasons.Subscription is canceled
Send invoice.will_be_due webhookYou can schedule this webhook to be triggered with custom delays to get reminders about an invoice that’s about to be due.Invoice due date is set
Create subscription BetaCreates a subscription for the newly created customer with a single product and price.Customer is created
Credit customer balance BetaMakes a positive adjustment to the customer credit balance in the amount you choose.Customer is created

Manage and edit your automations

This section describes how to priority order and pause or stop automations. These actions help make sure your automations run as expected.

Priority ordering

You can configure multiple automations for the same trigger, but each event only triggers one automation. When an event occurs that applies to multiple automations, Stripe checks their filter conditions in priority order and runs the first one that matches. All other automations are ignored.

If an automation executes, it ignores your global settings.

  • Scenario A: You create an automation for the Subscription payment fails event with no conditions applied. In this scenario, the automation runs every time a subscription payment fails. Your default settings for subscription payment failure won’t run.

  • Scenario B: You create an automation for the Subscription payment fails event with the condition that the invoice must be greater than 100 USD. In this scenario, the automation runs if the subscription payment fails and the invoice is over 100 USD. If a subscription payment fails and the invoice is less than 100 USD, your default settings for subscription payment failure run instead.

To change a trigger’s priority order, open the list of automations, click the overflow menu () for any of that trigger’s automations, and select Update priority. You can also select it from the Actions menu on the automation details page. In the Set priority panel, drag each automation to the desired position and then click Save.

Pausing or stopping automations

To switch off or pause an automation, go to the Automations tab on the Revenue recovery page and turn off that automation’s toggle. If any executions are in progress for that automation, you can let them finish or immediately cancel all of them.

You can turn the automation on again at any time.

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