stripe-checkout
Made by JeffIntegrate Stripe and PayPal subscriptions for SaaS apps. Use when implementing payment checkout, recurring billing, subscription management, or webhook handling for Next.js with Rust CLI companions.
From Jeffrey's Skills.md: professionally crafted skills for any AI agent, installed and kept in sync by the jsm CLI. Subscription only, $20/month.
Works With
Quality and Utility come from canonical skill metadata. Community ratings appear separately as stars when subscriber reviews exist.
Subscribe to download
Public previews are available, but downloads, CLI sync, and premium content require an active subscription.
Sign In to Subscribe- Full skill content with deterministic versioning
- CLI sync + local search index
- Access to Jeffrey’s premium library
Save to your account
Saved skills live in your cloud list. Run jsm sync on each machine to pull them locally.
What's New with this Skill
1Updates, enhancements, and release notes for this skill.
New: Stripe + PayPal Checkout, one subscriptions table is the source of truth and both providers webhook into it
The database is the single source of truth; both providers sync into one subscriptions table via webhooks. Stripe Checkout for cards + Apple/Google Pay; PayPal for wallet buyers; for both, either let Stripe handle PayPal or run separate integrations. Six phases (Provider Setup → DB → Checkout → Webhooks → Access Control → Dunning) cover the full surface, including a Rust CLI companion that checks subscription status with short-lived tokens.
- One subscriptions(user_id, provider, status, current_period_end) table for both providers. Stripe and PayPal webhooks both write to it; web RLS and the Rust CLI both read from it
- Decision tree by integration shape: cards + Apple/Google Pay → Stripe Checkout; PayPal wallet only → PayPal Subscriptions; both → Stripe-handles-PayPal (single integration) OR separate integrations (more control)
- Six-phase build: Provider Setup → DB schema + RLS → Checkout flow → Webhooks → Access Control → Dunning, each with its own checklist
- Webhook hardening: signature verification before processing and idempotent event handling. stripe listen --forward-to localhost:3000/api/webhooks/stripe for local dev
- Critical events named per provider: Stripe checkout.session.completed, invoice.payment_failed, customer.subscription.deleted; PayPal ACTIVATED, SUSPENDED, CANCELLED. Asymmetric statuses (Stripe unpaid = PayPal SUSPENDED = internal suspended) fold into one mapping
- Rust CLI auth pattern: short-lived JWT (1h TTL) plus a DB subscription check. API keys are revoked when the subscription expires
- Security floor: never store raw card numbers (hosted checkout only), always verify webhook signatures, HTTPS everywhere, idempotent webhook processing, revoke API keys on subscription expiry
- Dunning covered for both providers: Stripe Smart Retries and the Customer Portal for payment-method updates, PayPal payment_failure_threshold, grace periods and email notifications
The kernel insight: the database is the single source of truth for subscription state. Stripe and PayPal both write into one subscriptions(user_id, provider, status, current_period_end) table via webhooks. Web access control reads RLS policies; Rust CLI access uses short-lived JWTs (1-hour TTL) backed by DB subscription checks. Webhooks are signature-verified before processing and idempotent on event ID.