xiaohongshu
xiaohongshu
Complete workflow for integrating Stripe payments (subscriptions or one-time) with Convex + Next.js. Includes hosted checkout, webhooks, UI components, and testing. Use when adding payment functionality to a Convex + Next.js app.
Full skill instructions
When user requests Stripe payment integration for Convex + Next.js:
Ask these questions first:
CRITICAL: Gather these FIRST before proceeding - MCP tools require credentials.
Get Stripe API keys from user:
sk_test_ or sk_live_).env.local: STRIPE_SECRET_KEY=sk_test_...Install dependencies: npm install stripe
Set initial environment variables:
STRIPE_SECRET_KEY (from step 1)NEXT_PUBLIC_SITE_URL=http://localhost:3000 (default local development)Use Stripe MCP tool to create product/price and get price ID
Use Convex MCP tool to set remaining environment variables
Manual fallback: Follow resources/environment-setup.md
Complete required env vars:
STRIPE_SECRET_KEY ✓ (set in step 1)STRIPE_PRICE_ID (from Stripe MCP tool)STRIPE_WEBHOOK_SECRET (set during webhook configuration)NEXT_PUBLIC_SITE_URL ✓ (set in step 1)Update convex/schema.ts with Stripe fields. See resources/database-schema.ts for complete schema.
Copy and customize these files:
convex/stripe.ts ← Use resources/convex-stripe-actions.tsconvex/stripeDb.ts ← Use resources/convex-stripe-db.tsconvex/http.ts ← Use resources/convex-webhook-handler.tsKey customizations:
"pro" vs "premium")clerkId vs your auth system)2025-08-27.basilallow_promotion_codes: true in checkout session creationCreate UI components from resources/ui-components.tsx:
UpgradeButton - Shows different states based on membershipManageBillingButton - Opens customer portalUI Design Guidelines:
.convex.site domain)https://your-deployment.convex.site/stripe/webhookcheckout.session.completed, customer.subscription.*, invoice.*Follow resources/testing-checklist.md:
Always:
constructEventAsync in webhooks (not constructEvent)current_period_end with fallbacksallow_promotion_codes: true to enable coupon code input during checkoutNever:
.convex.cloud for webhooks (use .convex.site)Webhook not working: Check domain (.convex.site) and webhook secret
Membership not updating: Verify webhook events and metadata
API errors: Ensure consistent API version usage
Use Stripe MCP tool for latest documentation when:
See resources/ folder for complete code examples and detailed setup instructions.
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience