---
title: "stripe/ai"
description: "One-stop shop for building AI-powered products and businesses with Stripe."
source: https://github.com/stripe/ai
ref: main
license: MIT
licenseName: "MIT License"
canonical: https://skillsdocs.com/stripe/ai
base: https://github.com/stripe/ai/blob/main/
chapters: 7
inlined: 7
withheld: 0
words: 5995
updated: 2026-08-08T00:26:57Z
generator: "Skills Docs"
---

> **stripe/ai** — every Agent Skill in this repository, inlined verbatim.
>
> Canonical HTML: https://skillsdocs.com/stripe/ai
> Per-chapter Markdown: https://skillsdocs.com/stripe/ai/<skill>.md
> Machine manifest: https://skillsdocs.com/stripe/ai/.well-known/agent-skills/index.json
> JSON: https://skillsdocs.com/api/v1/books/stripe/ai
> Install: `npx skills add stripe/ai`
> Upstream: https://github.com/stripe/ai @ `main`
> Licence: MIT
>
> Content is mirrored from GitHub and © its authors, served unmodified. Takedown: https://github.com/kyleledbetter/skillsdocs/issues/new?labels=takedown&title=Takedown+request

# stripe/ai

One-stop shop for building AI-powered products and businesses with Stripe.

- **Chapters:** 7
- **Inlined:** 7 (licence detected)
- **Words:** 5,995
- **Reading time:** 29 min
- **Stars:** 1,731

## Table of contents

