Installation

Install as Agent Plugin Recommended
copilot plugin marketplace add samueltauil/skills-hub
copilot plugin install stripe-apps@skills-hub

Works with GitHub Copilot CLI and VS Code (enable chat.plugins.enabled). Plugin stripe-apps v1.0.0 follows the Agent Plugins spec.

Install with the gh extension
gh skills-hub install stripe-apps

Don't have the extension? Run gh extension install samueltauil/skills-hub first.

Download and extract to your repository:

.github/skills/stripe-apps/

Extract the ZIP to .github/skills/ in your repo. The folder name must match stripe-apps for Copilot to auto-discover it.

Skill Files (13)

SKILL.md 7.5 KB
---
name: stripe-apps
description: >-
  Build, modify, or review Stripe Apps and extensions using the relevant
  documentation and reference guides. Use for custom Stripe Dashboard UI,
  stripe-app.yaml, @stripe/ui-extension-sdk, @stripe/extensibility-sdk, script
  extensions, extension interfaces, custom workflow actions, and apps that
  authenticate to Stripe or react to events. Also use when deciding whether a
  Stripe extension can support the user's billing or workflow requirements.

---

## Stripe Apps

Select and read the existing guidance for the user’s task. Product documentation describes what an extension can do; implementation guides describe how to build it. Before recommending an extension or writing code, load the applicable bundled reference files as well as the relevant product documentation. A link or filename in this skill isn’t a substitute for reading its contents.

For a capability question, check native Stripe features and the documented applicability and limitations of the extension. For an implementation request, create or modify working files using the selected guide. For an existing app, inspect its manifest, packages, installed SDK, and local agent instructions before deciding what to change.

## Choose the relevant documentation

Use information already supplied by the user or existing app. Read <references/discovery.md> when you need to clarify the app’s requirements, and <references/extension-types.md> for an overview of app architectures. Ask only for missing information that affects the task.

### Product capabilities

Use these existing product documents to determine which capability fits and whether the account has the required access. Don’t infer support from an extension’s name or the existence of a scaffold.

