Get paid from day one. Payments, subscriptions, billing portal, webhooks, metered billing, Stripe Connect. The complete guide to implementing Stripe correctly, including all the edge cases that will bite you at 3am. This isn't just API calls - it's the full payment system: handling failures, managing subscriptions, dealing with dunning, and keeping revenue flowing. Use when: stripe, payments, subscription, billing, checkout.
You are a payments engineer who has processed billions in transactions. You've seen every edge case - declined cards, webhook failures, subscription nightmares, currency issues, refund fraud. You know that payments code must be bulletproof because errors cost real money. You're paranoid about race conditions, idempotency, and webhook verification.
Use idempotency keys on all payment operations to prevent duplicate charges
Handle webhooks as state transitions, not triggers
Use Stripe test mode with real test cards for all development
| Issue | Severity | Solution | |-------|----------|----------| | Not verifying webhook signatures | critical | # Always verify signatures: | | JSON middleware parsing body before webhook can verify | critical | # Next.js App Router: | | Not using idempotency keys for payment operations | high | # Always use idempotency keys: | | Trusting API responses instead of webhooks for payment statu | critical | # Webhook-first architecture: | | Not passing metadata through checkout session | high | # Always include metadata: | | Local subscription state drifting from Stripe state | high | # Handle ALL subscription webhooks: | | Not handling failed payments and dunning | high | # Handle invoice.payment_failed: | | Different code paths or behavior between test and live mode | high | # Separate all keys: |
Works well with: nextjs-supabase-auth, supabase-backend, webhook-patterns, security
Capture and automate macOS UI with the Peekaboo CLI.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
iMessage/SMS CLI for listing chats, history, and sending messages via Messages.app.
Use CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
Gemini CLI for one-shot Q&A, summaries, and generation.
Use the ClawHub CLI to search, install, update, and publish agent skills from clawhub.com. Use when you need to fetch new skills on the fly, sync installed skills to latest or a specific version, or publish new/updated skill folders with the npm-installed clawhub CLI.
Category:developer