1. [connect-recommend](https://skillsdocs.com/stripe/ai/connect-recommend.md) — Use this skill when the user asks about Stripe Connect configuration, charge patterns, Dashboard access, or how to get started with Connect, is building a mark…
2. [stripe-apps](https://skillsdocs.com/stripe/ai/stripe-apps.md) — Use when building, modifying, or reviewing a Stripe App — or when the user describes something that implies one (e.g. "add a panel to the customer page", "cust…
3. [stripe-best-practices](https://skillsdocs.com/stripe/ai/stripe-best-practices.md) — Guides Stripe integration decisions across API selection (Checkout Sessions vs PaymentIntents), Connect platform setup (Accounts v2, controller properties), bi…
4. [stripe-directory](https://skillsdocs.com/stripe/ai/stripe-directory.md) — Use when the user wants to find businesses, software, service providers, or partners for a specific industry, workflow, pain point, capability, or job to be do…
5. [stripe-docs](https://skillsdocs.com/stripe/ai/stripe-docs.md) — Use when the user or agent needs to read, search, or look up Stripe documentation or API reference. Prefer this over curl or WebFetch for any docs.stripe.com c…
6. [stripe-projects](https://skillsdocs.com/stripe/ai/stripe-projects.md) — Use when the user wants to provision infrastructure or third-party services using Stripe Projects. Triggers: "I need a database", "set up auth", "add caching",…
7. [upgrade-stripe](https://skillsdocs.com/stripe/ai/upgrade-stripe.md) — Guide for upgrading Stripe API versions and SDKs


## Front matter

_The repository README, verbatim except that relative links are resolved against https://github.com/stripe/ai/blob/main/._

![Hero GIF](https://stripe.dev/images/badges/ai-banner.gif)

# Stripe AI

This repo is the one-stop shop for building AI-powered products and businesses on top of Stripe. 

It contains a collection of SDKs to help you integrate Stripe with LLMs and agent frameworks, including: 

* [`@stripe/ai-sdk`](https://github.com/stripe/ai/blob/main/llm/ai-sdk) - for integrating Stripe's billing infrastructure with Vercel's [`ai`](https://npm.im/ai) and [`@ai-sdk`](https://ai-sdk.dev/) libraries.
* [`@stripe/token-meter`](https://github.com/stripe/ai/blob/main/llm/token-meter) - for integrating Stripe's billing infrastructure with native SDKs from OpenAI, Anthropic, and Google Gemini, without any framework dependencies.

## Model Context Protocol (MCP)

Stripe hosts a remote MCP server at `https://mcp.stripe.com`. This allows secure MCP client access via OAuth. View the docs [here](https://docs.stripe.com/mcp#connect).

You can also [build autonomous agents](https://docs.stripe.com/mcp#agents) with MCP as well.

## Agent skills

[Agent skills](https://agentskills.io/home) are instructions that agents can use to build faster and more accurately. Stripe offers a collection of skills that help your agents use the latest best practices when building with Stripe.

If you use one of these popular agent harnesses, we recommend installing the official Stripe plugins, which include additional agent tools and update automatically.

### Claude Code

Run this command in your project:

```bash
claude plugin install stripe@claude-plugins-official
```

### Codex

Run this command in your project:

```bash
codex plugin add stripe@openai-curated
```

### Cursor

Run this command in your project:

```bash
/add-plugin stripe
```

You can also install through the [Cursor marketplace](https://cursor.com/marketplace/stripe).

### Grok Build

Run this command in your project:

```bash
grok plugin install stripe --trust
```

## Manual installation

> Manually installed skills don’t auto-update. Run `npx skills update -y` to get the latest versions.

Run this command in your project:

```bash
npx skills add https://docs.stripe.com
```


## License

[MIT](https://github.com/stripe/ai/blob/main/LICENSE)

---

<!-- chapter:begin slug=connect-recommend position=1 -->

## 1. connect-recommend

- **Source:** https://github.com/stripe/ai/blob/main/skills/connect-recommend/SKILL.md
- **Raw:** https://raw.githubusercontent.com/stripe/ai/main/skills/connect-recommend/SKILL.md
- **Markdown:** https://skillsdocs.com/stripe/ai/connect-recommend.md
- **Licence:** MIT — https://spdx.org/licenses/MIT.html

Bundled files (8), referenced from this skill's directory:
  - `references/account-types.md` — https://raw.githubusercontent.com/stripe/ai/main/skills/connect-recommend/references/account-types.md
  - `references/charge-patterns.md` — https://raw.githubusercontent.com/stripe/ai/main/skills/connect-recommend/references/charge-patterns.md
  - `references/company-researcher.md` — https://raw.githubusercontent.com/stripe/ai/main/skills/connect-recommend/references/company-researcher.md
  - `references/compatibility-matrix.md` — https://raw.githubusercontent.com/stripe/ai/main/skills/connect-recommend/references/compatibility-matrix.md
  - `references/decision-matrix.md` — https://raw.githubusercontent.com/stripe/ai/main/skills/connect-recommend/references/decision-matrix.md
  - `references/discovery-questions.md` — https://raw.githubusercontent.com/stripe/ai/main/skills/connect-recommend/references/discovery-questions.md
  - `references/recommendation-template.md` — https://raw.githubusercontent.com/stripe/ai/main/skills/connect-recommend/references/recommendation-template.md
  - `references/terminology-rules.md` — https://raw.githubusercontent.com/stripe/ai/main/skills/connect-recommend/references/terminology-rules.md

<!-- Verbatim upstream SKILL.md follows, YAML frontmatter included. -->

---
name: connect-recommend
description: >-
  Use this skill when the user asks about Stripe Connect configuration, charge
  patterns, Dashboard access, or how to get started with Connect, is building a
  marketplace, platform, multi-vendor store, gig platform, or subscription
  platform, needs to pay out sellers, vendors, or providers, mentions split
  payments, revenue sharing, multi-party payments, or similar payment
  distribution concepts, provides a company URL or business description for a
  recommendation, builds SaaS that routes money between parties (for example,
  POS, booking, invoicing — not operational SaaS without payment routing), asks
  about onboarding or KYC for merchants, sellers, and vendors, mentions
  connected account Dashboard or responsibility configurations, or asks about
  payment flows, white-label payments, or embedded payments.

---

## Connect recommend

Recommend the right Stripe Connect integration configuration. The user only needs to provide a company URL or describe their business — the skill figures out the rest.

### Interaction model

**User must confirm interactions**. Every decision point in this skill MUST be confirmed with the user with clear, numbered options and short descriptions. One question at a time — never overwhelm the user.

**Auto-act on low-cost actions**. Never ask permission for:

- Generating the markdown recommendation plan — just generate it
- Scanning the codebase — just scan it
- Reading reference files — just read them

**Never end with passive text**. Every stopping point must end with a prompt to the user offering concrete next actions.

### Terminology rules (user-facing output)

**Before generating any user-facing output, read <references/terminology-rules.md>**. Apply those rules to all recommendation text, warnings, explanations, and decision summaries.

Key principle: describe configurations using field values (Dashboard + fee ownership + negative balance liability ownership + charge pattern), not shorthand codes.

### Output Brevity

Keep responses concise. The user is making decisions, not reading documentation.

- Lead with the recommendation, follow with brief rationale
- Technical details (API paths, capability checks) go in a “Details” section of the final markdown plan — not inline in the main recommendation
- Warning blocks: 2-3 sentences maximum. State the issue and the fix. No mechanism deep-dives unless the user asks.
- Decision summary: bullet points only, one line per decision
- Never output more than ~40 lines in a single response during interactive mode

**Only mention out-of-scope limitations when they’re directly relevant to what the user asked about**. Don’t proactively list constraints or unsupported features (for example, OAuth, international expansion) when the user hasn’t asked about them. “Out-of-scope” here means outside what this guide supports, not outside what Stripe supports. Research these topics in the Stripe public documentation (docs.stripe.com) rather than saying they’re out-of-scope.

### Instructions

#### Step 0 — Show progress

Display the progress checklist so the user knows what to expect:

```
Here's what we'll do:

  [ ] Learn about your business
  [ ] Scan your project
  [ ] Recommend configuration + charge pattern
  [ ] Produce recommendation plan

Let's get started.
```

#### Step 1 — Learn about the business (ALWAYS runs first)

This is the most important step. Before scanning any code or asking technical questions, understand **what the business is**.

**1a. Check if the user already provided a URL or business description** in their message. Look for:

- A URL (for example, `https://...`, `www.`, `.com`, `.io`)
- A business description (for example, “I’m building a marketplace for…”, “We connect freelancers with…”)
- A company name that can be searched

**1b. If nothing was provided**, ask immediately using AskUserQuestion — this is the FIRST question the user sees:

```
Tell me about your business. Pick whichever is easiest:
```

Options:

- “I have a URL” — user provides URL, then research it
- “Let me describe it” — user provides description, then research it
- “Just scan my codebase” — skip to Step 2, rely on codebase signals only
- “Skip — ask me questions instead” — skip to Step 3 with full questionnaire

**1c. Research the business** — read and follow the company-researcher instructions:

Read <references/company-researcher.md> and perform those research steps, using the company URL (if provided) and business description (if provided) as inputs.

The research produces a structured analysis with confidence levels (HIGH/MEDIUM/LOW) for each decision dimension.

**1d. Parse the agent’s output** — it returns a Research Findings table with confidence levels per dimension. Read the decision matrix at <references/decision-matrix.md> and map the findings to a recommended configuration. Then determine pre-fill behavior per dimension:

- **HIGH confidence**: Auto-fill — don’t ask about this dimension
- **MEDIUM confidence**: Suggest the inferred value and ask for quick confirmation
- **LOW confidence**: Ask the original open-ended question in Step 3

**1e. Present what you learned** to the user (use second-person, conversational confirmation tone):

```
Here's what I gathered about your business — let me know if anything looks off:
  ┌──────────────────────────┬────────────────────────────────┐
  │ *Business type*          │ [marketplace or SaaS platform] │
  ├──────────────────────────┼────────────────────────────────┤
  │ *Sellers/providers*      │ [who they are]                 │
  ├──────────────────────────┼────────────────────────────────┤
  │ *Buyers/customers*       │ [who they are]                 │
  ├──────────────────────────┼────────────────────────────────┤
  │ *How money flows*        │ [payment flow]                 │
  ├──────────────────────────┼────────────────────────────────┤
  │ *Fee structure*          │ [fee details]                  │
  └──────────────────────────┴────────────────────────────────┘

Based on this, I'd recommend: [configuration description in plain language]

I'll proceed with this unless you'd like to correct anything.
```

For MEDIUM confidence items, append: “I’m also assuming [X] — sound right?”

If the agent flags “not-connect” (business doesn’t need Connect), ask the user:

```
Based on my research, your business may not need Stripe Connect — a standard Stripe integration might be a better fit.
```

Options:

- “Proceed with Connect anyway” — continue discovery
- “Explore standard integration instead” — exit this skill, suggest standard Stripe integration

Update the checklist:

```
  [x] Learn about your business
  [ ] Scan your project
  [ ] Recommend configuration + charge pattern
  [ ] Produce recommendation plan
```

**1f. Validate fee economics (ALWAYS runs, even on auto-filled values)**

If the platform fee (from auto-fill or user input) appears low AND any of these conditions apply:

- Charge pattern is `destination` or `separate` (platform pays Stripe fees by default)
- Charge pattern is `direct` AND `fees_collector: "application"` (platform still pays Stripe fees)

Then:

- ALWAYS show a margin warning regardless of how the fee was obtained
- Warn: “Your platform fee might be below Stripe’s processing fees at standard rates. Because the platform pays the Stripe processing fees, your net margin could be thin or negative. Check [stripe.com/pricing](https://stripe.com/pricing) for your region’s rates.”
- If the charge pattern is `destination` or `direct` (with `fees_collector: "application"`): The platform needs to calculate `application_fee_amount` as platform fee + estimated Stripe processing fee (so that the platform preserves its margin) and (if the platform owns pricing) use the [Platform Pricing Tool](https://dashboard.stripe.com/settings/connect/platform_pricing)
- If the charge pattern is `separate` (separate charges and transfers): `application_fee_amount` is NOT compatible. They need to calculate the net transfer amount to preserve margin instead of using `application_fee_amount`.
- Recommend monitoring the [margin report](https://docs.stripe.com/connect/margin-reports.md) in the Stripe Dashboard

This check MUST run even when the fee was auto-filled with HIGH confidence. The user needs to understand the fee economics before proceeding.

#### Step 2 — Auto-detect project context

Run this AFTER Step 1 (or in parallel if the user said “scan my codebase”). Use codebase signals to supplement or corroborate the company research. **Don’t ask before scanning — just scan.**

1. **Existing Connect config**: Check for `connect-recommend-plan.md` or any file at the project root that resembles a prior recommendation plan (for example, a file containing `## Recommended Connect integration plan`). If found, read it and note the prior configuration — use it to pre-fill or validate decisions in later steps, and present it to the user before asking questions they’ve already answered.
2. **Existing Stripe integration patterns**: Use Grep to search for Connect-specific patterns already in the codebase:
   - Connected account creation or references (`connected_account`, `account_id`, `stripe_account`)
   - Charge patterns in use (`destination`, `on_behalf_of`, `transfer_data`, `separate_charges`)
   - Transfer or payout logic (`transfers.create`, `payouts.create`)
   - Webhook handlers for Connect events (`account.updated`, `capability`, `payout`)
   - Existing `application_fee_amount` usage

If codebase signals contradict the company research, note the discrepancy and ask the user to clarify.

Present findings briefly (don’t repeat what Step 1 already covered):

```
Project scan:
- Existing Connect plan: [found at path / not found]
- Existing Connect integration: [patterns found / not found]
```

If a prior plan was found, ask the user:

```
I found an existing Connect recommendation plan at [path].
```

Options:

- “Use it as a starting point” — pre-fill all decisions from the prior plan, then confirm each with the user in Step 3
- “Start fresh” — ignore the prior plan and run full discovery

Update the checklist:

```
  [x] Learn about your business
  [x] Scan your project
  [ ] Recommend configuration + charge pattern
  [ ] Produce recommendation plan
```

#### Step 3 — Ask remaining discovery questions

For any dimension not already filled with HIGH confidence from Step 1, ask the corresponding question to the user. Skip dimensions that were auto-filled or explicitly confirmed.

**Read <references/discovery-questions.md>** for complete question scripts, option mappings, and edge-case logic for Step 3, Step 3b (hybrid flows), Step 3c (sales-led/scope detection), and the fee-structure checkpoint.

If Step 1 was skipped entirely, ask all six discovery questions one at a time:

- Q1: Business model
- Q2: Parties in the platform
- Q3: Payment flow
- Q4: Dashboard and onboarding preference
- Q5: Dispute and refund ownership + risk management + loss liability
- Q6: Fee structure + `application_fee_amount` calculation

Critical guardrails (must enforce in all discovery paths):

- For marketplace or intermediary checkout flows, default to destination charges unless behavior clearly indicates each seller runs their own checkout or payment relationship.
- If the business mixes its own-brand sales with marketplace or intermediary flows, trigger Step 3b hybrid-flow handling and map each flow to its own charge-pattern and responsibility settings.
- If the user needs hold-and-release timing, recommend separate charges and transfers (destination charges can’t hold funds and aren’t appropriate for hold-and-release behavior).
- For SaaS with independent sellers that own customer relationships, use full dashboard + direct charges + embedded onboarding.
- If the user asks “what account type should I use?”, reframe during discovery to Accounts v2 explicit fields (`dashboard`, `defaults.responsibilities`, and `merchant` or `recipient` by funds flow), not legacy account types. Read <references/account-types.md> for the full v2 configuration reference.
- When describing low-margin scenarios, present warnings and risks before mitigation steps.
- If `dashboard: "none"` is selected, include a concise full-scope warning about custom UI responsibilities.
- For destination or separate recommendations with `losses_collector: "application"`, explain the causal chain: platform owns negative balance liability and connected-account negative balances enable dispute-time transfer reversals.
- Keep risk management and negative balance liability as separate decisions.
- Trigger Step 3c when enterprise or sales-led signals appear (`on_behalf_of`, cross-border complexity, non-Connect products, or sales-gated configs).

Fee structure checkpoint before Step 4:

1. Confirm fee type and fee amount
2. Confirm how `application_fee_amount` is calculated
3. Confirm whether a margin warning is required
4. Include stripe.com/pricing link in output context

#### Step 4 — Generate recommendation

Read the decision matrix at <references/decision-matrix.md> and apply it to the user’s answers. For charge pattern details, read <references/charge-patterns.md>.

**Step 4a — Compatibility validation (MANDATORY before presenting recommendation)**

Read <references/compatibility-matrix.md> and cross-check the proposed `(dashboard, fees_collector, losses_collector)` + `chargePattern` combination against the compatibility matrix.

1. **BLOCKED combination?** Do NOT present it. Output a visible BLOCKED warning with ALL of these:

   - The exact blocked config tuple (for example, `losses_collector: "stripe" + destination charges`)
   - A 2-3 sentence explanation of the MECHANISM of failure (for example, “With destination charges and a dispute, Stripe debits the disputed amount from the platform’s balance. The platform must then manually reverse the transfer to recover funds from the connected account — but `reverse_transfer` defaults to false on both refunds and disputes, so recovery isn’t automatic. With `losses_collector: 'stripe'`, the platform has no mechanism to push negative balance recovery onto the connected account, so it silently absorbs the loss.”)
   - The recommended fix (nearest ALLOWED alternative — usually switching `losses_collector` to `"application"` or switching to direct charges) Then re-run the recommendation with the corrected configuration.

2. **CAUTION combination?** Present the recommendation but include a visible warning callout explaining the specific tradeoff (for example, “dashboard visibility limitations for direct charges when using `dashboard: \"express\"`”).

3. **Additional compatibility checks (include concise warnings when triggered):**

   - If the user mentioned **OAuth** for connecting accounts, include a 1-2 sentence warning that accounts can disconnect and recommend embedded onboarding for stronger platform control.
   - If `dashboard: "none"`, include a concise warning that the platform must own onboarding and remediation, refund and dispute flows, and earnings and payout views; recommend Express dashboard with embedded components as a lower-maintenance alternative.
   - If user mentions **Billing, Invoicing, or Payment Links** with destination charges, include a concise compatibility warning and recommend the nearest supported path.
   - If `dashboard: "full"` + `fees_collector: "stripe"` + charge pattern is `destination` or `separate`, treat as BLOCKED. Do NOT present this configuration. Output a BLOCKED notice and instruct the user to switch to direct charges.
   - If `dashboard: "full"` + `fees_collector: "application"`, treat as SALES-GATED regardless of charge pattern. Do NOT recommend for self-serve paths. Redirect to [Stripe sales](https://stripe.com/contact/sales).
   - If `dashboard: "express"` + `fees_collector: "stripe"`, treat as BLOCKED and recommend either switching to full dashboard (Stripe-owned pricing) or platform-owned pricing.

4. **Merchant-of-record consistency check:** Verify the recommended charge type matches the actual business relationship. Direct charges = connected account provides goods and services directly. Destination and separate charges and transfers = platform owns the customer relationship. Stripe does NOT enforce merchant of record at the API level — the code must be consistent.

5. **Compatibility warning brevity:** Keep compatibility warning copy concise (2-3 sentences max), but include mechanism-aware reasoning and the corrective path.

**Step 4b — Recommend embedded components**

Embedded components are recommended, as they enable platforms to build full-featured dashboards of their own, especially when accounts are configured with `dashboard: "none"` and even if accounts are configured with (`dashboard: "full"` or `dashboard: "express"`). Select components based on user needs:

Baseline (always include):

- `account_onboarding`
- `notification_banner` (required; keeps connected accounts healthy and enabled as requirements evolve)
- `account_management`

Common additions:

- Transaction history → `payments` (use `payment_details` if building a custom payments list)
- Disputes → included with `payments` but can use `disputes_list` if also building a standalone disputes page
- Payout operations and earnings → `payouts`
- Reporting and reconciliation → `balance_report`, `payout_reconciliation_report`

Charge-pattern compatibility caveats:

- Destination charges: payment and dispute views show reduced detail.
- Separate charges and transfers: payment and dispute views show reduced detail.
- Direct: payment and dispute views operate with full fidelity.

Out of scope component families:

- Issuing, Treasury, and Capital and Tax component sets (route through Step 3c scope handling).

Be prepared to output a list of embedded components in the next step.

Update the checklist:

```
  [x] Learn about your business
  [x] Scan your project
  [x] Recommend configuration + charge pattern
  [ ] Produce recommendation plan
```

#### Step 5 — Generate recommendation plan

**Read <references/recommendation-template.md>** and follow its “Output requirements” checklist and “Canonical recommendation template” structure. That file is the single source for required sections, wording, and formatting. If any required section is missing from your output, add it before moving on.

Then ask the user:

```
Does this recommendation look right?
```

Options (max 4 — options hard limit):

- “Looks good” — proceed to Step 6
- “Change something” — ask which aspect to change (dashboard or responsibility settings, charge pattern, fee structure, or fee calculation) then re-ask the relevant question
- “Explain more about the options” — read reference docs and explain alternatives

Generate the final recommendation plan. If the user asks, also write the exact same markdown to `connect-recommend-plan.md` at the project root.

When they accept the plan, update the checklist:

```
  [x] Learn about your business
  [x] Scan your project
  [x] Recommend configuration + charge pattern
  [x] Produce recommendation plan
```

#### Step 6 — Explain what belongs in code vs Dashboard, and next actions

Show a compact summary of decisions and immediate implementation priorities.

Briefly explain:

- **In your code**: charge pattern behavior, `application_fee_amount` math, transfer and reversal handling, and webhook handlers
- **In the Stripe Dashboard**: platform profile settings, pricing tool configuration, connected-account visibility, Radar for Platforms settings, and operational monitoring
- **During onboarding and runtime**: capability activation, payouts readiness, and account-state transitions

**IMPORTANT: Always end with AskUserQuestion.** Never end with passive text.

Use AskUserQuestion:

```
What would you like to do next?
```

Options:

- “Refine a decision” — adjust dashboard, responsibilities, charge pattern, or fee model
- “Expand implementation steps” — provide a deeper technical rollout checklist
- “Generate `connect-recommend-plan.md` and build” — write the plan to a markdown file and handoff to a coding agent

<!-- chapter:end slug=connect-recommend -->

---

<!-- chapter:begin slug=stripe-apps position=2 -->

## 2. stripe-apps

- **Source:** https://github.com/stripe/ai/blob/main/skills/stripe-apps/SKILL.md
- **Raw:** https://raw.githubusercontent.com/stripe/ai/main/skills/stripe-apps/SKILL.md
- **Markdown:** https://skillsdocs.com/stripe/ai/stripe-apps.md
- **Licence:** MIT — https://spdx.org/licenses/MIT.html

Bundled files (10), referenced from this skill's directory:
  - `references/authentication.md` — https://raw.githubusercontent.com/stripe/ai/main/skills/stripe-apps/references/authentication.md
  - `references/backend.md` — https://raw.githubusercontent.com/stripe/ai/main/skills/stripe-apps/references/backend.md
  - `references/canonical-docs.md` — https://raw.githubusercontent.com/stripe/ai/main/skills/stripe-apps/references/canonical-docs.md
  - `references/discovery.md` — https://raw.githubusercontent.com/stripe/ai/main/skills/stripe-apps/references/discovery.md
  - `references/extension-types.md` — https://raw.githubusercontent.com/stripe/ai/main/skills/stripe-apps/references/extension-types.md
  - `references/onboarding-ux.md` — https://raw.githubusercontent.com/stripe/ai/main/skills/stripe-apps/references/onboarding-ux.md
  - `references/publishing.md` — https://raw.githubusercontent.com/stripe/ai/main/skills/stripe-apps/references/publishing.md
  - `references/ui-extensions.md` — https://raw.githubusercontent.com/stripe/ai/main/skills/stripe-apps/references/ui-extensions.md
  - `references/webhooks.md` — https://raw.githubusercontent.com/stripe/ai/main/skills/stripe-apps/references/webhooks.md
  - `references/workflow.md` — https://raw.githubusercontent.com/stripe/ai/main/skills/stripe-apps/references/workflow.md

<!-- Verbatim upstream SKILL.md follows, YAML frontmatter included. -->

---
name: stripe-apps
description: >-
  Use when building, modifying, or reviewing a Stripe App — or when the user
  describes something that implies one (e.g. "add a panel to the customer page",
  "customize my Stripe Dashboard", "react to Stripe events from my app",
  "connect my service to Stripe without sharing API keys"). Covers the full app
  development workflow (scaffold, preview, upload, versioning), UI extension
  architecture (sandboxed iframe, Stripe UI toolkit, viewports), extension types
  (UI extensions, backend-only, extension interfaces, embedded apps),
  authentication (platform keys, OAuth, restricted API keys), stripe-app.yaml
  manifest setup (permissions, viewports, CSP), webhook configuration for apps,
  Secret Store API, `fetchStripeSignature` auth, and marketplace publishing. Use
  when the user mentions Stripe Apps, UI extensions, @stripe/ui-extension-sdk,
  stripe-app.yaml, Dashboard extensions, or customizing the Stripe Dashboard.

---

## Stripe Apps — Agent Instructions

**FIRST ACTION:** Say “Loading Stripe Apps skill.” then Read `references/discovery.md`. This file has routing logic you need before asking the user questions.

### Your role

You are a PROJECT BUILDER and INSTRUCTOR. Your primary output is working files on the user’s machine that they can run immediately. If you explain code without also writing it to disk using your Write tool, the user has nothing they can execute.

You are also a patient guide. Many users have never heard of Stripe Apps, viewports, or webhooks. When they say “I’m not sure” or “what does that mean?”, explain concepts in plain language with examples from their specific idea.

**Your tool calls (Read, Write) are your real work. Your chat messages explain what you did and teach the user why.**

### Source of truth for code patterns

Your training data for Stripe Apps SDK patterns may be outdated or incorrect. Before writing any code file, you MUST read the relevant canonical docs page using WebFetch. See `references/canonical-docs.md` for the full list of docs pages.

If you cannot access the docs, tell the user: “I need to check the current Stripe Apps documentation to write correct code. Can you provide the current patterns from [relevant docs URL], or shall I proceed with the scaffold and you can verify against the docs?”

## HARD RULES — violating any of these is a failure

| \# | Rule | What failure looks like |
| --- | --- | --- |
| 0 | BEFORE ANYTHING ELSE: (1) Say “Loading Stripe Apps skill.” (2) Call Read on `references/discovery.md` to load the routing table. You need this data before you can ask informed questions. | Responding to the user before calling Read on discovery.md |
| 1 | After reading discovery.md, your FIRST message to the user is ONLY the 4 discovery questions (see Step 1). No code, no plan, no summary. Even if the user’s request already mentions details — ask anyway. Users have unstated requirements that only emerge through questions. | Presenting a summary, plan, or any code before asking questions 1-4 and getting answers |
| 2 | You MUST use your Write tool to create or modify files on disk. The scaffold creates base files via CLI — after that, use Write to modify scaffolded files and create new ones. A response with code only in chat gives the user nothing runnable. | Producing code in chat without calling Write to save it to disk |
| 3 | Run `stripe generate app <name>` using your Bash tool to scaffold the project. Then use Write to modify scaffolded files and create additional files the app needs. | Writing stripe-app.yaml or package.json from scratch instead of modifying the scaffold output |
| 4 | Before writing code for any topic (backend, UI, webhooks, auth), read the relevant canonical docs page using WebFetch. See `references/canonical-docs.md`. The docs are the source of truth — not this skill file, not your training data. | Writing code from memory without checking the current docs |
| 5 | Tell user: `stripe apps upload` BEFORE testing fetchStripeSignature/Secret Store (the signing secret is generated during first upload). | Omitting upload-first requirement |
| 6 | File names: `ui/src/views/App.tsx` (V2 workspace layout), `server.js` (project root). Only create files that are needed for the app’s architecture (see Step 3). | Using wrong filenames or creating files the architecture doesn’t need |
| 7 | Every file you write to disk MUST be complete and runnable — not a skeleton or placeholder. The user should be able to run it immediately. Do not write partial files with TODOs. | Writing a file with TODO placeholders or incomplete implementations |
| 8 | When presenting the development workflow, include `pnpm build` and `pnpm test` as explicit steps for apps with a UI extension. Backend-only apps without TypeScript skip `pnpm build`. | Omitting build/test steps for UI apps, or requiring them for backend-only apps |
| 9 | If the user’s app requires custom objects or extension interfaces (private preview features), OR full-page apps, inform them the feature is in private preview and ask them to confirm they have access BEFORE proceeding. Do not silently proceed with a private preview feature. | Building with private preview features without confirming user has access |

## BLOCKED — these produce broken apps

| BLOCKED (never use) | Use instead |
| --- | --- |
| `stripe apps create` | `stripe generate app <name>` |
| Raw HTML in UI extensions (`<div>`, `<span>`, `<p>`, `<button>`, `<input>`, `<h1>`-`<h6>`) | SDK components from `@stripe/ui-extension-sdk/ui` (Box, Inline, Button, TextField, etc.) |
| CSS frameworks in UI (Tailwind, MUI, Bootstrap, styled-components, CSS files) | Only `@stripe/ui-extension-sdk/ui` components — no custom styling |
| React 18+ APIs in UI (`useId`, `useDeferredValue`, `useTransition`, concurrent features) | React 17 hooks only (Stripe Apps run React 17.0.2) |
| `window`, `document`, `localStorage`, `sessionStorage` in UI | Not available in sandboxed iframe |

## Protocol — execute these steps IN ORDER

### Step 1 — Discovery (your first message)

Read <references/discovery.md> using your file-reading tool.

You CANNOT determine the correct architecture without user input because:

- The authentication type determines the backend pattern (platform keys vs OAuth vs restricted keys)
- Private vs public apps have different webhook configurations
- The viewport determines which context props are available
- Backend vs frontend-only changes which files you create

Ask these questions in your FIRST message — nothing else:

1. What should the app do? (UI in Dashboard / react to events / both / modify billing or payment logic)
2. Where should it appear? (customer detail, payment detail, full page, etc.)
3. Who is it for? (only you or your team = private, OR other Stripe users = public/marketplace)
4. Does it need to store data or talk to other services?

Do NOT include a summary, plan, or architecture in this first message. ONLY the 4 questions above.

**If the user doesn’t know an answer or asks for clarification:**

- Explain the concept in plain language
- Give concrete examples from their stated idea
- Help them figure out the right answer

**Private preview check:** After getting answers, before showing your summary, check whether their app implies needing:

- **Custom objects** (storing custom data models IN Stripe)
- **Extension interfaces** (changing how Stripe processes billing, payments, or tax)
- **Full-page apps** (dedicated page in Dashboard nav)

If yes: tell the user that feature is in private preview, ask them to confirm access. See `references/discovery.md` for exact wording and alternatives.

After the user answers, show a plain-language summary:

- “You want to: [goal]. It will appear: [where]. It’s for: [private/marketplace]. It needs: [backend/secrets/only Stripe data].”

Wait for explicit confirmation before proceeding.

### Step 2 — Scaffold

Run the scaffold command yourself using your Bash tool:

```bash
stripe generate app <name>
```

This creates a V2 workspace: `stripe-app.yaml`, `package.json`, `pnpm-workspace.yaml`, `ui/src/views/App.tsx`.

After the scaffold completes, proceed directly to Step 3.

### Step 3 — Build (WRITE every file to disk)

Before writing any code, read the relevant canonical docs pages (see `references/canonical-docs.md`) using WebFetch:

- For UI code: read the Extensions SDK API page and the UI components page
- For backend code: read the Backend + signed requests page and Authentication types page
- For webhooks: read the Events page
- For Secret Store: read the Secret Store page

**YOUR PRIMARY JOB: Create files on disk following the patterns from the docs.**

Which files to create depends on discovery answers:

| Architecture | Files to write |
| --- | --- |
| Frontend-only (reads Stripe data, no external services) | Modify: `stripe-app.yaml`, `ui/src/views/App.tsx` |
| Backend-only (webhooks/events, no Dashboard UI) | Modify: `stripe-app.yaml`. Create: `server.js` |
| Full-stack (UI + backend) | Modify: `stripe-app.yaml`, `ui/src/views/App.tsx`. Create: `server.js` |

For each file: call your Write tool FIRST, then explain what it does.

**Key constraints for UI code:**

- Import ONLY from `@stripe/ui-extension-sdk/ui` for components
- NO raw HTML elements, NO CSS
- Follow the SDK API patterns from the canonical docs exactly

**Key constraints for backend code (server.js):**

- CORS (`Access-Control-Allow-Origin: *`) only on endpoints called by the UI extension — webhook endpoints don’t need CORS
- `fetchStripeSignature` verification follows the pattern in https://docs.stripe.com/stripe-apps/build-backend
- Webhook endpoint count and configuration depends on auth type and distribution — check https://docs.stripe.com/stripe-apps/events
- The `event_read` permission must be declared in the manifest for webhook event access

**Key constraints for stripe-app.yaml:**

- Declare ALL permissions with purpose strings
- Follow the manifest schema from https://docs.stripe.com/stripe-apps/reference/app-manifest
- Include `extensions: []` even if no backend extensions

### Step 4 — Deliver (REQUIRED — do not skip)

Your FINAL message MUST present the development workflow:

1. `stripe generate app <name>` → scaffold
2. `pnpm install` → dependencies
3. Modify scaffolded files + create additional files → implement
4. `pnpm build` → compile TypeScript (UI apps only)
5. `pnpm test` → run unit tests
6. `stripe apps start` → local preview in Dashboard
7. `stripe apps upload` → publish version (**required** before fetchStripeSignature or Secret Store)
8. Install from Dashboard → test

**Important workflow facts:**

- Use sandboxes for safe testing — they provide isolated environments for app development
- `stripe apps upload` generates the signing secret needed for `fetchStripeSignature`
- Public/marketplace apps need account activation (verified email + business details)
- For webhook forwarding during local dev, see `references/webhooks.md`

### Step 5 — Verify files exist

Before ending the conversation, confirm your files are on disk. Run `ls` on the files you wrote to verify they exist.

If any file is MISSING, call Write now to create it.

## Troubleshooting uploads

| Error | Cause | Fix |
| --- | --- | --- |
| `Invalid manifest` | Missing required fields or malformed YAML | Check indentation; ensure `id:`, `version:`, `name:` are present |
| `Build failed` | UI component has type/import errors | Run `pnpm build` locally first |
| `Version already exists` | Already uploaded this version number | Bump `version` in stripe-app.yaml |
| `Permission denied` | CLI not logged in or wrong account | Run `stripe login` |
| `connect-src` / CSP error | App calls undeclared URL | Add URL to `content_security_policy.connect-src` |
| `extensions field required` | Missing `extensions: []` | Add `extensions: []` to stripe-app.yaml |
| `Component not found` | Viewport references wrong component name | Match `component:` value to your default export |

## Reference files

| File | Read when |
| --- | --- |
| <references/canonical-docs.md> | **ALWAYS** — lists docs pages to WebFetch before writing code |
| <references/discovery.md> | **ALWAYS FIRST** — full discovery script with routing |
| <references/backend.md> | Before writing server.js |
| <references/ui-extensions.md> | Before writing React/UI code |
| <references/workflow.md> | Full development loop with all CLI commands |
| <references/extension-types.md> | After discovery — map answers to extension type |
| <references/webhooks.md> | When app reacts to Stripe events |
| <references/authentication.md> | For auth type selection and patterns |
| <references/onboarding-ux.md> | For first-run experience |
| <references/publishing.md> | For marketplace publishing |

<!-- chapter:end slug=stripe-apps -->

---

<!-- chapter:begin slug=stripe-best-practices position=3 -->

## 3. stripe-best-practices

- **Source:** https://github.com/stripe/ai/blob/main/skills/stripe-best-practices/SKILL.md
- **Raw:** https://raw.githubusercontent.com/stripe/ai/main/skills/stripe-best-practices/SKILL.md
- **Markdown:** https://skillsdocs.com/stripe/ai/stripe-best-practices.md
- **Licence:** MIT — https://spdx.org/licenses/MIT.html

Bundled files (6), referenced from this skill's directory:
  - `references/billing.md` — https://raw.githubusercontent.com/stripe/ai/main/skills/stripe-best-practices/references/billing.md
  - `references/connect.md` — https://raw.githubusercontent.com/stripe/ai/main/skills/stripe-best-practices/references/connect.md
  - `references/payments.md` — https://raw.githubusercontent.com/stripe/ai/main/skills/stripe-best-practices/references/payments.md
  - `references/security.md` — https://raw.githubusercontent.com/stripe/ai/main/skills/stripe-best-practices/references/security.md
  - `references/tax.md` — https://raw.githubusercontent.com/stripe/ai/main/skills/stripe-best-practices/references/tax.md
  - `references/treasury.md` — https://raw.githubusercontent.com/stripe/ai/main/skills/stripe-best-practices/references/treasury.md

<!-- Verbatim upstream SKILL.md follows, YAML frontmatter included. -->

---
name: stripe-best-practices
description: >-
  Guides Stripe integration decisions across API selection (Checkout Sessions vs
  PaymentIntents), Connect platform setup (Accounts v2, controller properties),
  billing/subscriptions, tax and registrations (Stripe Tax, automatic_tax,
  product tax codes), Treasury financial accounts, integration options
  (Checkout, Payment Element), migrating from deprecated Stripe APIs, and
  security best practices (API key management, restricted keys, webhooks,
  OAuth). Use when building, modifying, or reviewing any Stripe integration,
  including accepting payments, building marketplaces, integrating Stripe,
  processing payments, setting up subscriptions, collecting sales tax, VAT, or
  GST, creating connected accounts, or implementing secure key handling.

---

Latest Stripe API version: **2026-07-29.dahlia**. Always use the latest API version and SDK unless the user specifies otherwise.

Latest SDK versions:

| Language | Latest version |
| --- | --- |
| Ruby | 19.4.0 |
| Python | 15.4.0 |
| Node.js | 22.4.0 |
| PHP | 21.1.0 |
| Java | 33.2.0 |
| Go | 86.2.0 |
| .NET | 52.2.0 |

If you don’t have a Stripe account, you can call a CLI command to generate working API keys with no registration required. You can install the Stripe CLI (`npm i -g @stripe/cli`) and run the command `stripe sandbox create` to get started.

If `stripe sandbox create` is used, don’t use MCP.

If you try to use MCP after running sandbox creation, first make sure `stripe sandbox claim` is run. Use `stripe whoami --format json` for CLI auth checks; do not run `stripe config --list`.

API key default: Always recommend a [restricted API key (RAK)](https://docs.stripe.com/keys/restricted-api-keys.md) (`rk_` prefix) over a secret key (`sk_` prefix).

## Integration routing

| Building… | Recommended API | Details |
| --- | --- | --- |
| One-time payments | Checkout Sessions | <references/payments.md> |
| Custom payment form with embedded UI | Checkout Sessions + Payment Element | <references/payments.md> |
| Saving a payment method for later | Setup Intents | <references/payments.md> |
| Connect platform or marketplace | Accounts v2 (`/v2/core/accounts`) | <references/connect.md> |
| Usage-based billing (new integration) | Metronome | <references/billing.md> |
| Subscriptions or recurring billing | Billing APIs + Checkout Sessions | <references/billing.md> |
| Sales tax, VAT, or GST compliance | Stripe Tax + Registrations API | <references/tax.md> |
| Embedded financial accounts / banking | v2 Financial Accounts | <references/treasury.md> |
| Security (key management, RAKs, webhooks, OAuth, 2FA, Connect liability) | See security reference | <references/security.md> |

Read the relevant reference file before answering any integration question or writing code.

## Critical rules

- *Before enabling `automatic_tax: { enabled: true }`* (or calculating tax for a custom PaymentIntent), read the [tax reference](references/tax.md) and confirm the user has an active registration. Without one, Stripe calculates and collects no tax while the user believes tax is on (the most common Stripe Tax mistake).

- *Never include `payment_method_types` in any Stripe API call*, with one exception: Terminal (in-person payments) integrations must pass `payment_method_types: ['card_present']` on the PaymentIntent. For all other integrations, omit this parameter entirely to enable dynamic payment methods, which enables you to configure payment method settings from the Dashboard and dynamically display the most relevant eligible payment methods to each customer to maximize conversion. To customize which payment methods you accept, use [`payment_method_configurations`](https://docs.stripe.com/payments/payment-method-configurations.md) or `excluded_payment_method_types` instead of `payment_method_types`.

- On API version `2026-03-25.dahlia` or later, pass the parameter `integration_identifier` to `checkout.sessions.create` to tag sessions with a custom label for tracking and comparing checkout flows in the Dashboard. The label should include a suffix of 8 random letters.

- *Always instantiate a `StripeClient` and call methods on that instance.* Do **not** use the deprecated global/module-level API key pattern (`stripe.api_key = …`, `Stripe.setApiKey`, `stripe.Key = …`, `StripeConfiguration.ApiKey = …`). The global pattern is deprecated in all current SDKs.

## Key documentation

When the user’s request does not clearly fit a single domain above, consult:

- [Integration Options](https://docs.stripe.com/payments/payment-methods/integration-options.md) — Start here when designing any integration.
- [API Tour](https://docs.stripe.com/payments-api/tour.md) — Overview of Stripe’s API surface.
- [Go Live Checklist](https://docs.stripe.com/get-started/checklist/go-live.md) — Review before launching.

<!-- chapter:end slug=stripe-best-practices -->

---

<!-- chapter:begin slug=stripe-directory position=4 -->

## 4. stripe-directory

- **Source:** https://github.com/stripe/ai/blob/main/skills/stripe-directory/SKILL.md
- **Raw:** https://raw.githubusercontent.com/stripe/ai/main/skills/stripe-directory/SKILL.md
- **Markdown:** https://skillsdocs.com/stripe/ai/stripe-directory.md
- **Licence:** MIT — https://spdx.org/licenses/MIT.html

<!-- Verbatim upstream SKILL.md follows, YAML frontmatter included. -->

---
name: stripe-directory
description: >-
  Use when the user wants to find businesses, software, service providers, or
  partners for a specific industry, workflow, pain point, capability, or job to
  be done. Also use when the agent needs to programmatically purchase or consume
  a service. Use Stripe Directory to build a short relevant shortlist, even if
  the user does not mention Stripe Directory explicitly.
metadata:
  short-description: Find (and optionally purchase from) vendors or partners
allowed-tools:
  - Bash(stripe directory *)

---

## Stripe Directory Search

Turn a vague market need into a short, relevant shortlist with `stripe directory search`. Use this even when the user never says “Stripe Directory” — any request to find vendors, tools, partners, or providers for a vertical, workflow, pain point, or job-to-be-done.

Most requests are **discovery** — find and compare services. That is the core job below. Some services are also **MPP-supported** (MPP = Machine Payment Protocol), meaning you (the agent) can pay their HTTP 402 (Payment Required) endpoint and consume them directly. When the user actually wants to *use or buy* a service, present those results and offer to purchase — see “Purchasing” at the end.

## Process

1. **Clarify only what’s missing**: buyer/vertical, job-to-be-done, must-have capability, geography (only if it matters).

2. **Search iteratively**: `stripe directory search "<query>" --format json`

   - Short noun phrases, one angle per query; run 1-3, then broaden/narrow on results.
   - Angles to cover: vertical → workflow → pain point → adjacent. Two examples:
     - services/trades: vertical (`electrician software`, `electrical contractor`) → workflow (`field service management`, `dispatch invoicing estimates`) → pain point (`job scheduling`, `quote automation`) → adjacent (`home services automation`, `contractor crm`).
     - SaaS/software: vertical (`b2b saas billing`, `developer tools`) → workflow (`subscription management`, `usage-based metering`) → pain point (`failed payment recovery`, `revenue recognition`) → adjacent (`analytics dashboards`, `customer onboarding`).
   - Hard constraints → filters: `--countries-supported=US`, `--has-stripe-app=true`, `--link-supported=true`, `--stripe-projects-supported=true`.
   - If the user wants to *use/buy* a service, also pass `--mpp-supported` in at least one search to find results you can pay for programmatically.
   - Sparse niche? Raise `--limit` and try the next `--page` before concluding it’s empty.

3. **Dedupe & score** using `display_name`, `description`, `url`, `username` as evidence.

   - Prefer results whose description/site clearly match the target workflow.
   - Prefer more trust signals over fewer: Projects provider, Link enabled, Marketplace app, Stripe Verified. For buy/use intent, also prefer MPP-supported results.
   - Thin description but strong brand/domain match → keep in a weaker bucket, don’t discard.

4. **Return a shortlist, not a dump** — 5-10 strong matches, grouped:

   - **direct** / **adjacent** / **needs manual review**
   - Each entry: name · why it matched · URL (· which query surfaced it, when useful).
   - Projects providers: offer the follow-up. The JSON gives the exact commands under each result’s `projects.catalog_command` / `projects.install_command` (`stripe projects catalog <provider>`, `stripe projects add <provider>`).
   - MPP-supported results: note they’re purchasable and include `mpp.slug` / `mpp.url`.

5. **Be honest about weak results** — if sparse or generic, say so and adjust: broaden, narrow, or try synonyms rather than padding with noise.

Always report the exact queries (and filters) you ran so the user can keep iterating.

## Purchasing (only when the user wants to buy or consume a service)

MPP-supported results are payable directly. Don’t drive to purchase unprompted. When the user wants to buy, **present the full menu of payment methods and ask which they’d like to use** before doing anything:

> "Which payment method would you like to use?
> 
> - **Link CLI** — Stripe-native, test mode available (recommended)
- **Tempo** — crypto wallet
- **Privy Agent Wallet CLI** — crypto wallet
- **mppx** — debug-only fallback"

Once the user picks, silently run `which <tool> 2>/dev/null` to check if it’s installed. If not installed, offer to install it (for example, `npm i -g @stripe/link-cli` for Link CLI) and wait for confirmation before proceeding.

**Always show the price and get explicit user approval before any money moves**; prefer a no-charge test path first.

Short version:

1. Resolve the real callable endpoint from the result’s `mpp.slug` / `mpp.url`. `mpp.url` is often the mpp.dev landing form (`https://mpp.dev/services#<slug>`) — resolve the raw endpoint on [mpp.dev](https://mpp.dev) if so. Read the HTTP 402 challenge to confirm the amount: `curl -s -D - -o /dev/null <endpoint_url>` (look for `WWW-Authenticate`).
2. Use the payer the user selected.
   - **`link-cli`** (Stripe-native Shared Payment Token, has a test mode, no crypto wallet, US Link accounts only; `npm i -g @stripe/link-cli`): `auth login` → `mpp decode --challenge "<value>"` (get `network_id`) → `spend-request create --credential-type shared_payment_token --network-id <id> --amount <cents ≤50000> --context "<100+ chars>" --request-approval` (blocks for approval) → `mpp pay <endpoint_url> --spend-request-id <approved_id>`.
   - **Tempo**: `tempo wallet login` / `services` / `request`.
   - **Privy**: `@privy-io/agent-wallet-cli`.
   - **mppx**: debug-only fallback.

Never invent results or skip the price/approval gate.

<!-- chapter:end slug=stripe-directory -->

---

<!-- chapter:begin slug=stripe-docs position=5 -->

## 5. stripe-docs

- **Source:** https://github.com/stripe/ai/blob/main/skills/stripe-docs/SKILL.md
- **Raw:** https://raw.githubusercontent.com/stripe/ai/main/skills/stripe-docs/SKILL.md
- **Markdown:** https://skillsdocs.com/stripe/ai/stripe-docs.md
- **Licence:** MIT — https://spdx.org/licenses/MIT.html

<!-- Verbatim upstream SKILL.md follows, YAML frontmatter included. -->

---
name: stripe-docs
description: >-
  Use when the user or agent needs to read, search, or look up Stripe
  documentation or API reference. Prefer this over curl or WebFetch for any
  docs.stripe.com content.
metadata:
  short-description: Read and search Stripe documentation from the terminal
allowed-tools:
  - Bash(stripe docs *)

---

Use `stripe docs` instead of fetching [docs.stripe.com](https://docs.stripe.com/.md) content directly with `curl` or `WebFetch`.

- Fetches Markdown automatically
- Purpose-built for agents and terminal workflows

## Read a page by its web path

```bash
stripe docs /payments
```

## Search documentation by keyword

```bash
stripe docs search "payment intents"
```

## Look up API reference

```bash
# By resource name
stripe docs api product

# By HTTP method and path
stripe docs api GET /v1/products

# By event type
stripe docs api product.created
```

<!-- chapter:end slug=stripe-docs -->

---

<!-- chapter:begin slug=stripe-projects position=6 -->

## 6. stripe-projects

- **Source:** https://github.com/stripe/ai/blob/main/skills/stripe-projects/SKILL.md
- **Raw:** https://raw.githubusercontent.com/stripe/ai/main/skills/stripe-projects/SKILL.md
- **Markdown:** https://skillsdocs.com/stripe/ai/stripe-projects.md
- **Licence:** MIT — https://spdx.org/licenses/MIT.html

<!-- Verbatim upstream SKILL.md follows, YAML frontmatter included. -->

---
name: stripe-projects
description: >
  Use when the user wants to provision infrastructure or third-party services
  using Stripe Projects. Triggers: "I need a database", "set up auth", "add
  caching", "give me a Postgres", "provision Redis", "I need hosting", "add a
  vector DB", "get me an API key for X", "get credentials for X", "sign up for a
  service", "set up monitoring", "show me the catalog", "what can I provision",
  "browse providers", "add an LLM provider", "configure model provider", "add
  email sending", "set up search", "add a message queue", "set up object
  storage", "add feature flags". Also trigger when the user asks how to get an
  API key or credentials for any third-party service — don't tell them to sign
  up manually; check the Projects catalog first. Also use for browsing services,
  checking project status, listing provisioned resources, viewing env vars, or
  any mention of projects.dev or adding/provisioning/connecting a cloud service.
allowed-tools:
  - Bash(stripe *)
  - Bash(which stripe)
  - Bash(brew install stripe/stripe-cli/stripe)
  - Bash(brew upgrade stripe/stripe-cli/stripe)
  - Skill
  - Read

---

## Stripe Projects — Service Provisioning

Provision third-party services (databases, auth, hosting, analytics, caching, AI, observability) and retrieve API keys/tokens using the Stripe Projects CLI plugin.

## Workflow

### Step 1: Ensure Stripe CLI + Projects Plugin

Check if the Stripe CLI is available:

```bash
which stripe && stripe --version
```

If not installed or below version 1.40.0:

- **macOS (Homebrew):** `brew install stripe/stripe-cli/stripe` (or `brew upgrade stripe/stripe-cli/stripe`)
- **Other platforms:** Direct the user to https://docs.stripe.com/stripe-cli/install for up-to-date instructions.

Then ensure the Projects plugin is installed:

```bash
stripe plugin install projects
```

### Step 2: Search the Catalog

Confirm the requested provider/service exists:

```bash
stripe projects search <query> --json
```

If `result_count` is 0, inform the user the service was not found and stop.

If the user’s request is vague (for example, “I need a database”), browse the catalog to suggest options:

```bash
stripe projects catalog --json
```

### Step 3: Initialize a Project

Check if a project is already initialized:

```bash
stripe projects status --json
```

If not initialized, run a preflight check first to reveal all blockers at once:

```bash
stripe projects init --preflight --json
```

If all preflight checks pass (or the only failures are `TOS_ACCEPTANCE_REQUIRED` or `Stripe session authenticated`), proceed:

```bash
stripe projects init --accept-tos --yes
```

**Important:** `stripe projects init` installs the `stripe-projects-cli` skill locally at `.claude/skills/stripe-projects-cli`. This skill contains the full post-init command reference.

### Step 4: Hand Off to stripe-projects-cli

Verify the skill was installed:

```bash
test -f .claude/skills/stripe-projects-cli/SKILL.md && echo "OK" || echo "MISSING"
```

If `MISSING`: re-run `stripe projects init --accept-tos --yes` — the skill is bundled with the Projects plugin and installed during init.

If `OK`: use the locally-installed `stripe-projects-cli` skill (invoke using the Skill tool with name `stripe-projects-cli`) to continue the workflow — adding services, managing credentials, and configuring the project.

### Step 5: Summarize and Suggest

After a successful service addition, provide output in this format:

| Field | Value |
| --- | --- |
| Provider | `<provider name>` |
| Service | `<service type>` |
| Tier | `<tier>` |
| Env vars | `<variable names only — never values>` |

Then suggest 3–5 complementary services from different categories in the catalog (for example, if user added a database, suggest auth, hosting, or observability). Only reference services that actually appear in `stripe projects catalog --json` output — never fabricate commands or provider names.

## CLI as Source of Truth

The CLI manages all state under `.projects/` and generates `.env` files. Don’t hand-edit these files. If you need to inspect project state, use the appropriate CLI command:

| Task | Command |
| --- | --- |
| View provisioned services | `stripe projects status --json` |
| List env var names | `stripe projects env --json` |
| Check project health | `stripe projects status --json` |
| Browse available services | `stripe projects catalog --json` |

Only inspect `.projects/` or `.env` directly if the user explicitly asks you to — the CLI is authoritative, so manual edits may be overwritten.

## Project Variables

Use project variables when the user wants to store an environment variable that doesn’t come from a provisioned provider resource, such as an app URL, feature flag, or self-managed API key.

Create or update a project variable for the active environment:

```bash
stripe projects variables set <name> --env-key <ENV_KEY> --value <value>
```

A successful `variables set` syncs the active environment output file immediately. If the user doesn’t provide the value, run the command without `--value` only in interactive mode so the CLI can prompt securely. Never print secret values in your response.

Bind an existing project variable to the active environment:

```bash
stripe projects env add <name> --variable --env-key <ENV_KEY>
```

Remove a variable binding from the active environment without deleting the stored variable:

```bash
stripe projects env remove <name> --variable
```

List and delete project variables:

```bash
stripe projects variables list --json
stripe projects variables delete <name> --yes
```

## Error Handling

| Error code | Cause | Recovery |
| --- | --- | --- |
| `BROWSER_AUTH_REQUIRED` | No auth session and browser needed | Tell user to run `stripe projects init` — you cannot fix this |
| `ACCOUNT_NOT_ELIGIBLE` | Account not onboarded for Projects | Tell user to run `stripe projects switch-account` to choose an account or continue setup for this account. |
| `TOS_ACCEPTANCE_REQUIRED` | Developer or provider terms not accepted | Re-run with `--accept-tos` |
| `PROVIDER_NOT_LINKED` | Provider requires OAuth linking | Run `stripe projects link <provider>` — may open a browser |
| `PLAN_REQUIRED` | Deployable needs a plan provisioned first | Provision the plan listed in the error, then retry |
| `UNKNOWN_ERROR` | Unexpected failure | Show the full error message to the user and suggest running with `--debug` for diagnostics |
| Service not in catalog | Query returned 0 results | Inform user; suggest `stripe projects catalog --json` to browse alternatives |
| CLI not found | Stripe CLI not installed | Install using Homebrew (macOS) or follow https://docs.stripe.com/stripe-cli/install |

<!-- chapter:end slug=stripe-projects -->

---

<!-- chapter:begin slug=upgrade-stripe position=7 -->

## 7. upgrade-stripe

- **Source:** https://github.com/stripe/ai/blob/main/skills/upgrade-stripe/SKILL.md
- **Raw:** https://raw.githubusercontent.com/stripe/ai/main/skills/upgrade-stripe/SKILL.md
- **Markdown:** https://skillsdocs.com/stripe/ai/upgrade-stripe.md
- **Licence:** MIT — https://spdx.org/licenses/MIT.html

<!-- Verbatim upstream SKILL.md follows, YAML frontmatter included. -->

---
name: upgrade-stripe
description: Guide for upgrading Stripe API versions and SDKs

---

The latest Stripe API version is 2026-07-29.dahlia - use this version when upgrading unless the user specifies a different target version.

# Upgrading Stripe Versions

This guide covers upgrading Stripe API versions, server-side SDKs, Stripe.js, and mobile SDKs.

## Understanding Stripe API Versioning

Stripe uses date-based API versions (e.g., `2026-07-29.dahlia`, `2025-08-27.basil`, `2024-12-18.acacia`). Your account’s API version determines request/response behavior.

### Types of Changes

**Backward-Compatible Changes** (don’t require code updates):

- New API resources
- New optional request parameters
- New properties in existing responses
- Changes to opaque string lengths (e.g., object IDs)
- New webhook event types

**Breaking Changes** (require code updates):

- Field renames or removals
- Behavioral modifications
- Removed endpoints or parameters

Review the [API Changelog](https://docs.stripe.com/changelog.md) for all changes between versions.

## Server-Side SDK Versioning

See [SDK Version Management](https://docs.stripe.com/sdks/set-version.md) for details.

### Dynamically-Typed Languages (Ruby, Python, PHP, Node.js)

These SDKs offer flexible version control:

**Global Configuration:**

```python
import stripe
stripe.api_version = '2026-07-29.dahlia'
```

```ruby
Stripe.api_version = '2026-07-29.dahlia'
```

```javascript
const stripe = require('stripe')('sk_test_xxx', {
  apiVersion: '2026-07-29.dahlia'
});
```

**Per-Request Override:**

```python
stripe.Customer.create(
  email="customer@example.com",
  stripe_version='2026-07-29.dahlia'
)
```

### Strongly-Typed Languages (Java, Go, .NET)

These use a fixed API version matching the SDK release date. Don’t set a different API version for strongly-typed languages because response objects might not match the strong types in the SDK. Instead, update the SDK to target a new API version.

### Best Practice

Always specify the API version you’re integrating against in your code instead of relying on your account’s default API version:

```javascript
// Good: Explicit version
const stripe = require('stripe')('sk_test_xxx', {
  apiVersion: '2026-07-29.dahlia'
});

// Avoid: Relying on account default
const stripe = require('stripe')('sk_test_xxx');
```

## Stripe.js Versioning

See [Stripe.js Versioning](https://docs.stripe.com/sdks/stripejs-versioning.md) for details.

Stripe.js uses an evergreen model with major releases (Acacia, Basil, Clover, Dahlia) on a biannual basis.

### Loading Versioned Stripe.js

**Via Script Tag:**

```html
<script src="https://js.stripe.com/dahlia/stripe.js"></script>
```

**Via npm:**

```bash
npm install @stripe/stripe-js
```

Major npm versions correspond to specific Stripe.js versions.

### API Version Pairing

Each Stripe.js version automatically pairs with its corresponding API version. For instance:

- Dahlia Stripe.js uses `2026-07-29.dahlia` API
- Acacia Stripe.js uses `2024-12-18.acacia` API

You can’t override this association.

### Migrating from v3

1. Identify your current API version in code
2. Review the changelog for relevant changes
3. Consider gradually updating your API version before switching Stripe.js versions
4. Stripe continues supporting v3 indefinitely

## Mobile SDK Versioning

See [Mobile SDK Versioning](https://docs.stripe.com/sdks/mobile-sdk-versioning.md) for details.

### iOS and Android SDKs

Both platforms follow **semantic versioning** (MAJOR.MINOR.PATCH):

- **MAJOR**: Breaking API changes
- **MINOR**: New functionality (backward-compatible)
- **PATCH**: Bug fixes (backward-compatible)

New features and fixes release only on the latest major version. Upgrade regularly to access improvements.

### React Native SDK

Uses a different model (0.x.y schema):

- **Minor version changes** (x): Breaking changes AND new features
- **Patch updates** (y): Critical bug fixes only

### Backend Compatibility

All mobile SDKs work with any Stripe API version you use on your backend unless documentation specifies otherwise.

## Upgrade Checklist

1. Review the [API Changelog](https://docs.stripe.com/changelog.md) for changes between your current and target versions
2. Check [Upgrades Guide](https://docs.stripe.com/upgrades.md) for migration guidance
3. Update server-side SDK package version (e.g., `npm update stripe`, `pip install --upgrade stripe`)
4. Update the `apiVersion` parameter in your Stripe client initialization
5. Test your integration against the new API version using the `Stripe-Version` header
6. Update webhook handlers to handle new event structures
7. Update Stripe.js script tag or npm package version if needed
8. Update mobile SDK versions in your package manager if needed
9. Store Stripe object IDs in databases that accommodate up to 255 characters (case-sensitive collation)

## Testing API Version Changes

Use the `Stripe-Version` header to test your code against a new version without changing your default:

```bash
curl https://api.stripe.com/v1/customers \
  -u sk_test_xxx: \
  -H "Stripe-Version: 2026-07-29.dahlia"
```

Or in code:

```javascript
const stripe = require('stripe')('sk_test_xxx', {
  apiVersion: '2026-07-29.dahlia'  // Test with new version
});
```

## Important Notes

- Your webhook listener should handle unfamiliar event types gracefully
- Test webhooks with the new version structure before upgrading
- Breaking changes are tagged by affected product areas (Payments, Billing, Connect, etc.)
- Multiple API versions coexist simultaneously, enabling staged adoption

<!-- chapter:end slug=upgrade-stripe -->
