## Stripe Apps: Building and Distributing Integrations

This documentation section provides a comprehensive guide to developing, distributing, and managing applications (Stripe Apps) within the Stripe ecosystem. Stripe Apps allow developers to extend Stripe's functionality by embedding custom user interfaces directly into the Stripe Dashboard or orchestrating the Stripe API for various business needs.

### Core Concepts and Getting Started

*   **What are Stripe Apps?**
    *   Stripe Apps enable the creation of custom applications that can interact with Stripe data and functionality. They can be used for internal purposes or published on the Stripe App Marketplace.
    *   Key capabilities include:
        *   Creating and modifying Stripe data (customers, invoices, etc.).
        *   Syncing Stripe data with external systems.
        *   Customizing the Stripe user interface.
*   **Getting Started with Stripe Apps:**
    *   **Create an App:** The initial step involves creating a new Stripe App, often starting with a "Hello, world!" example.
    *   **How Stripe Apps Work:** Understand the fundamental architecture, including frontend (UI extensions) and backend components.
    *   **Sample Apps:** Explore provided examples to see practical implementations of Stripe Apps.

### Development and Customization

*   **Building Your App:**
    *   **App Types:** Differentiate between back-end, front-end, and full-stack applications.
    *   **Server-Side Logic:** Implement backend code to validate user actions, process data, and integrate with third-party systems.
    *   **Building a UI:** Utilize React and Stripe's UI Extensions SDK to create custom user interfaces within the Stripe Dashboard.
        *   **UI Extensions:** Understand how UI extensions render within a secure sandbox.
        *   **UI Components:** Leverage a rich library of pre-built UI components (e.g., Buttons, Forms, Charts, Tables) to construct your app's interface.
        *   **Component Hierarchy Constraints:** Adhere to rules governing component composition.
        *   **Next Generation UI Components:** Explore upcoming UI component updates.
    *   **App Settings Page:** Create a dedicated page for users to configure their app settings.
*   **Authentication and Authorization:**
    *   **API Authentication Methods:** Choose the appropriate method for your app:
        *   **Platform Key:** Uses your account's secret API key.
        *   **OAuth 2.0:** Industry-standard protocol for user authorization.
        *   **Restricted API Key (RAK):** Generates a key with specific, limited permissions.
    *   **Authorization Flows:** Implement secure authorization, including PKCE OAuth workflows.
*   **Data Management and Security:**
    *   **Store Secret Credentials:** Securely persist sensitive data like API keys and tokens using the Secret Store API.
*   **Navigation and User Experience:**
    *   **Deep Links:** Create links that navigate users directly to specific parts of your app within the Dashboard.
    *   **Route Descriptors:** Implement soft, context-preserving navigation between Dashboard pages.
    *   **Onboarding:** Design intuitive onboarding flows to guide users through initial setup.
    *   **Post-Install Actions:** Support configurations that occur after app installation.
    *   **Design Patterns:** Follow recommended patterns for consistent and user-friendly app design (e.g., Action Buttons, Loading states, Empty states, Redirects).
    *   **Communicating State:** Inform users about temporary statuses or required actions.
    *   **UI Testing:** Utilize provided tools and helpers to test your app's user interface.

### Distribution and Management

*   **Distribution Options:**
    *   **Public vs. Private Apps:** Choose between making your app available to all Stripe users or only your team.
    *   **Publishing to the Stripe App Marketplace:** Learn the process of submitting your app for review and listing it publicly.
        *   **App Review Requirements:** Understand the quality standards and guidelines for app review.
    *   **Upload and Install Your App:** Make your app available to team members within your Stripe account.
    *   **Install Links:** Allow users to install public apps outside of the Stripe App Marketplace.
*   **Testing and Previewing:**
    *   **Enable Sandbox Support:** Configure your app for installation in Stripe's testing environments.
    *   **Enable Local Network Access:** Facilitate app previewing by allowing connections to local HTTP servers.
    *   **Test Your App Externally:** Distribute test versions of your app to a limited group of users before public release.
*   **Versioning and Releases:**
    *   **Manage App Versions:** Understand how to version your app and manage releases over time.
*   **Migration:**
    *   **Migrate Extensions to Stripe Apps:** Transition from legacy extension patterns to the modern Stripe Apps framework.
    *   **Migrate Plugins:** Update existing plugins to use secure authentication methods like OAuth 2.0 or Restricted API Keys.

### Reference and Tools

*   **Stripe Apps CLI:** Install and use the command-line interface to manage your app's lifecycle.
*   **App Manifest Reference:** Understand the structure and fields of your `stripe-app.json` file.
*   **Permissions Reference:** Learn about available events and their required permissions.
*   **Extension SDK API Reference:** Documentation for the SDK used in UI extensions.
*   **Viewports Reference:** Understand where your app's UI can be rendered within the Stripe Dashboard.
*   **Developer Tools:** Utilize bundled tools for type checking, linting, and testing.
*   **Upgrade UI Extension SDK:** Guide for updating to the latest version of the UI extension SDK.