stripe_skill
- Python
1
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill velcrafting/codex-skills --skill stripe- SKILL.md12.8 KB
Overview
This skill provides practical, production-ready guidance for integrating Stripe payments, subscriptions, webhooks, and billing analytics. It covers secure key usage, Checkout and Payment Intents patterns, webhook verification, Supabase synchronization options, and mobile/Next.js examples. Use it to implement subscriptions, metered billing, customer portals, and reliable webhook processing.
How this skill works
The skill inspects user intent for payment and billing tasks and returns targeted implementation patterns: secure API key handling, Checkout session or Payment Intent flows, webhook handlers with signature verification and idempotency, and Supabase sync patterns (Stripe Sync Engine or webhook-based). It includes code snippets for Next.js, server, client, and common mobile platforms, plus a decision tree for billing models and testing steps.
When to use it
- Setting up Stripe keys and environment variables
- Adding checkout or subscription flows (Checkout Sessions or Payment Intents)
- Implementing webhooks with signature verification and idempotency
- Syncing Stripe data to Supabase or building MRR/revenue analytics
- Implementing metered, per-seat, tiered, or hybrid billing models
- Creating a customer portal or billing management UX
Best practices
- Never expose secret keys in client code; use environment variables and publishable keys on the client
- Always verify webhook signatures using raw request body and implement idempotency
- Prefer Stripe Checkout for simple subscriptions, Payment Intents for custom flows
- Use restricted keys for limited backend operations and rotate keys when compromised
- Use Stripe Sync Engine for zero-maintenance Supabase sync unless you need custom schemas
- Test webhooks locally with stripe CLI and use test card numbers for flows
Example use cases
- Create a subscription checkout using Checkout Sessions and store customer IDs in Supabase
- Implement per-seat billing by passing quantity on subscription line items
- Build usage-based billing with metered prices and report usage to Stripe
- Handle webhook events (checkout.session.completed, invoice.paid, subscription updates) with signature verification and idempotency
- Expose a customer portal session for billing management and redirect back to your app
- Sync Stripe objects into Supabase for real-time admin queries and MRR analytics
FAQ
Use Stripe Checkout for simple, secure subscription purchase flows with minimal code. Use Payment Intents when you need custom UI or complex payment flows.
How do I secure webhooks?
Verify the stripe-signature header against the raw request body using your webhook secret, implement idempotency to ignore repeated events, and return 200 quickly while processing asynchronously.