## Building and Distributing Stripe Apps

This documentation section provides comprehensive guidance on developing, deploying, and managing applications within the Stripe ecosystem. It covers the entire lifecycle of a Stripe App, from initial setup and authentication to UI development, distribution, and ongoing maintenance.

### Core Concepts and Getting Started

*   **Overview of Stripe Apps**: Understand the fundamental capabilities and benefits of building apps on Stripe, including embedding custom UIs and orchestrating the Stripe API.
*   **Getting Started with Stripe Apps**: A step-by-step guide to building your first "Hello, world!" app, including setting up the Stripe CLI and creating a basic UI extension.
*   **How Stripe Apps Work**: Delve into the architecture of Stripe Apps, including frontend and backend components, and how they integrate with the Stripe Dashboard.
*   **Common Use Cases**: Explore various scenarios for building Stripe Apps, categorized into backend, frontend, and full-stack applications, with examples for each.

### Development and Customization

*   **Build an App**: General guidance on the app development process.
*   **Build a UI**: Learn how to create custom user interfaces within the Stripe Dashboard using TypeScript, React, and Stripe's UI Extensions SDK.
    *   **How UI Extensions Work**: Understand the sandboxed environment and how UI extensions interact with Stripe.
    *   **Next Generation UI Components**: Get early access to updated UI components for enhanced development.
    *   **Component Hierarchy Constraints**: Learn about rules governing component composition to ensure predictable UI behavior.
    *   **UI Testing**: Utilize provided utilities and helpers for testing your app's user interface.
    *   **UI Components**: A comprehensive reference of available UI components for building your app's interface, including:
        *   Layout and Structure: `Box`, `Inline`, `ContextView`, `FocusView`, `FullPageView`, `OnboardingView`, `SettingsView`, `SignInView`, `FullPageTabs`, `OverviewPage`.
        *   Input Controls: `Button`, `ButtonGroup`, `Checkbox`, `DateField`, `FormFieldGroup`, `Radio`, `SearchField`, `Select`, `Switch`, `TextArea`, `TextField`.
        *   Information Display: `Accordion`, `Badge`, `Banner`, `BarChart`, `Chip`, `DataTable`, `Divider`, `Icon`, `Img`, `LineChart`, `Link`, `List`, `Menu`, `PropertyList`, `Sparkline`, `Spinner`, `Toast`, `Tooltip`, `Table`, `Tabs`, `TaskList`.
*   **Add Server-Side Logic**: Implement backend code for validating user actions, processing data, integrating with third-party systems, and handling webhooks.
*   **API Authentication Methods**: Choose and implement the appropriate authentication method for your app (Platform key, OAuth 2.0, Restricted API Key).
    *   **OAuth 2.0**: Detailed guide on implementing the industry-standard OAuth 2.0 flow.
    *   **Restricted API Key Authentication**: Learn how to use RAKs for more secure API access.
*   **Authorization Flows**: Implement PKCE OAuth workflows for secure authentication.
*   **Store Secret Credentials and Tokens**: Securely persist sensitive data like authentication credentials using the Secret Store API.
*   **Handle Different Modes**: Adapt your app to function correctly in both live and sandbox environments.
*   **Enable Sandbox Support**: Configure your app for installation and testing in Stripe's sandbox environment.
*   **Enable Local Network Access**: Configure your browser to allow local network access for app previewing.
*   **App Settings Page**: Create a dedicated page for users to configure their app settings within the Stripe Dashboard.
*   **Deep Links**: Create URLs that allow users to navigate directly to specific parts of your app within the Dashboard.
*   **Install Links**: Enable users to install your app outside of the Stripe App Marketplace.
*   **Post-Install Actions**: Support additional configurations or actions required after a user installs your app.
*   **Using Roles in UI Extensions**: Tailor app functionality based on user roles within the Stripe Dashboard.

### Migration and Legacy Integrations

*   **Migrating to Stripe Apps**: Understand the benefits and process of migrating from legacy extensions to the modern Stripe Apps platform.
    *   **Migrate an Extension to Stripe Apps**: Guidance on moving existing integrations.
    *   **Migrate a Plugin to Stripe Apps or Stripe Connect**: Decide on the best migration path for your integration.
    *   **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**: Information about the deprecated extensions integration pattern.

### Distribution and Publishing

*   **Distribution Options**: Learn about the different ways to share your Stripe Apps with users.
*   **Upload and Install Your Stripe App**: Make your app available to team members within your Stripe account.
*   **Publish Your App to the Stripe App Marketplace**: Guide to getting your app approved and listed on the global Stripe App Marketplace.
    *   **Stripe Apps Quality Requirements**: Understand the criteria for app review and marketplace listing.
*   **Test Your App Externally**: Set up and distribute test versions of your app to a limited group of testers before full publication.
*   **Manage Your App's Versions and Releases**: Learn about app versioning strategies and how to ship new versions.
*   **Promote Your App**: Discover how to partner with Stripe to grow your app's reach and discoverability.

### Reference and Best Practices

*   **App Manifest Reference**: A detailed guide to the `stripe-app.json` file, including all fields, types, and descriptions.
*   **Stripe Apps CLI Reference**: Learn how to use the command-line interface to manage your Stripe app.
*   **Permissions Reference**: Understand 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**: A list of available viewports where your app's UI extensions can be displayed.
*   **Design Patterns for Stripe Apps**: Follow recommended patterns for a consistent, clear, and scalable app design.
    *   **Full Page Apps**: Design patterns for creating comprehensive, multi-view interfaces.
    *   **Action Buttons**: Guidelines for placing and using action buttons effectively.
    *   **Onboarding Flow**: Best practices for creating an effortless and intuitive onboarding experience.
    *   **Additional Context**: Strategies for providing extra information during onboarding.
    *   **Back Link**: How to implement clear navigation to previous pages.
    *   **Communicating State**: Techniques for informing users about actions and status.
    *   **Demo Content**: Tips for showcasing your app's core functionality.
    *   **Empty State**: How to clearly indicate when no data is available.
    *   **Filter Controls**: Using components to allow users to filter data.
    *   **Lists**: Best practices for displaying collections of information.
    *   **Loading**: Implementing spinners and indicators for data loading.
    *   **Progress Stepping**: Guiding users through multi-step tasks.
    *   **Redirects**: Creating clear and user-friendly redirects.
    *   **Settings Sign In**: Onboarding users through a settings page.
    *   **Sign In Template**: Using the `SignInView` component for secure authentication.
    *   **Sign Out**: Implementing a clear sign-out process.
    *   **Waiting Screens**: Informing users about wait times and next steps.
*   **Style Your App**: Learn how to style UI components using Stripe's design tokens for visual consistency.
*   **Design Your App**: Get started with design tools, guidelines, and philosophy for building user-friendly Stripe Apps.