# /stripe-billing - Stripe Billing & Subscription Setup

> Checkout sessions, customer portal, webhook handlers, and tier feature gating.

Canonical: https://www.agentickit.co/commands/stripe-billing
Last updated: 2026-11-18

Sets up complete Stripe subscription infrastructure: checkout sessions, webhook handlers with signature verification, customer portal, and tier checks.

**Usage:** `Use when adding paid tiers, pricing tables, or subscription billing to your SaaS.`

## Pipeline
1. Configure Stripe SDK and environment secret variables
2. Create checkout session API endpoint with customer metadata
3. Implement idempotent Stripe webhook handler with signature verification
4. Add database subscription status tracking and user tier permission helpers

## Output files
- `src/app/api/webhooks/stripe/route.ts`
- `src/lib/stripe.ts`
- `src/db/schema.ts`

**Claude Code frontmatter:** `argument-hint: [billing model or plan tiers]` · `model: inherit`

## Related
- [integration-engineer](https://www.agentickit.co/agents/integration-engineer)
- [backend-architect](https://www.agentickit.co/agents/backend-architect)
- [stripe-payments](https://www.agentickit.co/skills/stripe-payments)
- [api-patterns](https://www.agentickit.co/skills/api-patterns)
- [saas-patterns](https://www.agentickit.co/skills/saas-patterns)
