convex-billing

Integrates Stripe billing into Convex apps using the @convex-dev/stripe component.

1|Updated Oct 10, 2025
One-click install
npx skills add https://github.com/Rocktown-Labs/rivercitymd --skill convex-billing-rocktown-labs
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: convex-billing
Source: https://github.com/Rocktown-Labs/rivercitymd/tree/main/.agents/skills/convex-billing
Command: npx skills add https://github.com/Rocktown-Labs/rivercitymd --skill convex-billing-rocktown-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @convex-dev/stripe.

What problem does it solve? Adding payments and subscriptions to a Convex backend normally requires writing webhook handlers, verifying Stripe signatures, and tracking subscription state manually. This Skill wires Stripe to Convex through the official @convex-dev/stripe component so checkout, webhooks, and subscription gating work with minimal code. ## Core Features & Use Cases - Checkout Sessions: Creates Stripe checkout sessions for subscriptions via a Convex action, with automatic customer creation. - Automatic Webhook Handling: Registers a signature-verified webhook route through the component's registerRoutes, eliminating manual constructEvent logic. - Server-Side Subscription Gating: Provides an isSubscribed query that reads component tables to gate features on active or trialing subscriptions. - Use Case: A SaaS built on Convex needs paid plans. Use this Skill to install the component, register the webhook endpoint, and gate premium queries behind verified subscription state. ## Quick Start Add Stripe subscription billing to my Convex app with a checkout action, webhook endpoint, and a subscription gate query.

Frequently Asked Questions about convex-billing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add Stripe payments to a Convex app?▼

Install the @convex-dev/stripe component, register it in convex/convex.config.ts, and call registerRoutes in convex/http.ts to expose the webhook. Then create a checkout action using StripeSubscriptions to generate subscription checkout sessions.

How do I verify Stripe webhooks in Convex?▼

The @convex-dev/stripe component handles signature verification automatically when you register routes via registerRoutes with your webhook path. You should not write a manual constructEvent webhook; just store STRIPE_WEBHOOK_SECRET in the Convex environment.

How do I gate features behind a Stripe subscription in Convex?▼

Create a query that reads the component's listSubscriptionsByUserId table and returns true when a subscription status is active or trialing. Gate on this server-stored state rather than client-side claims.

Why does convex.config.ts fail when importing the Stripe component?▼

The import must use the .js extension: '@convex-dev/stripe/convex.config.js', not '.ts'. The Convex bundler requires the .js extension for component config imports.

What Stripe webhook events should I subscribe to for Convex billing?▼

Subscribe to checkout.session.completed, customer.subscription.*, invoice.*, and payment_intent.* events. Point the endpoint at https://<deployment>.convex.site/stripe/webhook and copy the signing secret as STRIPE_WEBHOOK_SECRET.