src/orchestrator/plugins/stripe/SKILL.md
Stripe payment integration patterns, Checkout Sessions, billing/subscriptions, Connect platforms, and API best practices. Use when building, modifying, or reviewing any Stripe integration — including accepting payments, building marketplaces, setting up subscriptions, or implementing secure key handling.
npx skillsauth add monkilabs/opencastle stripe-paymentsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Latest Stripe API version: 2026-03-25.dahlia. Always use the latest API version and SDK unless the user specifies otherwise.
| Building… | Recommended API | Reference |
|---|---|---|
| One-time payments | Checkout Sessions | references/api-patterns.md — Payments |
| Custom payment form with embedded UI | Checkout Sessions + Payment Element | references/api-patterns.md — Payments |
| Saving a payment method for later | Setup Intents | references/api-patterns.md — Payments |
| Connect platform or marketplace | Accounts v2 (/v2/core/accounts) | references/api-patterns.md — Connect |
| Subscriptions or recurring billing | Billing APIs + Checkout Sessions | references/api-patterns.md — Billing |
| Embedded financial accounts / banking | v2 Financial Accounts | references/api-patterns.md — Treasury |
| Security (key management, RAKs, webhooks, OAuth, 2FA, Connect liability) | See security reference | references/api-patterns.md — Security |
Read the relevant reference section before answering any integration question or writing code.
API Selection
checkout.sessions.create) for on-session payments — supports one-time payments and subscriptionsIntegration Surfaces (in order of preference)
ui_mode: 'custom' over raw PaymentIntents when possibleAPI Keys & Security
rk_) instead of secret keys (prefix sk_) wherever possible — follow least privilegestate parameter in Connect OAuth flowsConnect Platforms
POST /v2/core/accounts)type parameter (type: 'express', type: 'custom', type: 'standard') for new platformscontroller properties instead of legacy account typesBilling
plan object — use Prices insteadimport Stripe from 'stripe';
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!, {
apiVersion: '2026-03-25.dahlia',
});
const session = await stripe.checkout.sessions.create({
mode: 'payment', // For subscriptions, change to 'subscription' and use a recurring price
line_items: [{
price: 'price_xxx',
quantity: 1,
}],
success_url: 'https://example.com/success?session_id={CHECKOUT_SESSION_ID}',
cancel_url: 'https://example.com/cancel',
});
import Stripe from 'stripe';
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!, {
apiVersion: '2026-03-25.dahlia',
});
export async function POST(request: Request) {
const body = await request.text();
const signature = request.headers.get('stripe-signature');
if (!signature || !process.env.STRIPE_WEBHOOK_SECRET) {
return new Response('Missing signature', { status: 400 });
}
try {
const event = stripe.webhooks.constructEvent(
body,
signature,
process.env.STRIPE_WEBHOOK_SECRET
);
switch (event.type) {
case 'checkout.session.completed':
// Handle successful checkout
break;
case 'invoice.paid':
// Handle successful invoice payment
break;
case 'customer.subscription.deleted':
// Handle subscription cancellation
break;
}
return new Response('OK', { status: 200 });
} catch (err) {
console.error('Webhook verification failed', (err as Error).message);
return new Response('Invalid signature', { status: 400 });
}
}
references/api-patterns.md — Payments, Billing, Connect, Treasury, and Security patternsreferences/upgrade-guide.md — Upgrading Stripe API versions and SDKsreferences/projects-setup.md — Setting up Stripe Projects CLInpm install stripe @stripe/stripe-jscheckout.session.completed to fulfill the orderstripe listen --forward-to localhost:3000/api/webhooks
STRIPE_WEBHOOK_SECRET matches your endpoint's signing secret → restart stripe listen → retry the eventdevelopment
Defines 10 sequential validation gates: secret scanning, lint/test/build checks, blast radius analysis, dependency auditing, browser testing, cache management, regression checks, smoke tests. Use when running pre-deploy validation or CI checks, CI/CD pipelines, deployment pipeline validation, pre-merge checks, continuous integration, or pull request validation.
development
Generates test plans, writes unit/integration/E2E test files, identifies coverage gaps, flags common testing anti-patterns. Use when writing tests, creating test suites, planning test strategies, mocking dependencies, measuring code coverage, or test planning.
development
Provides model routing rules, validates delegation prerequisites, supplies cost tracking templates, defines dead-letter queue formats for Team Lead orchestration. Load when assigning tasks to agents, choosing model tiers, starting delegation session, running multi-agent workflow, delegating work, choosing which model to use, or assigning tasks.
testing
Saves, restores session state including task progress, file changes, delegation history. Use when saving progress, resuming interrupted work, picking up where you left off, or checkpointing current work.