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
Versioning
Changelog
Upgrade your API version
Upgrade your SDK version
Developer tools
SDKs
API
Testing
Workbench
Event Destinations
Workflows
Stripe CLI
Stripe Shell
Developers Dashboard
Agent toolkit
Stripe health alertsBuild with LLMsStripe for Visual Studio CodeFile uploads
Security
Security
Extend Stripe
Stripe Apps
    Overview
    Get started
    Create an app
    How Stripe Apps work
    Sample apps
    Build an app
    Store secrets
    API authentication methods
    Authorization flows
    Server-side logic
    Listen to events
    Handle different modes
    Enable sandbox support
    App settings page
    Build a UI
    Onboarding
    Distribute your app
    Distribution options
    Upload your app
    Versions and releases
    Test your app
    Publish your app
    Promote your app
    Add deep links
    Create install links
    Assign roles in UI extensions
    Post-install actions
    App analytics
    Embedded components for Apps
    Embed third-party Stripe Apps
    Migrating to Stripe Apps
    Migrate or build an extension
    Migrate a plugin to Stripe Apps or Stripe Connect
    Reference
    App manifest
    CLI
    Extension SDK
    Permissions
    Viewports
    Design patterns
    Components
Stripe Connectors
Partners
Partner ecosystem
Partner certification
HomeDeveloper toolsStripe Apps

Handle different modesPublic preview

Learn how to adapt your app to handle live mode, test mode, and a sandbox environment.

Copy page

During installation, users can choose which mode to install your app into.

The location of the mode selection option during the Stripe App installation flow

Try it in test mode option

In the App Marketplace, potential users see a Try in test mode option to encourage them to try out an app.

The location of the "Try it in test mode" call to action in the App Marketplace

Caution

If your app uses the OAuth API access type or an external install url, the Try in test mode option won’t be shown in the App Marketplace.

Shortcut to install in opposite mode

If a user has one mode installed, you can install the other mode directly from the Stripe Dashboard.

The location of the button in the Stripe Dashboard to install the app in the opposite mode

Webhooks

If your app is set up to listen to events for your installed users accounts, it requires additional setup to make sure you can handle having your app installed in test mode (or sandbox environments).

If a user installs your app into live mode only, any applicable live mode events are sent to your live mode webhook endpoints. If a user installs your app into test mode only, any applicable test mode events are sent to your test mode webhook endpoints. If a user installs your app into both live mode and test mode, test mode events are sent to your test mode and live mode webhook endpoints and live mode events are sent only to your live mode webhook endpoints. If a user installs your app into a sandbox environment, Stripe sends events exclusively to the webhook endpoints for the sandbox.

Note

We recommend that you set up both live and test webhook endpoints to make sure that both modes are properly supported. See event behavior for more information and examples about how the install mode affects event behavior.

OAuth test mode links

OAuth apps initiate app installation from within their platform. The developer is responsible for implementing a test mode install link if you want test mode support. The Stripe Dashboard provides a test mode OAuth install link.

The location of public OAuth links within the Stripe Dashboard

The Stripe Apps OAuth documentation has more information on creating OAuth install links.

See also

  • Webhooks
  • Event destinations
  • Server-side logic
  • OAuth 2.0 API Authentication Type
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