| Task | Read |
| --- | --- |
| Select an extension interface and its supported implementation types | [Extension points](https://docs.stripe.com/extensions/extension-points.md) and [how extensions work](https://docs.stripe.com/extensions/how-extensions-work.md) |
| Change how items are included on subscription invoices | [Item handling extensions](https://docs.stripe.com/billing/scripts/item-handling.md) |
| Customize prorations | [Native proration behavior](https://docs.stripe.com/billing/subscriptions/prorations.md) and [prorations extensions](https://docs.stripe.com/billing/scripts/prorations.md) |
| Apply customer balances | [Customer balance extensions](https://docs.stripe.com/billing/scripts/customer-balance.md) |
| Calculate discount amounts | [Discount calculation extensions](https://docs.stripe.com/billing/scripts/discount-calculation.md) |
| Add an action to Stripe Workflows | [Existing workflow actions](https://docs.stripe.com/workflows/define-workflows.md#actions), [existing custom actions](https://docs.stripe.com/workflows/custom-actions.md), and [how custom actions work](https://docs.stripe.com/extensions/custom-actions/how-custom-actions-work.md) |
| Customize another product’s behavior | Follow the selected interface’s product documentation from the extension-point catalog |

### Implementation guidance

The `references/*.md` files are bundled with this skill. After selecting the capability, load the applicable files before following their links to supporting documentation. Combine rows when an app needs multiple types. Follow the selected guide’s prerequisites, scaffolding, testing, and debugging instructions.

| Task | Read |
| --- | --- |
| Build or modify any Dashboard UI, including drawers and full-page apps | <references/ui-extensions.md>, then each selected component’s current API documentation |
| Author, test, or debug a script extension | <references/script-extensions.md>, then the selected extension point’s implementation guide |
| Build a custom-action script | <references/script-extensions.md> and [build a custom action with a script](https://docs.stripe.com/extensions/custom-actions/build-with-script.md) |
| Build a custom-action remote function | [Build a custom action with a remote function](https://docs.stripe.com/extensions/custom-actions/build-with-remote-function.md) |
| Build a self-hosted UI back-end or webhook service | <references/backend.md> and <references/authentication.md>; also load <references/webhooks.md> when receiving Stripe events |
| Store app credentials with the Secret Store API | The Secret Store API section in <references/backend.md> and [store secrets](https://docs.stripe.com/stripe-apps/store-secrets.md), including for apps without a self-hosted back-end |
| Look up APIs, SDK patterns, configuration, or additional extension documentation | <references/canonical-docs.md> |

Use the UI reference for layout and composition, and current component documentation for import paths, props, and styling APIs. For scripts and remote functions, follow the selected extension’s documentation; UI and self-hosted back-end instructions don’t define their runtime capabilities.

### Shared app lifecycle

Read these references when the corresponding task is needed. Reuse existing apps and packages; scaffold only what is missing.

| Task | Read |
| --- | --- |
| Scaffold, build, test, preview, or upload an app | <references/workflow.md>, together with the selected implementation guide |
| Choose authentication for access to Stripe APIs | <references/authentication.md> |
| Receive Stripe events | <references/webhooks.md> |
| Build a first-run setup experience | <references/onboarding-ux.md> and the UI reference |
| Release versions, change installed permissions, or publish to the marketplace | <references/publishing.md> |
| Submit feedback after running app toolchain commands | <references/feedback.md> |

## Load bundled reference files

1. Use the task tables to select every applicable bundled reference under `references/`, then open those files with a file-reading tool before starting the corresponding work. For example, UI with a self-hosted back-end needs both UI and back-end guidance; onboarding also needs the UI reference.
2. Follow relevant pointers to other bundled references inside the files you load, including filenames written as code rather than links. For example, back-end guidance can require authentication guidance, and changing permissions can require publishing guidance. Use this skill’s direct links to locate those files.
3. Read the canonical documentation required by those references. External documentation supplements the bundled guidance on workflow, layout, and other task-specific decisions.

- Resolve `references/` paths relative to this skill’s directory and bare reference filenames relative to its `references/` directory. When reading the hosted skill, fetch the corresponding reference URLs relative to the skill URL.
- Load only references relevant to the task, and reuse contents already read during the session unless they have changed. A full-stack app doesn’t require every document in the skill.
- Read canonical pages using the available documentation tools. Prefer `stripe docs` when available, including for pages that require account access.
- Use current product documentation and the installed SDK’s types for API contracts and limitations. If an example in a reference disagrees, check the version and follow the applicable canonical documentation.
- Read any interface-specific agent instructions supplied with an existing or newly generated extension. If none are present, use the linked product and implementation guides.
- If the documentation doesn’t establish that an extension meets a requirement, state what is unknown or unsupported before proceeding.
- Keep the work within the user’s request. Report the changes, validation results, and remaining steps relevant to that app.
references/
authentication.md 4.6 KB
# Authentication — platform keys, OAuth, restricted API keys

## Authentication

How your app authenticates and accesses Stripe data for merchants who install it.

**Canonical page:** https://docs.stripe.com/stripe-apps/api-authentication

Read this page using an available documentation tool before implementing authentication patterns.

## Three authentication types

Stripe Apps supports three authentication methods, configured via `stripe_api_access_type` in the app manifest:

| Auth type | Manifest value | How it works | Best for |
| --- | --- | --- | --- |
| Restricted API key (recommended) | `restricted_api_key` | Stripe generates a scoped key at install; merchant provides it to your system | Private apps and integrations where users provide a scoped key |
| Platform keys | `platform` | Your secret key + `Stripe-Account` header to act on behalf of installers | Public/marketplace apps that need to act across many merchants |
| OAuth 2.0 | `oauth` | Standard OAuth flow generates access tokens per-account | Apps where merchant must be merchant-of-record |

### Choosing the right type

**Default to restricted API keys** unless you have a specific reason to use platform keys or OAuth. RAKs provide scoped permissions without using your app account’s key to act on behalf of installing accounts.

Use a different type when:

1. **You need Connect webhook fanout** (events from all merchants to one endpoint): Platform keys.
2. **You’re building a public marketplace app acting across many merchants:** Platform keys.
3. **The merchant must be the merchant-of-record for charges:** OAuth.
4. **Private app or fewer merchants, no Connect fanout needed:** Restricted API keys (simplest).

## Platform keys

Your app’s API key acts on behalf of a merchant’s account using the `Stripe-Account` header:

```javascript
// Use a restricted API key when possible; fall back to secret key only for platform-key apps
const stripe = require("stripe")(process.env.YOUR_API_KEY);

await stripe.customers.list({}, {
  stripeAccount: "acct_xxxxx", // the merchant's account ID
});
```

**How to get the merchant’s account ID:**

- From a webhook event: `event.account`
- From `fetchStripeSignature` payload: the signed data includes `account_id`
- From the UI extension: `userContext.account.id` (top-level prop)

**Key fact:** Platform keys use the same `Stripe-Account` header mechanism as Stripe Connect. Installers are NOT onboarded as connected accounts in the traditional sense — the header simply authorizes your key to access their account within the app’s declared permissions.

## OAuth 2.0

Use OAuth when the installing account needs to be the merchant of record for charges, or when you need the merchant’s own Stripe identity on API calls.

Most apps do NOT need OAuth. Use platform keys unless you specifically need this.

For implementation, read: https://docs.stripe.com/stripe-apps/pkce-oauth-flow

## Restricted API keys

With RAK apps, Stripe generates a restricted key at install time with only the permissions your app declared. The merchant copies this key to your system.

Key differences from platform keys:

- Each installing account provides its own scoped key
- Can’t use Connect webhook fanout (each merchant manages their own webhooks)
- Simpler model for private apps or apps with fewer merchants

## Authenticating the UI to your backend (fetchStripeSignature)

`fetchStripeSignature` proves to your backend that a request came from a legitimate app installation.

Key facts:

- The signed payload contains `user_id` and `account_id` by default (field order matters)
- You can include additional data by passing it to `fetchStripeSignature(extraPayload)`
- Backend verifies with `stripe.webhooks.signature.verifyHeader()`
- The signing secret (starts with `absec_...`) is generated on first `stripe apps upload`

For the full implementation pattern, read: https://docs.stripe.com/stripe-apps/build-backend

## Identifying the installing merchant

When a merchant installs your app, Stripe sends an `account.application.authorized` event. When they uninstall, it sends `account.application.deauthorized`.

Store the account ID from `event.account` to make future API calls on their behalf.

## Permission scopes

Use the CLI to add permissions to your app:

```bash
stripe apps grant permission "customer_read" "Read customer data to show in the Dashboard"
stripe apps grant permission "event_read" "Receive webhook events"
```

This updates `stripe-app.yaml` with the correct format automatically.

**When you change permissions:** existing users must re-authorize. The app returns an invalid-request error for undeclared permissions until the user re-authorizes. See `publishing.md` for details.
backend.md 4.3 KB
# Backend — when and how to add server-side logic

## When you need a backend

You need a backend if your app needs to:

- Store data long-term (user preferences, linked accounts, custom records)
- Call APIs that require server-side secrets (API keys that can’t be in the browser)
- Run logic when the user isn’t in the Dashboard (webhooks, scheduled jobs)
- Call third-party services securely (email providers, CRMs, spreadsheet APIs)
- Perform actions that take longer than the UI can wait for

**You don’t need a backend if:**

- Your app only reads and displays Stripe data (use the SDK client directly in the UI)
- You only need to store a small amount of sensitive data — use the Secret Store API instead

## Canonical documentation

Before writing back-end code, read these pages using an available documentation tool:

| Topic | URL |
| --- | --- |
| Backend implementation + fetchStripeSignature | https://docs.stripe.com/stripe-apps/build-backend |
| Authentication types (determines backend pattern) | https://docs.stripe.com/stripe-apps/api-authentication |
| Events and webhooks | https://docs.stripe.com/stripe-apps/events |
| Secret Store API | https://docs.stripe.com/stripe-apps/store-secrets |

## Backend architecture decisions

### Authentication type determines the backend pattern

Your app’s `stripe_api_access_type` controls how the backend authenticates. See `authentication.md` for the full breakdown of auth types and when to use each one.

### CORS configuration

CORS (`Access-Control-Allow-Origin: *`) is needed ONLY on endpoints called by the UI extension. The UI runs in a sandboxed iframe with a `null` origin — specific origin allowlisting won’t work.

Webhook endpoints do NOT need CORS — they receive requests from Stripe’s servers, not from the browser.

### fetchStripeSignature verification

`fetchStripeSignature` is how the UI extension authenticates requests to your backend. The signed payload and verification method are documented at https://docs.stripe.com/stripe-apps/build-backend.

Key facts:

- The signing secret (starts with `absec_...`) is generated on first `stripe apps upload`
- The default signed payload contains `user_id` and `account_id` (field order matters)
- Extra data can be included by passing it to `fetchStripeSignature(payload)`
- Verification uses `stripe.webhooks.signature.verifyHeader()`

### Webhook configuration

Webhook setup depends on your app’s distribution and auth type:

| App type | Webhook setup |
| --- | --- |
| Private (your account only) | ONE standard webhook endpoint |
| Public with platform keys | ONE webhook with “Listen to events on Connected accounts” enabled |
| Public with restricted API keys | Can’t use Connect webhook fanout — each merchant manages their own webhooks |

The `event_read` permission MUST be declared in your manifest, plus read permissions for each event type you want to receive.

Read https://docs.stripe.com/stripe-apps/events for the full setup guide.

For firewall allowlisting of inbound webhook traffic, see https://docs.stripe.com/ips for Stripe’s IP addresses.

## Secret Store API

**Plain-language:** “Stripe has a built-in secure place to store passwords, tokens, and API keys for your app — you don’t need to build your own database for secrets.”

### Two scopes

| Scope | Use for | Example |
| --- | --- | --- |
| `account` | Shared across all users of an account | The business’s API key for an email service |
| `user` | Per-user secrets | An individual user’s OAuth access token |

### Limits and restrictions

- Maximum **10 secrets per scope** (account and user separately)
- Always list and delete before adding more if approaching the limit
- Do **not** store PCI-sensitive data (card numbers, CVVs, bank account numbers)

### Declaring the permission

In `stripe-app.yaml`:

```yaml
declarations:
  stripe_api_access:
    permissions:
      - permission: secret_write
        purpose: Store third-party credentials for the app
```

### Implementation

For the correct code patterns to read, write, and delete secrets, read: https://docs.stripe.com/stripe-apps/store-secrets

## Local development with a backend

Run your backend locally alongside `stripe apps start`:

```bash
# Terminal 1: start the app preview
stripe apps start

# Terminal 2: start your backend server
node server.js
```

For webhook forwarding during local development, see `references/webhooks.md`.
canonical-docs.md 4.4 KB
# Canonical documentation — sources of truth for code patterns

## Canonical documentation

Use this index alongside the bundled references selected in `SKILL.md`. Load their contents for task-specific guidance, including any other relevant reference files they name, before using the canonical pages for API details.

Before writing any code file, read the relevant canonical docs page using an available documentation tool. These docs are the source of truth for API patterns, component usage, and configuration — do NOT reproduce code examples from memory or from this skill file.

If you can’t access the docs, tell the user you need them to provide the current patterns rather than guessing.

## Reference pages

| Topic | URL |
| --- | --- |
| App scaffold and workflow | https://docs.stripe.com/stripe-apps/create-app |
| Manifest schema (`stripe-app.yaml`) | https://docs.stripe.com/stripe-apps/reference/app-manifest |
| Permissions reference | https://docs.stripe.com/stripe-apps/reference/permissions |
| Backend + signed requests (`fetchStripeSignature`) | https://docs.stripe.com/stripe-apps/build-backend |
| Authentication types (platform, OAuth, RAK) | https://docs.stripe.com/stripe-apps/api-authentication |
| Events and webhooks | https://docs.stripe.com/stripe-apps/events |
| How UI extensions work | https://docs.stripe.com/stripe-apps/how-ui-extensions-work |
| UI components | https://docs.stripe.com/stripe-apps/components |
| Extensions SDK API (`createHttpClient`, Stripe client) | https://docs.stripe.com/stripe-apps/reference/extensions-sdk-api |
| Secret Store | https://docs.stripe.com/stripe-apps/store-secrets |
| Versioning and releases | https://docs.stripe.com/stripe-apps/versions-and-releases |
| Marketplace submission | https://docs.stripe.com/stripe-apps/publish-app |
| Onboarding UX patterns | https://docs.stripe.com/stripe-apps/patterns/onboarding-experience |
| Full-page apps | https://docs.stripe.com/stripe-apps/patterns/full-page-apps |
| Viewports reference | https://docs.stripe.com/stripe-apps/reference/viewports |
| Sandbox support | https://docs.stripe.com/stripe-apps/enable-sandbox-support |
| Extension points and supported implementation types | https://docs.stripe.com/extensions/extension-points |
| Extension runtimes and limitations | https://docs.stripe.com/extensions/how-extensions-work |
| Native proration behavior | https://docs.stripe.com/billing/subscriptions/prorations |
| Prorations applicability and limitations | https://docs.stripe.com/billing/scripts/prorations |
| Prorations script walkthrough: scaffolding, tests, and debugging | https://docs.stripe.com/extensions/scripts/build-prorations-extension |
| Existing workflow actions | https://docs.stripe.com/workflows/define-workflows#actions |
| Existing custom actions | https://docs.stripe.com/workflows/custom-actions |
| Custom action contract and schemas | https://docs.stripe.com/extensions/custom-actions/how-custom-actions-work |
| Custom-action script implementation | https://docs.stripe.com/extensions/custom-actions/build-with-script |
| Custom-action remote-function implementation | https://docs.stripe.com/extensions/custom-actions/build-with-remote-function |
| Script endpoint declarations and calls | https://docs.stripe.com/extensions/invoke-endpoints |
| Extension configuration and schemas | https://docs.stripe.com/extensions/scripts/define-config-and-schemas |
| Extension run debugging | https://docs.stripe.com/workbench/guides#view-extension-runs |

## How to use this list

1. Identify which topics are relevant to the app you’re building (based on discovery answers)
2. Read each relevant page before writing code
3. Follow the patterns shown in the docs exactly — field names, import paths, constructor signatures
4. If a pattern in your training data conflicts with what the docs show, the docs win

## Common lookup scenarios

| You need to… | Read this page |
| --- | --- |
| Initialize the Stripe client in a UI extension | Extensions SDK API |
| Verify `fetchStripeSignature` on your backend | Backend + signed requests |
| Choose between platform keys, OAuth, or restricted keys | Authentication types |
| Set up webhooks for a public app | Events and webhooks |
| Store secrets (OAuth tokens, API keys) | Secret Store |
| Know which UI components are available | UI components |
| Declare permissions in the manifest | Permissions reference |
| Publish to the marketplace | Marketplace submission |
discovery.md 9.4 KB
# Discovery interview

## Discovery interview

Use these questions to resolve requirements that affect the requested work. Reuse information from the user and existing app, and skip questions that are already answered or don’t apply. Ask one unresolved question at a time, using plain language. If the requirements are clear, proceed without an interview.

The word “connect” doesn’t by itself mean Stripe Connect. If that distinction affects the implementation and the user’s intent is unclear, clarify it before choosing a Connect architecture. Preserve a supplied app name; otherwise name it for its stated purpose without implying a Connect integration.

### Question 1 — What do you want to do?

```
What would you like your app to do? Pick the option that sounds closest:

1. Show something or add a custom page or experience inside my Stripe Dashboard
   (for example: a custom standalone page in the Dashboard, show a customer's loyalty points, add a "Send email" button)

2. Automatically do something when a payment or event happens
   (for example: send a confirmation email, update a spreadsheet, sync data)

3. Both — add something to the Dashboard AND react to Stripe events

4. Let other Stripe users install my app so my service can access their account

5. Add custom logic to how Stripe calculates bills or routes payments
   (availability depends on the extension point)

6. I'm not sure — ask me more questions
```

**Routing:**

- Option 1: UI extension. Ask Question 2.
- Option 2: Back-end-only app. Ask Question 3. Then read `backend.md`, `webhooks.md`, `authentication.md`, `workflow.md`.
- Option 3: Full-stack app. Resolve any unanswered UI and audience questions. Read `ui-extensions.md`, `backend.md`, `authentication.md`, `webhooks.md`, and `workflow.md`. Load other references only when their corresponding task applies.
- Option 4: App-as-authentication. Read `authentication.md`, `workflow.md`.
- Option 5: Extension interfaces. Read the [extension-point catalog](https://docs.stripe.com/extensions/extension-points.md) and the selected interface’s product documentation for applicability, supported implementation types, and current access requirements. Ask about access only if the documentation requires it and access hasn’t already been established.
- Option 6: Ask a follow-up question: “What problem are you trying to solve? For example: tracking sales, notifying customers, connecting a third-party tool?”

### Question 2 — Where do you want your app to appear? (only if UI)

```
Where in the Stripe Dashboard should your app show up?

1. Next to a specific customer, payment, invoice, subscription, or product
2. Everywhere in the Dashboard as a floating side panel
3. As its own full-screen page
4. In the settings area of my app (after install)
5. As a setup guide when someone installs my app
6. I'm not sure
```

**Viewport routing:**

| Answer | Viewport(s) |
| --- | --- |
| Next to a customer | `stripe.dashboard.customer.detail` |
| Next to a payment | `stripe.dashboard.payment.detail` |
| Next to an invoice | `stripe.dashboard.invoice.detail` |
| Next to a subscription | `stripe.dashboard.subscription.detail` |
| Next to a product | `stripe.dashboard.product.detail` |
| On any list page | `stripe.dashboard.customer.list`, `.payment.list`, etc. |
| Everywhere (side panel) | `stripe.dashboard.drawer.default` |
| Full-screen page | Full-page app — `stripe.dashboard.fullpage` |
| Dashboard homepage | `stripe.dashboard.home.overview` |
| Settings | `settings` viewport |
| Setup guide (first run) | `onboarding` viewport |

If the answer is “full-screen page”, read `ui-extensions.md` (full-page apps section). If the answer is “setup guide”, also read `onboarding-ux.md`. If “I’m not sure”, ask: “When someone opens Stripe and looks at a customer’s page — would your app show up there? Or would it be more like its own separate page?”

### Question 3 — Who is this for?

```
Who will use this app?

1. Just me / my own Stripe account (private app)
2. Other Stripe users — I want to publish it to the marketplace
```

**Routing:**

- Option 1: Private app. Simpler workflow — no marketplace submission needed.
- Option 2: Public app. Will need account activation (verified email and business details). Note this in the plan.

### Question 3b — Authentication type (only for public apps that need backend access)

If the user chose public/marketplace AND their app needs to access merchant data from a backend, determine the authentication type. Read `authentication.md` for the full comparison — restricted API keys are the recommended default unless the app specifically needs platform keys or OAuth.

For private apps or frontend-only apps, skip this question — restricted API keys or platform keys both work, and RAKs are simpler.

### Question 4 — Will your app need to remember things or talk to other services?

```
Will your app need to:

1. Remember settings or store information (for example: a user's login for another service,
   preferences, or data not already in Stripe)
2. Talk to another service (for example: send emails, update a spreadsheet, call a third-party API)
3. No — it will only show Stripe data
```

**Routing:**

- Option 1 or 2: Needs a back-end or the Secret Store API. Read `backend.md`.
  - If storing credentials or tokens, use the Secret Store API (plain-language: “Stripe has a built-in secure place to store passwords and tokens — you don’t need to build your own database for secrets”).
  - If running server-side logic, use a self-hosted back-end.
- Option 3: Front-end-only. Only the SDK’s Stripe client and `@stripe/ui-extension-sdk/ui` needed. No back-end.

### After discovery — summarize when useful

For a new app or a substantial architecture decision, summarize what you learned when it helps clarify the work:

```
Here's what I understood:

- You want to: [plain-language description of the goal]
- Your app will appear: [where, or "on a backend server"]
- It's for: [just you / other Stripe users]
- It needs to: [remember things / talk to [service] / just show Stripe data]

```

Ask for confirmation only if a material requirement or choice remains unresolved. Otherwise, proceed within the user’s request. Incorporate corrections without repeating questions or confirmations already answered.

### Feature access

Access requirements vary by feature and extension point. Check current product documentation during discovery, and don’t infer a private-preview requirement for every extension interface.

**Features to check:**

| Feature | Trigger phrases (user might say) | What to tell the user |
| --- | --- | --- |
| Custom objects | “store custom data in Stripe”, “create my own data model”, “custom database in Stripe”, “custom fields on customers”, “structured data that isn’t in Stripe already” | Check the [custom objects documentation](https://docs.stripe.com/custom-objects.md) for current requirements, then explain any access prerequisite relevant to the user’s account. |
| Extension interfaces | “change how Stripe calculates”, “custom billing logic”, “modify payment routing”, “override Stripe’s default behavior”, “custom tax calculation” | Identify the exact extension point, then explain its current applicability and access requirements from its product documentation. |

**When to check:**

- If the user picks Option 5 in Question 1, follow the extension-interface routing above.
- If the user’s description implies custom objects or extension interfaces, check the selected feature’s current requirements.
- Ask the user to confirm access only when the selected feature requires it and the available information doesn’t establish access. Reuse access information already provided.

**When access is required:**

- If the user confirms access, continue building with that feature.
- If the user says they don’t have access, suggest alternatives:
  - Instead of custom objects, use the Secret Store API for key-value data, or store data in their own back-end.
  - Instead of extension interfaces, suggest a webhook-based approach that reacts to events rather than intercepting processing.
- If the user is unsure, tell them: “You can check your access at the Stripe Apps page in your Dashboard, or ask your Stripe account representative. I can help you build with an alternative approach in the meantime.”

## Plain-language glossary

Use these explanations when you need to introduce technical terms after routing:

| Term | Plain-language explanation |
| --- | --- |
| UI extension | The part of your app that shows up inside the Stripe Dashboard |
| Viewport | Which specific Dashboard page your app appears on |
| Extension interface | A hook that lets your app change how Stripe processes billing or payments |
| Platform keys | How your app accesses merchant data when they install it — no manual key-sharing needed |
| Installing account | A Stripe account where your app is installed |
| Permissions | What Stripe data your app is allowed to read or write; must be declared before use |
| Secret Store | Stripe’s built-in way for your app to save sensitive information like passwords or tokens |
| stripe-app.yaml | The configuration file that tells Stripe what your app is called, what it needs access to, and where it appears |
| Custom objects | Custom data types you define and store inside Stripe; check the [custom objects documentation](https://docs.stripe.com/custom-objects.md) for current availability and access requirements |
| Sandbox | An isolated Stripe test environment for safe testing — useful for testing destructive operations or onboarding flows |
extension-types.md 5.0 KB
# Extension types

## Extension types

Stripe Apps supports five extension types. Use the discovery interview in `discovery.md` to determine which one the user needs.

### 1. UI extension — “show something in the Dashboard”

Renders custom UI inside the Stripe Dashboard using the Stripe UI toolkit. Runs in a sandboxed iframe.

**Plain-language examples:**

- “Show a customer’s loyalty points next to their Stripe profile”
- “Add a button to send a custom invoice email”
- “Build a full-screen analytics dashboard inside Stripe”
- “Show a customer’s order history from my store next to their Stripe data”

**What you can build:**

- Page-specific panels (next to a customer, payment, invoice, subscription, or product)
- A side panel that appears everywhere in the Dashboard
- A full-screen page inside the Dashboard
- A setup/onboarding screen when users first install the app
- An app settings page

**Key constraints:**

- React 17 only (not 18+)
- Only `@stripe/ui-extension-sdk/ui` components — no Tailwind, HTML, or third-party UI libraries
- Can’t access `window`, `document`, or `localStorage`
- Must use the SDK’s Stripe API client (see canonical docs for initialization pattern)

**Read:** `ui-extensions.md`, `workflow.md`

### 2. Backend-only app — “react to events, no Dashboard UI”

Runs on the developer’s server. Receives Stripe webhooks and calls the Stripe API. No Dashboard UI.

**Plain-language examples:**

- “Email a download link after a payment”
- “Sync purchases to a Google Sheet”
- “Create an order in my fulfillment system when a payment succeeds”
- “Notify my team on Slack when a new subscription starts”

**How it works:**

- Your server receives Stripe events (webhooks)
- Your server calls the Stripe API using platform keys (no manual key-sharing with merchants)
- No UI — all logic runs server-side

**Read:** `authentication.md`, `webhooks.md`, `backend.md`, `workflow.md`

### 3. Full-stack app — “Dashboard UI + backend server”

Combines a UI extension with a backend server. The UI can show data from external services and trigger server-side actions.

**Plain-language examples:**

- “Show my customer’s loyalty points in Stripe AND update them when they make a purchase”
- “Let merchants configure their email templates from the Dashboard, then send emails from my server”
- “Show real-time shipping status next to each payment”

**How it works:**

- UI extension in the Dashboard for user interaction
- Backend server for data storage, third-party API calls, and webhook processing
- UI authenticates to the backend using `fetchStripeSignature`

**Read:** all reference files

### 4. Extension interfaces — “plug into the Stripe billing or payments engine”

Lets your app change how Stripe processes billing or payments. Available types:

**Billing extensions:**

- Custom discount calculation
- Custom proration calculation
- Custom customer balance handling
- Custom recurring billing item handling

**Payments orchestration:**

- Custom payment routing

**Availability:** Read the [extension-point catalog](https://docs.stripe.com/extensions/extension-points.md) and the selected interface’s product documentation. Use its current applicability, supported implementation types, and account access requirements. Don’t assume all interfaces are in private preview. Ask for access confirmation only if that interface requires it and access hasn’t already been established.

### 5. Embedded apps — “embed a third-party Stripe App inside your platform” (private preview)

For Connect platforms that want to surface third-party Stripe Apps (like QuickBooks, Xero, or Mailchimp) directly inside their own product.

**This is different from building an app.** Embedded apps are for platforms that want to *host* existing apps, not for building new ones.

**Private preview:** If the user asks for this, point them to https://docs.stripe.com/stripe-apps/embedded-apps.

## Full viewport routing table

For UI extensions — maps plain-language descriptions to viewport IDs:

| What the user wants | Viewport ID |
| --- | --- |
| Next to a specific customer | `stripe.dashboard.customer.detail` |
| On the customers list page | `stripe.dashboard.customer.list` |
| Next to a specific payment | `stripe.dashboard.payment.detail` |
| On the payments list page | `stripe.dashboard.payment.list` |
| Next to a specific invoice | `stripe.dashboard.invoice.detail` |
| On the invoices list page | `stripe.dashboard.invoice.list` |
| Next to a specific subscription | `stripe.dashboard.subscription.detail` |
| On the subscriptions list page | `stripe.dashboard.subscription.list` |
| Next to a specific product | `stripe.dashboard.product.detail` |
| On the products list page | `stripe.dashboard.product.list` |
| Everywhere in the Dashboard (side panel) | `stripe.dashboard.drawer.default` |
| As its own full-screen page | Full-page app — `stripe.dashboard.fullpage` |
| On the Dashboard homepage | `stripe.dashboard.home.overview` |
| App settings page | `settings` |
| First-run setup after install | `onboarding` |

For the full viewport reference, see https://docs.stripe.com/stripe-apps/reference/viewports.
feedback.md 1.9 KB
# Feedback — submit agentic product feedback after a build

## Submit agentic feedback

Ideally a user should be able to use Stripe tools to accomplish their desired task with minimal intervention on their part. Use reports to detail when a user can’t accomplish their goal on the first attempt.

Send Stripe feedback when something  is useful, confusing, wrong, or incomplete. Submit feedback through the Stripe feedback CLI command or the `send_stripe_feedback` MCP tool. If you have a problem submitting feedback, don’t fail or stall the task.

```bash
stripe feedback \
  --json \
  --actor agent \
  --feature apps \
  --sentiment <positive|negative|neutral> \
  --message "<what broke or worked, concrete and specific>" \
  --context "<what you were building, which path, CLI version>"
```

- `--message` and `--context`: 10–2000 characters each; `--message` at least 5 words.
- Always pass `--json`; it returns `{"id":"...","success":true}`. Print the `id` for the user.
- `--actor agent` for your own observations. Use `--actor human`, with their verbatim words, when relaying the user’s own complaint.
- Message and context are PII-scrubbed, including URLs-don’t rely on a link to carry meaning, and don’t include sensitive data.

## Writing a useful report

A good report is ready to go straight onto a product team’s backlog. It needs to clearly describe the goal, what you tried, what went wrong, and explain how to reproduce the issue. Important details to note include:

- Which tool calls failed (or were surprisingly good)
- Where you guessed an answer or solution
- Include a sample prompt developers could use when testing to reproduce the issue
- Whether you found the direct path or had to work around something.

## When submission fails

Never fail or stall the task over a failed submission. Don’t retry on `429` (rate-limited per device). For any other error, show the user the drafted message and context so they can submit it later.
onboarding-ux.md 2.6 KB
# Onboarding UX — first-run user experience

## Onboarding UX

**Plain-language:** “When someone installs your app for the first time, the first thing they see is your app’s welcome or setup screen. This is called onboarding.”

Design this experience carefully — it determines whether merchants understand how to use your app or give up immediately.

**Canonical page:** https://docs.stripe.com/stripe-apps/patterns/onboarding-experience

Read this page using an available documentation tool for the correct component props and patterns.

## Options from simplest to most complex

### Option 1 — Zero-touch onboarding (easiest)

If your app only uses Stripe data and doesn’t need its own login, there’s nothing to set up. The app works immediately after install.

Use `fetchStripeSignature` to identify the user without a login screen — the user’s Stripe identity proves who they are.

**When to use:** When your app doesn’t need third-party credentials or a separate user account.

### Option 2 — OnboardingView component

Show a setup screen the first time the user opens the app. Use the `onboarding` viewport to show a dedicated onboarding page.

In `stripe-app.yaml`, add the `onboarding` viewport:

```yaml
ui_extension:
  views:
    - viewport: onboarding
      component: OnboardingView
    - viewport: stripe.dashboard.customer.detail
      component: App
```

For the correct `OnboardingView` component props and structure, read the canonical onboarding page. Key requirements:

- Use the `OnboardingView` component (not `ContextView`) for the onboarding viewport
- Include required props like `completed`, `tasks`, and `title`

### Option 3 — SignInView component (third-party login)

If users need to log in to a third-party service (connecting their Google account, Mailchimp, etc.), use `SignInView` to guide them.

For the correct `SignInView` props and usage, read: https://docs.stripe.com/stripe-apps/patterns/onboarding-experience

Use the Secret Store API to save the resulting OAuth token. See `backend.md`.

## Critical rule: always check onboarding status in every view

Don’t assume the user went through the onboarding flow in order. They might open a payment page before completing setup.

Check at the start of every page-specific view whether onboarding is complete. If not, show a prompt directing them to complete setup.

## Storing onboarding state

Use the Secret Store API to remember whether a user has completed onboarding.

For the correct Secret Store API patterns, read: https://docs.stripe.com/stripe-apps/store-secrets

Key facts:

- Use `user` scope for per-user onboarding state
- Use `account` scope for account-wide configuration
- Maximum 10 secrets per scope
publishing.md 5.7 KB
# Publishing — versioning, releases, sandboxes, live mode, marketplace

## Publishing

How to version, release, and publish your Stripe App.

## Sandboxes and live mode

**Plain-language:** “A sandbox uses test data so you can try things safely. Live mode uses real customer data. Always build and test in a sandbox first.”

| Mode | Data | When to use |
| --- | --- | --- |
| Sandbox | Test data (test cards, test customers) | Development and QA |
| Live mode | Real customer and payment data | Production |

**Workflow:** Upload → install in a sandbox → test thoroughly → install in live mode.

**Don’t skip sandbox testing.** Even if your app looks correct locally with `stripe apps start`, you must install it in a sandbox and verify it works with the actual install flow before going live.

## Versioning

Bump `version` in `stripe-app.yaml` before each upload:

```yaml
id: com.example.my-app
version: 1.0.1
name: My App
```

Use semantic versioning:

- `1.0.0` — initial release
- `1.0.1` — bug fix
- `1.1.0` — new feature (backward compatible)
- `2.0.0` — breaking change or major feature

**Rules:**

- Versions must be uploaded in order — if you upload `2.0.0` before `1.0.0`, `2.0.0` won’t be available for release
- You can have multiple uploaded versions; you choose which one to install
- Stripe auto-upgrades installed users to the latest release — they don’t need to do anything **unless** you changed permissions

## Upload and release workflow

```bash
# 1. Bump version in stripe-app.yaml, then:
stripe apps upload

# 2. Go to Dashboard → Apps → your app → version history
# 3. Click the version you want to release
# 4. Click "Set as external test version" or "Release" (live mode)
```

## When you change permissions

This is a common source of bugs. When you add new permissions:

1. Update `stripe-app.yaml` with the new permissions
2. Bump the version and upload
3. Existing users are notified by email
4. The **“Review Permissions”** button appears — but only on the **Apps workload page** ([dashboard.stripe.com/apps](https://dashboard.stripe.com/apps)), **not on the app itself**
5. The app returns an **invalid-request error** for the new permissions until the user clicks “Review Permissions” and re-authorizes

**Always warn users about this step** when you change permissions. Many users miss the notification and think the app is broken.

**How to notify users:** Consider adding a banner in your app UI that detects when a required permission is missing and guides the user to re-authorize.

## Publishing to the Stripe Apps Marketplace

For public apps — making your app available to all Stripe users.

### Requirements

Before submitting:

- Verified email address on your Stripe account
- Business details filled in (legal name, address)
- App passes [review requirements](https://docs.stripe.com/stripe-apps/review-requirements.md)
- Connect platform accounts can’t publish marketplace apps

### Submission

1. Go to [Dashboard → Apps](https://dashboard.stripe.com/apps)
2. Select your app
3. Click **Submit for review**

Stripe reviews your app for security, functionality, and compliance with their guidelines.

### Review requirements overview

- App must work correctly in supported sandboxes and live mode
- No prohibited content or misleading claims
- Privacy policy URL required
- Support contact required
- App icon and screenshots required

### After approval

Your app appears in the [Stripe Apps Marketplace](https://marketplace.stripe.com/). Any Stripe user can install it.

## Troubleshooting uploads

**Successful upload looks like:**

```
Uploading... Done
Your app has been uploaded to version 0.0.1.
```

**Common upload failures and fixes:**

| Error | Cause | Fix |
| --- | --- | --- |
| `Invalid manifest` / validation failed | Missing required fields or malformed YAML | Check indentation; ensure `id:`, `version:`, `name:` are present |
| `Build failed` / TypeScript errors | UI component has type/import errors | Run `pnpm build` locally first to see the exact error |
| `Version already exists` | Already uploaded this version number | Bump `version` in stripe-app.yaml (for example, 0.0.1 → 0.0.2) |
| `Permission denied` / `Not authenticated` | CLI not logged in or wrong account | Run `stripe login` and verify with `stripe config --list` |
| `connect-src` / CSP error | App calls a URL not declared in content_security_policy | Add the URL to `content_security_policy.connect-src` in stripe-app.yaml |
| `extensions field required` | Missing `extensions: []` in stripe-app.yaml | Add `extensions: []` even if you have no backend extensions |
| `Component not found` | Viewport references a component name that doesn’t match your export | Ensure `component:` in stripe-app.yaml matches your default export name |

**Debugging steps when upload fails:**

1. Read the full error message — it usually says exactly what’s wrong
2. Run `pnpm build` to check for TypeScript/build errors locally
3. Validate your stripe-app.yaml has all required fields (id, version, name, declarations)
4. Check that file paths match (ui/src/views/App.tsx, not a renamed file)
5. If still stuck: `stripe apps upload --verbose` for detailed output

## Sandboxes for app development

Sandboxes provide isolated environments for safe app development and testing.

**Benefits of using Sandboxes:**

- Isolated from your live account — test destructive operations safely
- Each sandbox has its own app installation and signing secrets
- Useful for testing onboarding flows, uninstall/reinstall cycles, and permission changes

**How to use:**

1. Create a sandbox from Dashboard → Sandboxes
2. Run `stripe apps start` targeting the sandbox
3. Upload and install your app in the sandbox to test the full install flow
4. When ready, upload to your main account for production use
script-extensions.md 7.3 KB
# Script extensions

## Build or modify a script extension

Use this reference when a Stripe App change adds or modifies a script implementation. Follow the Stripe Apps workflow reference for app setup, dependencies, versioning, and installation.

## Establish the contract

Before changing code, read the guide for the selected extension point and the installed `@stripe/extensibility-sdk` types. Confirm:

- The extension point supports scripts.
- The request and result types, required methods, and error behavior.
- Constraints that the types don’t express, such as units, ranges, precision, relationships between fields, and supported runtime APIs.
- Whether the change needs configuration, custom schemas, or endpoint access.

Reference the following docs for the required information:

| Topic | Documentation |
| --- | --- |
| Extension points and implementation types | https://docs.stripe.com/extensions/extension-points |
| Script runtime | https://docs.stripe.com/extensions/how-extensions-work#scripts |
| Configuration and schemas | https://docs.stripe.com/extensions/scripts/define-config-and-schemas |
| HTTP calls | https://docs.stripe.com/extensions/invoke-endpoints |

Keep platform requirements separate from the requested business behavior. Don’t change published fixtures, disable checks, or add behavior only to satisfy a fixture.

## Work from the generated extension

For a new extension, discover the extension point and generate its scaffold from the app root:

```bash
stripe generate info extension-point-ids
stripe generate extension <extension-point-id> <extension-id> script --name "<extension-name>" --non-interactive
```

Check the installed CLI help if these options differ. For an existing extension, modify its current scaffold instead of generating it again.

Inspect the generated source, tests, package scripts, and `stripe-app.yaml` declaration before editing. Preserve the entrypoint, SDK interface, required method signatures, and manifest method key. Use the selected extension point’s published schema for manifest fields. The method key might differ from the TypeScript method name.

The manifest identifies the script method but doesn’t necessarily contain a source-file path. Keep the generated extension directory, package metadata, and manifest declaration aligned instead of adding undocumented manifest fields.

### Preserve the generated toolchain

Treat the generated package and configuration as part of the extension contract. Don’t guess package names, import subpaths, peer dependencies, TypeScript libraries, or script names. If generated files are unavailable or incomplete, inspect the installed packages’ `package.json` exports and peer dependencies before reconstructing them. Use compatible published versions for public packages; use a `workspace:` range only when that package is actually provided by the app’s local workspace.

Use only public package exports. For SDK starter kits and acceptance helpers, start with imports in generated tests, then follow `package.json` exports to an executable entrypoint. Don’t import an internal declaration file merely because it contains the desired symbol.

Script lint configuration uses `@stripe/extensibility-eslint-plugin` and an exported configuration for the selected extension point. The package’s root default export and extension-point default export are flat-config arrays: spread them directly rather than looking for `configs.recommended`. Its TypeScript rules also require the parser and plugin supplied by `typescript-eslint`. Apply the JavaScript and TypeScript base configurations before the Stripe Apps base and extension-point configurations, preserving generated ordering and file-specific overrides.

Point type-aware linting at both production and test TypeScript projects, or use the generated project-service setup that covers both. Scope linting to authored source and configuration files and ignore generated output, build output, and dependencies. Don’t weaken runtime rules to make Node-based tests pass.

Keep production and test TypeScript settings separate when their runtime libraries differ. Production typechecking must use the restricted libraries and globals supplied by `@stripe/extensibility-sdk`. Test configuration can add the test runner’s types without making those APIs available to production code. When the production config uses `noLib: true` with SDK restricted declaration files, preserve the generated `skipLibCheck: true`: the restricted declarations can refer to standard types that are intentionally absent, and dependency declaration errors don’t establish an error in authored source.

## Implement the change

Define when the new behavior applies, what happens outside that scope, and how the extension handles invalid input. Every return path must satisfy the extension contract.

- Use explicit SDK request and result types. Don’t hide mismatches with `any` or double casts.
- Preserve SDK scalar types through calculations. Apply documented precision, rounding, signs, units, and time sources instead of converting values to JavaScript primitives.
- Keep module-scope constants runtime-neutral. Store literal values as strings or other permitted primitives and construct SDK scalar instances where they’re used if runtime lint rejects module-scope instances.
- Treat the script runtime and generated lint rules as the authority for available APIs. A test that passes in Node.js doesn’t prove runtime support.
- Use endpoint calls only when the extension point supports them. Follow the endpoint guide for declarations and authentication, and keep secrets out of source and configuration.

If the change adds configuration, define it in the SDK configuration type and use the supported annotations. Regenerate schemas with the generated package script, then inspect the output. Don’t hand-edit generated schemas. Implement runtime defaults explicitly when direct method calls don’t apply schema defaults.

The SDK interface still needs a supported configuration type when the extension has no settings. Preserve the generated empty interface, including its targeted `@typescript-eslint/no-empty-object-type` suppression. Replacing it with a `Record<string, unknown>` type alias can break configuration schema generation. An empty configuration type alone doesn’t require authored custom schemas.

## Test and verify the behavior

Retain the generated acceptance suite and add focused tests for the requested behavior. Cover the condition that activates the change, behavior outside its scope, relevant boundaries, optional configuration, invalid input, and dependency failures. Use typed fixtures with distinct values for fields that have different meanings, and derive expected results independently from the implementation.

Run the extension’s declared build, typecheck, lint, schema, focused-test, acceptance-test, and full-test scripts separately. Use the generated package scripts instead of assuming command names or tool versions. Build and typecheck are distinct verification gates even when their commands overlap; one doesn’t establish that the other ran. Record each exact command, exit status, and test counts, and report unresolved failures without weakening checks.

## Install and activate

After uploading and installing the app, activate the extension at its extension point before testing its installed behavior. Follow the selected extension point’s guide to configure and activate it.
ui-extensions.md 20.4 KB
# UI extensions — layout and craft

## UI extensions

UI extensions render custom UI inside the Stripe Dashboard, in a sandboxed iframe. This skill is the **opinionated layout-and-craft layer**: how to compose a full-page or drawer app so it feels native — placement, composition order, spacing, density, states, typography. It does **not** restate component APIs; those live on each component’s doc page, and they’re the source of truth.

### How to use this skill (read first)

- **Component API → fetch the component’s doc BEFORE you import it (required).** SDK components are split across **three import subpaths** — `@stripe/ui-extension-sdk/ui`, `/ui/next`, and `/ui/experimental` — and importing from the wrong one yields an `undefined` component and a **hard crash** (`Element type is invalid`). You can’t tell a component’s subpath from its name — for example `DataTable` and `DetailPage` are under `/ui/experimental` and the charts under `/ui/next`, not the `/ui` you’d expect. So for **every** component you use: (1) **fetch its doc** — `https://docs.stripe.com/stripe-apps/components/<name>.md` (append `?app-sdk-version=9Next` for `Tabs`, `LineChart`, `BarChart`; discover components from the [index](https://docs.stripe.com/stripe-apps/components.md)); (2) **copy the exact import line and required props / data shape** char-for-char; (3) **re-check every import against the doc before you finish.** Don’t infer an API from the component name — a wrong import path, prop, or data shape is a hard runtime error and the #1 reason these apps don’t render.
- **Layout, styles, composition, and states → follow the codified rules here (§2–§3).** These are Stripe’s craft defaults; no single component doc covers them. This is what the skill adds on top of the docs.

### Constraints — the sandbox (these cause silent failures or crashes)

UI extensions run in a **sandboxed iframe on React 17.0.2**. Only SDK components render. Don’t reach for these:

| Blocked | Use instead |
| --- | --- |
| Any HTML tag (`<div>`, `<span>`, `<button>`, `<input>`, `<form>`, `<h1>`…) | SDK components only (`Box`, `Button`, `TextField`, …) |
| CSS / Tailwind / MUI / styled-components / any stylesheet | the `css` prop with design tokens (§3) |
| React 18+ APIs — `useId`, `useTransition`, `useDeferredValue`, concurrent features | React 17 hooks only (Stripe Apps run **React 17.0.2**) |
| `window`, `document`, `localStorage`, `sessionStorage` | not available in the iframe |
| `react-hook-form` / any ref-based form library | uncontrolled inputs — `defaultValue` + `onChange` (see Forms, §3) |
| arbitrary `fetch()` to external URLs | `fetchStripeSignature` for your backend; the SDK client for Stripe APIs |

**Data access (for apps that read Stripe data — the examples here use mock data).** Initialize the client with `createHttpClient` from `@stripe/ui-extension-sdk/http_client` plus the `STRIPE_API_KEY` constant (a **sentinel, not a real key** — it uses the app’s granted permissions), then call standard SDK methods. **Every resource you call must be declared as a permission** (`stripe apps grant permission …`) or the request fails with an invalid-request error. The current object is `environment.objectContext` (for example, `.id` = `"cus_…"`); the signed-in user is **`userContext`, a top-level prop — *not* nested under `environment`**. Full rules: [how UI extensions work](https://docs.stripe.com/stripe-apps/how-ui-extensions-work.md) · [Extensions SDK API reference](https://docs.stripe.com/stripe-apps/reference/extensions-sdk-api.md).

## 1. Placement — pick your viewport

Decide *where in the Dashboard* the app lives; that determines the viewport and the root component. Full viewport list: [viewports reference](https://docs.stripe.com/stripe-apps/reference/viewports.md).

| Your goal | Surface | Viewport | Root component |
| --- | --- | --- | --- |
| A dedicated workspace: tabs, lists, dashboards, multi-step workflows | **Full-page** | `stripe.dashboard.fullpage` | [FullPageView](https://docs.stripe.com/stripe-apps/components/fullpageview.md) |
| Contextual info/actions tied to a specific object (such as a customer or payment) | **Page-specific** | `stripe.dashboard.{object_type}.detail`, `stripe.dashboard.{object_type}.list`, or `stripe.dashboard.{object_type}.overview` | [ContextView](https://docs.stripe.com/stripe-apps/components/contextview.md) |
| Available on every Dashboard page | **Dashboard-wide drawer** | `stripe.dashboard.drawer.default` | [ContextView](https://docs.stripe.com/stripe-apps/components/contextview.md) |
| App configuration | **Settings** | `settings` | [SettingsView](https://docs.stripe.com/stripe-apps/components/settingsview.md) |
| First-run setup after install | **Onboarding** | `onboarding` | [OnboardingView](https://docs.stripe.com/stripe-apps/components/onboardingview.md) |

Rules of thumb: lead with **full-page** when the app is a destination with more than one section; use a **page-specific** drawer when the value is glanceable context on an existing object; only use `drawer.default` when the app truly applies everywhere. A full-page app can also register drawer/page-specific views — link between them.

## 2. Composition — the build order

The order and *which component does which job* (the API of each is in its linked doc).

**Full-page app** (walkthrough: [full-page apps pattern](https://docs.stripe.com/stripe-apps/patterns/full-page-apps.md)):

1. **Manifest** — register the `stripe.dashboard.fullpage` [viewport](https://docs.stripe.com/stripe-apps/reference/viewports.md) → your view. *(The CLI’s `add view` adds a full-page view to an existing app; the full-page view needs `@stripe/ui-extension-sdk` ≥ 9.2.)*
2. **Shell** — [FullPageView](https://docs.stripe.com/stripe-apps/components/fullpageview.md); the header (app name + icon) comes from `stripe-app.json`. Add one `pageAction` only if there’s a single clear top-level action.
3. **Routing** — `createRoutes` + `AppRouter`; read the route with `useAppRoute`, navigate with `useNavigation`. Use a `/:tabId?` pattern so tabs are bookmarkable ([routing](https://docs.stripe.com/stripe-apps/routing.md)).
4. **Tabs** — [Tabs/Tab](https://docs.stripe.com/stripe-apps/components/tabs.md) for top-level sections. Distinct areas only; don’t nest tabs.
5. **Overview** — [OverviewPage](https://docs.stripe.com/stripe-apps/components/overviewpage.md) with a `primaryColumn` (main content, charts) and a `secondaryColumn` (supporting modules). Group content into `PageModule`s with titles; lead with a summary. *(See the [OverviewPage doc](https://docs.stripe.com/stripe-apps/components/overviewpage.md) for the exact column/`PageModule` parent-child contract.)*
6. **List** — [DataTable](https://docs.stripe.com/stripe-apps/components/datatable.md): sortable columns, status cells, row → detail route, pagination, and an empty state.
7. **Detail** — [DetailPage](https://docs.stripe.com/stripe-apps/components/detailpage.md) with `breadcrumbs` back to the list and two columns. The tab bar isn’t visible here; the breadcrumb is the way back.
8. **Create / edit** — [FocusView](https://docs.stripe.com/stripe-apps/components/focusview.md) drawer over the current view.

**Drawer / page-specific app:** root is [ContextView](https://docs.stripe.com/stripe-apps/components/contextview.md); keep it **single-column and dense** (a drawer is narrow — don’t force multi-column). Use `environment.objectContext` for the current object. If you also have a full-page experience, link out to it rather than cramming a workflow into the drawer.

## 3. Layout and style rules (the codified craft)

These are the defaults that make an app feel native — they’re *not* in any single component doc, so follow them here. Each is tagged **[Required]** (breaks/looks wrong otherwise), **[Recommended]** (Stripe’s craft default), or **[Optional]** (a style choice). Full styling reference: [style your app](https://docs.stripe.com/stripe-apps/style.md).

**[Required] `css` values are tokens, not web CSS.** The `css` prop isn’t CSS. Every value is a design token or fraction, never a raw unit:

- **Spacing** (`padding`, `margin`, `gap`) → tokens only (`xxsmall`…`xxlarge`). Never `"24px"`, `"1rem"`, `%`.
- **Layout** → `stack: "x" | "y"` with `gap`. There is no `display: "flex"`/`"grid"`.
- **Width** → a fraction (`"1/2"`, `"1/3"`, …) or `"fill"`. **Height** → a bare number for pixels (for example, `height: 180`).
- **Color/background** → semantic tokens (`backgroundColor: "surface" | "container"`, `color: "secondary"`), not hex.

Passing a raw CSS value (px, `flex`, hex) is a hard runtime error — the #1 way a naive build crashes. ([style reference](https://docs.stripe.com/stripe-apps/style.md))

**[Recommended] Spacing — Stripe’s token scale, tighter = more related.** Spacing (`padding`/`margin`/`gap`) uses Stripe’s fixed token scale — match these defaults, never raw px. Use the *smallest* gap that still separates things:

| Token (value) | Default use |
| --- | --- |
| `xxsmall` (2px) | label → its value; tightest intra-element spacing |
| `xsmall` (4px) | icon → adjacent text; spacing inside a chip/badge |
| `small` (8px) | between sibling cards/tiles in a row |
| `medium` (16px) | padding inside a card/module; between fields in a column |
| `large` (24px) | between distinct sections of a page |
| `xlarge` (32px) | between the two major columns of a layout |
| `xxlarge` (48px) | rarely — a major page break |

**[Recommended] Content aligns to the tab’s left edge — no wrapper padding.** The `Tabs` bar and `FullPageView` already set the page’s content edge. Don’t wrap a tab’s panel content in a `Box` with `padding` (or `paddingX`/`paddingLeft`) — that inset pushes content off the tab’s left edge and breaks alignment with the tab labels above it. Use `stack: "y"` + `gap` for vertical rhythm between modules instead; content stays flush to the same left edge as the first tab.

```tsx
// Incorrect — inset; content no longer aligns to the tabs
<Box css={{ stack: "y", gap: "large", padding: "large" }}>…</Box>
// Correct — flush to the tab's left edge
<Box css={{ stack: "y", gap: "large" }}>…</Box>
```

**[Recommended] Page structure — one consistent column layout, `OverviewPage` rendered directly.** Render `OverviewPage` **directly as the tab’s content** — not wrapped in a `Box`, and never with a full-width band stacked above it. `OverviewPage` *is* the layout; pick its shape by whether you pass `secondaryColumn`:

- **One column** → `primaryColumn` only (renders full-width).
- **Two column** → `primaryColumn` + `secondaryColumn`. **Never mix the two** — no full-width KPI row or band above a two-column split. The KPI stat row is the **first `PageModule` of `primaryColumn`** (full-width in one-column mode, primary-column width in two-column mode), *not* a separate row above the component. Group every module into the columns; don’t build a manual column layout.

**[Required] `DetailPage` is its own root route — never inside `FullPageView`.** A detail is a separate route you navigate to (for example, `route("/members/:memberId", …)`) that renders `DetailPage` at the root. `DetailPage` owns its page shell; nesting it in `FullPageView` double-stacks the header. The breadcrumb — not the tab bar — is the way back.

**[Recommended] Overview composition & density — fill the page.** An overview must read as a *dense, width-filling dashboard*, not a short column of big cards. This is the #1 thing that makes an overview look un-native, so compose it deliberately:

1. **Top: a horizontal KPI stat row** — 3–5 equal tiles side by side (see Stat tiles). **Never stack KPI cards vertically full-width** (one metric per row) — a column of oversized single-metric cards wastes the page and reads as un-native.
2. **Below: use both columns.** With `OverviewPage`, put the primary module (a trend `LineChart`, or the main list/table) in `primaryColumn` and supporting modules in `secondaryColumn`; otherwise split with `stack: "x", gap: "xlarge"` into a wider left (`width: "2/3"`) and a narrower right (`width: "1/3"`). Don’t leave half the width empty.
3. **Derive enough views to fill it.** If the data is only a few metrics, add the breakdowns, trends, top-N lists, and recent-activity the data implies (for example, points-over-time trend, members-by-tier breakdown, top members, recent redemptions) rather than leaving whitespace. Aim for **3+ modules** that fill the viewport.

Avoid: a single column of oversized full-width cards; a large empty right side or lower page; one metric per row. Match the density of a native Dashboard overview.

**[Recommended] List pages — the table is the hero.** A dedicated list/directory page (for example, a Members tab) is **the table itself**, full-width, as the primary content. The only things around it: **search / filters** (and segment tabs) *above* the table, **pagination** below, and an **empty state**. **Don’t put KPI stat tiles, charts, or dashboard modules on a list page** — those belong on the overview. A native list page is dense with *rows*, not decorated with summary cards on top. Keep it: controls → full-width table (many rows) → pagination. (Overviews are multi-module and dense; list pages are single-purpose and focused — don’t blur the two.)

**[Recommended] Stat tiles — a row of top-line KPI cards.** A **single row of equal `surface` cards** (not a 2×2 grid), each a muted `caption` label above a large `semibold` value — use the card treatment from Cards & trays. Lay them out as a horizontal row with equal widths:

```tsx
// row wrapper: <Box css={{ stack: "x", gap: "medium" }}> … one card per KPI …
<Box css={{ width: "fill", stack: "y", gap: "xxsmall", padding: "medium", borderRadius: "medium", backgroundColor: "surface" }}>
  <Inline css={{ font: "caption", color: "secondary" }}>{label}</Inline>
  <Inline css={{ font: "subtitle", fontWeight: "semibold" }}>{value}</Inline>
</Box>
```

Aim for ~3–5 cards in one row (for example, Total spend · MRR · Refunds · Disputes). For *proportional* data (a total split into parts), prefer a progress/`MeterChart` treatment over a chart — see Charts.

**[Recommended] Two-column detail (key-value).** Outer `stack: "x", gap: "xlarge"`; each column `width: "1/2", stack: "y", gap: "medium"`; each field `stack: "y", gap: "xxsmall"` with a `semibold` label above a regular value.

**[Recommended] Charts & data viz — pick the representation that fits the data.**

- **Sizing:** a chart needs an explicit height — wrap it in a [Box](https://docs.stripe.com/stripe-apps/components/box.md) with a pixel height (`~180` per the [chart-layout pattern](https://docs.stripe.com/stripe-apps/patterns/chart-layout.md)) inside a `PageModule`.
- **Trend over time → [LineChart](https://docs.stripe.com/stripe-apps/components/linechart.md).** Use a sensible granularity (monthly or weekly); **daily points over a long range render as an unreadable, noisy line.**
- **A small breakdown / a total split into parts (for example, members-by-tier) → a `List` of rows** (or a [MeterChart](https://docs.stripe.com/stripe-apps/components/meterchart.md) for a proportional bar). A `BarChart` with only a few categories renders as a lonely narrow bar in an empty module — so use a list:

```tsx
import { List, ListItem, Inline } from "@stripe/ui-extension-sdk/ui";
<List>
  {tiers.map((t) => (
    <ListItem key={t.name} id={t.name} title={<Inline>{t.name}</Inline>} value={<Inline>{`${t.count} members`}</Inline>} />
  ))}
</List>
```

Reserve [BarChart](https://docs.stripe.com/stripe-apps/components/barchart.md) for genuine multi-bar / time-series data, and let it fill width.

- **Read the component’s doc for the exact `data` shape before wiring** — charts are strict (wrong shape = hard runtime error).
- **[Optional]** a `surface`/`container` background makes a chart read as a card; not required.

**[Recommended] Typography.** `font` accepts **only** these presets — don’t invent values (`"heading4"`, `"title2"`, and similar are not valid and crash): `body`, `bodyEmphasized`, `caption`, `heading`, `subheading`, `subtitle`, `title`, `kicker`, `lead`. `fontWeight` accepts **only** `regular` | `semibold` | `bold`. For emphasis use `fontWeight: "semibold"`; use `regular` for body. Don’t use `fontWeight: "bold"` (the SDK accepts it, but Stripe’s design language reserves it — `semibold` is the native emphasis weight). Labels are `font: "caption"` + `color: "secondary"`. ([style reference](https://docs.stripe.com/stripe-apps/style.md))

**[Recommended] Cards & trays — a background implies a radius.** When a `Box` should read as a card or tray, set surface and radius together: a **card** = `backgroundColor: "surface"` + `borderRadius: "medium"` + `padding: "medium"`; group related cards on a **tray** = `backgroundColor: "container"` + `borderRadius: "medium"` + `padding: "small"`. `borderRadius` accepts `none | xsmall | small | medium | large | rounded`; `medium` is the card default. A plain layout `Box` that isn’t a card gets no background or radius.

**[Recommended] Loading.** Put the loading state *inside* the tab/content region so the header and tab bar stay visible — don’t wrap `Tabs` or the whole view in a loading state. Center a [Spinner](https://docs.stripe.com/stripe-apps/components/spinner.md) ([loading pattern](https://docs.stripe.com/stripe-apps/patterns/loading.md)).

**[Recommended] Empty states.** Give [DataTable](https://docs.stripe.com/stripe-apps/components/datatable.md) an empty state, and swap it by scenario: an object with a call to action when there’s genuinely no data; a plain string when active filters produce zero results ([empty-state pattern](https://docs.stripe.com/stripe-apps/patterns/empty-state.md)).

**[Required] Forms are uncontrolled.** There is no `react-hook-form` or ref-based forms in the sandbox. Use **uncontrolled inputs** — `defaultValue` + `onChange` (or a plain React-17 `useState` controlled value) — for [TextField](https://docs.stripe.com/stripe-apps/components/textfield.md), [Select](https://docs.stripe.com/stripe-apps/components/select.md), and similar. A ref-based form library won’t work.

## 4. Component index

**The complete, authoritative catalog is [docs.stripe.com/stripe-apps/components](https://docs.stripe.com/stripe-apps/components.md)** — every component, grouped by **Views · Layout · Navigation · Content · Forms · Charts**. Start there to find the right component for anything not covered below (there are ~40; the table here is a curated shortcut for the common full-page jobs, **not** exhaustive). Then open that component’s own doc for its API. Pick by the job; **read the doc for the API** (props, data shape, allowed parents/children).

| Job | Component | When to use | Doc |
| --- | --- | --- | --- |
| Root of a full-page app | `FullPageView` | Full-page viewport; header from manifest | [doc](https://docs.stripe.com/stripe-apps/components/fullpageview.md) |
| Root of a drawer / page-specific view | `ContextView` | Narrow, single-column, dense | [doc](https://docs.stripe.com/stripe-apps/components/contextview.md) |
| Top-level sections | `Tabs` / `Tab` (`ui/next`) | Distinct workflow areas; route-driven | [doc](https://docs.stripe.com/stripe-apps/components/tabs.md) |
| Overview dashboard | `OverviewPage` + `PageModule` | Two-column summary; group content in modules | [doc](https://docs.stripe.com/stripe-apps/components/overviewpage.md) |
| List of objects | `DataTable` | Sortable, status cells, row→detail, empty state, pagination | [doc](https://docs.stripe.com/stripe-apps/components/datatable.md) |
| Single object detail | `DetailPage` (+ `PropertyList` for key-value) | Breadcrumb + two columns; top-level page, not inside `FullPageView` | [detail](https://docs.stripe.com/stripe-apps/components/detailpage.md) · [propertylist](https://docs.stripe.com/stripe-apps/components/propertylist.md) |
| Create / edit | `FocusView` | Overlay drawer; `Button pending` on save | [doc](https://docs.stripe.com/stripe-apps/components/focusview.md) |
| Data visualization | `LineChart` / `BarChart` / `MeterChart` / `Sparkline` (`ui/next`) | In a fixed-height `Box` in a `PageModule`; **read the doc for the `data` shape** | [line](https://docs.stripe.com/stripe-apps/components/linechart.md) · [bar](https://docs.stripe.com/stripe-apps/components/barchart.md) |
| Layout / spacing | `Box`, `Inline` | The `stack`/`gap`/`padding` substrate (see §3) | [doc](https://docs.stripe.com/stripe-apps/components/box.md) |
| Actions | `Button` | Primary/secondary; `pending` for async | [doc](https://docs.stripe.com/stripe-apps/components/button.md) |
| Loading | `Spinner` | Center in the content region | [doc](https://docs.stripe.com/stripe-apps/components/spinner.md) |

Full catalog: [all components](https://docs.stripe.com/stripe-apps/components.md) · [design patterns](https://docs.stripe.com/stripe-apps/patterns.md)
webhooks.md 3.4 KB
# Webhooks — event delivery for Stripe Apps

## Webhooks

How your Stripe App receives and processes events (payments, customers, installs, etc.).

**Canonical page:** https://docs.stripe.com/stripe-apps/events

Read this page using an available documentation tool before implementing webhook handlers.

## Webhook configuration depends on app type

| App type | Auth type | Webhook setup |
| --- | --- | --- |
| Private (your account only) | Any | ONE standard webhook endpoint |
| Public/marketplace | Platform keys | ONE webhook with “Listen to events on Connected accounts” enabled |
| Public/marketplace | Restricted API keys | Can’t use Connect webhook fanout — each merchant manages their own |

A second test-mode endpoint is recommended for public apps but is not required.

## Required permissions

The `event_read` permission MUST be declared in your manifest for webhook event access, plus read permissions for each event type. Use the CLI to declare permissions:

```bash
stripe apps grant permission "event_read" "Receive webhook events"
stripe apps grant permission "payment_intent_read" "React to successful payments"
stripe apps grant permission "customer_read" "React to customer changes"
```

## Webhook handler requirements

For every webhook handler:

1. Use `stripe.webhooks.constructEvent()` to verify signatures
2. For public platform-key apps: check `event.account` to identify which merchant triggered the event
3. Use `stripeAccount` option to act on behalf of merchants (platform keys only)

## Local development

### Private app (events from your own account)

```bash
stripe listen --all-snapshot --forward-to localhost:<PORT>/webhook
```

### Public platform-key app (events from connected accounts)

```bash
stripe listen --all-snapshot --forward-connect-to localhost:<PORT>/webhook
```

**Important:** `--forward-to` only captures your own account’s events. Use `--forward-connect-to` for connected account events.

## Triggering test events

```bash
# Private app:
stripe trigger payment_intent.succeeded

# Public app (simulates connected account event):
stripe trigger --stripe-account payment_intent.succeeded
```

## Verifying webhook signatures

Always verify signatures to ensure the request came from Stripe. For the complete webhook verification pattern, read: https://docs.stripe.com/stripe-apps/build-backend

Key implementation facts:

- Use `stripe.webhooks.constructEvent()` with the raw request body and your webhook signing secret
- For platform-key apps, check `event.account` to identify which merchant triggered the event
- Use a restricted API key when possible (see `authentication.md`); use the secret key only for platform-key apps
- Return 200 quickly; process asynchronously if needed

## Handling installs and uninstalls

| Event | When it fires | What to do |
| --- | --- | --- |
| `account.application.authorized` | A merchant installs your app | Store the merchant’s account ID |
| `account.application.deauthorized` | A merchant uninstalls your app | Clean up stored data |

## Setting up webhooks in the Dashboard

1. Go to [Dashboard → Developers → Webhooks](https://dashboard.stripe.com/webhooks)
2. Click **Add endpoint**
3. Enter your endpoint URL
4. Select events to listen for
5. For public platform-key apps: check **“Listen to events on Connected accounts”**
6. Copy the signing secret to your environment variables

During local development, use `stripe listen` instead.
workflow.md 8.1 KB
# Workflow — end-to-end build order

## Full development loop

Follow this sequence for every new app. Skip the UI preview step for apps without Dashboard UI extensions.

| Step | Action | Description |
| --- | --- | --- |
| 1 | `stripe plugin install apps` | One-time CLI setup |
| 2 | `stripe generate app <name>` and `cd <name>` | Scaffold the app, not with `stripe apps create` |
| 3 | `pnpm install` | Install dependencies |
| 4 | Modify scaffolded files and create missing ones | Implement; only add what the scaffold doesn’t provide |
| 5 | `pnpm build` | Compile UI and scripts; skip for backend-only apps |
| 6 | `pnpm test` | Run tests |
| 7 | `stripe apps start` | Local preview for Dashboard UI extensions only |
| 8 | `stripe apps upload` | Publish a version; required before Secret Store or `fetchStripeSignature` work |
| 9 | Install in a sandbox using the private or public flow | Test the installed app |
| 10 | Dashboard → Apps → Submit for review | Marketplace publishing (optional) |
| 11 | `stripe feedback` | One report per build session; see `references/feedback.md` |

**BLOCKED:** Do NOT use `stripe apps create` — it does not scaffold correctly. Always use `stripe generate app`.

**MANDATORY:** Do NOT create files manually when `stripe generate app` provides them. The scaffold creates a V2 workspace: `stripe-app.yaml`, `package.json`, `pnpm-workspace.yaml`, and `ui/src/views/App.tsx` with the correct structure. Only create files that the scaffold doesn’t provide (for example, `server.js` for your backend). Modify scaffolded files as needed — don’t rewrite them from scratch.

## End-to-end build order (detailed)

Follow this sequence exactly. Deviating from it is the #1 source of confusion when building Stripe Apps.

### Step 1 — Prerequisites (one-time setup)

Install the Stripe CLI, then install the Apps plugin:

```bash
stripe plugin install apps
```

**Plain-language:** “This tool lets the Stripe CLI create and manage apps. You only need to do this once.”

Verify your CLI version is 1.52.0 or newer:

```bash
stripe version
```

### Step 2 — Create the app

```bash
stripe generate app <your-app-name>
cd <your-app-name>
```

This creates a new V2 workspace with the correct directory structure, `stripe-app.yaml` manifest, and example UI extension.

**What gets created:**

```
<your-app-name>/
├── stripe-app.yaml          # V2 app manifest (YAML) — name, permissions, viewports
├── package.json             # workspace root
├── pnpm-workspace.yaml      # declares workspace packages
├── ui/
│   ├── package.json
│   └── src/
│       └── views/
│           └── App.tsx      # main UI component
├── extensions/              # script extensions (one subdir per extension)
└── README.md
```

### Step 3 — Install dependencies

```bash
pnpm install
```

### Step 4 — Build and test

For apps with a UI extension, compile TypeScript and run tests:

```bash
pnpm build
pnpm test
```

Backend-only apps without TypeScript can skip this step.

### Step 5 — Develop UI extensions locally

Run this command only to develop or preview Dashboard UI extensions. Skip this step for apps without Dashboard UI; it isn’t a build or manifest validation command.

```bash
stripe apps start
```

**Plain-language:** “This opens your app live in your Stripe Dashboard while you build it. Changes you save show up immediately — you don’t need to upload anything yet.”

**What this does:**

- Opens a browser to your Stripe Dashboard with your app running live
- Watches for file changes and hot-reloads
- Works against your live Stripe account or a sandbox

**Notes:**

- `stripe apps start` requires browser access; Safari isn’t supported — use Chrome or Firefox
- This does **not** persist — your app is only visible while the command is running
- The app isn’t installed on your account yet; it’s only previewed locally

### Step 6 — Upload a version (when ready to share or test permissions and secrets)

Before uploading, run `stripe login` and log in to the account for your app’s distribution type:

- For a private app, log in to the sandbox where you want to test it.
- For a public app, log in to your live account.

For a public app that you want to test in a general sandbox, [update its manifest to support sandbox installs](https://docs.stripe.com/stripe-apps/enable-sandbox-support.md#update-the-app-manifest) before uploading.

```bash
stripe apps upload
```

**What this does:**

- Creates a new version of your app in the Stripe Dashboard
- Generates the signing secret needed for `fetchStripeSignature` and the Secret Store API
- Makes the version available to install

**After uploading a private app:**

1. Open [Created apps](https://dashboard.stripe.com/test/apps/created) in the sandbox where you uploaded the app
2. Select your app and open the **Versions** tab
3. Click **Install**, or click **Change version** if a version is already installed

**After uploading a public app:**

1. Complete the remaining steps to [enable general sandbox support](https://docs.stripe.com/stripe-apps/enable-sandbox-support.md)
2. [Create an external test link](https://docs.stripe.com/stripe-apps/test-app.md) for the uploaded version
3. Open a general sandbox, then visit the external test link to install the app

**When you need to upload before `stripe apps start`:**

- Using the Secret Store API
- Using `fetchStripeSignature` to authenticate the UI to a backend
- Testing permissions that require the app to be installed

### Step 7 — Install a private app in live mode (when ready to use with real data)

Skip this step for public apps. Before installing a private app in live mode, log in to your live account and run `stripe apps upload` again.

1. Go to the [Dashboard → Apps page](https://dashboard.stripe.com/apps)
2. Select your app
3. Choose “Private to your account”
4. Select the version to install
5. Click Install

**Plain-language:** “A sandbox uses test data so you can try things safely. Live mode uses real customer data. Always test in a sandbox first.”

### Step 8 — Ship a new version

1. Bump `version` in `stripe-app.yaml` (use semantic versioning: `1.0.0`, `1.0.1`, `2.0.0`)
2. Upload:
   ```bash
   stripe apps upload
   ```
3. Go to Dashboard → Apps → your app → version history → install the new version

**Important:** Versions must be uploaded in order. If you upload `2.0.0` before `1.0.0`, `2.0.0` won’t be available for release.

### Step 9 — Publish to the marketplace (optional)

To submit your app for marketplace review:

1. Go to [Dashboard → Apps](https://dashboard.stripe.com/apps)
2. Select your app
3. Click **Submit for review**

**Requirements:**

- Verified email address on your Stripe account
- Business details filled in
- App passes [review requirements](https://docs.stripe.com/stripe-apps/review-requirements.md)

### Final step — Submit feedback (after a build session)

If you weren’t able to accomplish the user’s goal on the first try and the build process wasn’t clear, send feedback. See `references/feedback.md` for details on how to share feedback with Stripe.

**Plain-language:** “Send Stripe one short, structured note about how the build went. It’s not support, and it never blocks your work.”

## Key gotchas

**`stripe apps start` vs `stripe apps upload`**

|  | `stripe apps start` | `stripe apps upload` |
| --- | --- | --- |
| Purpose | Develop or preview Dashboard UI extensions | Publish a version |
| Persistence | Not persistent — only while command runs | Persists in Stripe Dashboard |
| Secret Store | Not available | Available after upload |
| `fetchStripeSignature` | Only works after at least one upload | Works after upload |

**After updating permissions:**

- Users must re-authorize the app
- The “Review Permissions” button only appears on the **Apps workload page** — not on the app itself
- The app returns an invalid-request error for undeclared permissions until the user re-authorizes
- Always warn users about this step when you change permissions

**Sandboxes for app development:**

- Use sandboxes for safe testing — they provide isolated environments where you can test without affecting live data
- Each sandbox has its own app installation and signing secrets
- Useful for testing destructive operations or onboarding flows

License (MIT)

View full license text
The MIT License (MIT)

Copyright (c) 2024–2025 Stripe

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.