## Stripe Apps Documentation

This documentation set provides comprehensive guidance on developing and integrating applications with Stripe through the Stripe Apps platform. It covers everything from initial setup and core concepts to advanced features, UI components, and design best practices.

### Getting Started with Stripe Apps

*   **Overview**: Introduces Stripe Apps as a way to extend Stripe's functionality and embed custom user experiences within the Stripe Dashboard.
*   **Create an App**: Guides users through the initial steps of creating a new Stripe App.
*   **How Stripe Apps Work**: Explains the fundamental architecture and components of Stripe Apps, including frontend and backend considerations.
*   **Sample Apps**: Provides access to example applications to help developers understand implementation details and best practices.
*   **Common Use Cases**: Outlines typical scenarios and how Stripe Apps can address them, categorizing apps into backend, frontend, and full-stack types.

### Building Your Stripe App

*   **Build a UI**: Details how to create custom user interfaces within the Stripe Dashboard using React and Stripe's UI Extensions SDK.
*   **Add Server-Side Logic**: Explains how to integrate a self-hosted backend for secure third-party integrations, webhook handling, and long-running processes.
*   **API Authentication Methods**: Covers the different ways your app can authenticate requests to the Stripe API, including Platform Key, OAuth 2.0, and Restricted API Keys.
    *   **OAuth 2.0**: Specific guidance on implementing OAuth 2.0 for authentication.
    *   **Restricted API Key Authentication**: Details on using Restricted API Keys (RAKs) for more secure access.
*   **Store Secret Credentials and Tokens**: Explains how to securely persist sensitive data like API keys and tokens using the Secret Store API.
*   **Handle Different Modes**: Provides instructions on adapting your app to work seamlessly in both live and sandbox environments.
*   **Enable Sandbox Support**: Guides users on enabling sandbox installation for public apps to allow for testing.
*   **Enable Local Network Access**: Details how to grant permission for local network access, crucial for previewing apps during development.

### UI Components and Design

*   **UI Components**: A reference to the library of pre-built UI components available for building app interfaces. This includes detailed documentation for individual components such as:
    *   **Layout and Structure**: `Box`, `Inline`, `Stack`, `Grid`, `Divider`, `FocusView`, `ContextView`, `DetailPageModule`, `DetailPagePropertyList`, `DetailPageTable`, `FullPageView`, `FullPageTabs`, `OverviewPage`.
    *   **Input and Controls**: `Button`, `ButtonGroup`, `Checkbox`, `DateField`, `FormFieldGroup`, `Menu`, `MenuItem`, `OnboardingView`, `PropertyList`, `Radio`, `Select`, `SettingsView`, `SignInView`, `Switch`, `TextArea`, `TextField`.
    *   **Data Visualization and Display**: `Accordion`, `Badge`, `Banner`, `BarChart`, `Chip`, `Icon`, `Img`, `LineChart`, `Link`, `List`, `Sparkline`, `Spinner`, `Table`, `Tabs`, `TaskList`, `Toast`, `Tooltip`.
*   **Design Your App**: Provides guidelines and philosophy for designing user-friendly and visually consistent Stripe Apps.
*   **Style Your App**: Explains how to use design tokens and custom styling to match the Stripe Dashboard's aesthetic.
*   **Design Patterns**: Offers recommended patterns for common app behaviors and structures, including:
    *   Action Buttons
    *   Additional Context
    *   Back Link
    *   Communicating State
    *   Demo Content
    *   Empty State
    *   Filter Controls
    *   Full Page Apps
    *   Lists
    *   Loading
    *   Onboarding Experience
    *   Progress Stepping
    *   Redirects
    *   Settings Sign In
    *   Sign In Template
    *   Sign Out
    *   Waiting Screens
*   **Component Hierarchy Constraints**: Details rules governing how UI components can be composed to ensure predictable rendering.
*   **Next Generation UI Components**: Provides early access to updated UI components.

### App Distribution and Management

*   **Distribution Options**: Outlines the methods for sharing your Stripe Apps with users, including public publishing and private distribution.
*   **Upload and Install Your Stripe App**: Guides on how to upload your app for team members and install it in test mode.
*   **Manage Your App's Versions and Releases**: Explains app versioning and the process of releasing new versions.
*   **Test Your App Externally**: Details how to set up external testing for your app before public release.
*   **Publish Your App to the Stripe App Marketplace**: Provides a step-by-step guide for getting your app approved and listed on the marketplace.
*   **Stripe Apps Quality Requirements**: Outlines the qualitative requirements for apps to be accepted on the App Marketplace.
*   **Using Install Links**: Explains how to allow users to install your app outside of the Stripe App Marketplace.
*   **Promote Your App**: Information on partnering with Stripe to grow your app's reach.

### Migration and Legacy Information

*   **Migrate an Extension to Stripe Apps**: Explains why and how to migrate older "legacy extensions" to the newer Stripe Apps platform.
*   **Migrate a Plugin to Stripe Apps or Stripe Connect**: Guides on migrating third-party integrations that previously relied on secret API keys.
    *   **Migrate a Plugin to an OAuth 2.0 App**: Specific steps for migrating to OAuth 2.0 authentication.
    *   **Migrate a Plugin to a RAK App**: Specific steps for migrating to Restricted API Key authentication.
*   **Legacy Extensions**: Provides historical reference for deprecated extension patterns.

### Reference and Tools

*   **App Manifest Reference**: A comprehensive guide to the fields and structure of the `stripe-app.json` manifest file.
*   **Stripe Apps CLI Reference**: Documentation for the command-line interface used to manage Stripe Apps.
*   **Permissions Reference**: Details available events and their required permissions for your app.
*   **Extension SDK API Reference**: Documentation for the Extension SDK API, including context props and utility functions.
*   **Viewports Reference**: Lists available viewports within the Stripe Dashboard where your app's UI can be displayed.
*   **Route Descriptors**: Explains how to implement soft, context-preserving navigation within the Dashboard.
*   **UI Extension Developer Tools**: Information on bundled tools for type checking, linting, and testing your UI extensions.
*   **Upgrade Stripe's UI Extension SDK**: Guides on upgrading to the latest versions of the UI extension SDK.
*   **Onboarding**: Guidance on creating intuitive onboarding flows for your app's users.
*   **App Settings Page**: How to create a page for users to configure their app settings.