polar-sh-nextjs-convex

Integrate Polar.sh billing with Next.js App Router and Convex entitlements.

2|Updated Feb 6, 2026
One-click install
npx skills add https://github.com/Flohhhhh/skills --skill polar-sh-nextjs-convex
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: polar-sh-nextjs-convex
Source: https://github.com/Flohhhhh/skills/tree/main/polar-nextjs-convex
Command: npx skills add https://github.com/Flohhhhh/skills --skill polar-sh-nextjs-convex

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Minimal Polar.sh billing integration for Next.js App Router with Convex as the entitlement authority. Use when implementing subscriptions, one-time purchases, checkout, customer portal, webhooks, and billing-to-entitlement sync in a webhook-driven architecture.

Core Features & Use Cases

  • Checkout route
  • Customer portal route
  • Webhook ingestion route
  • Convex mutations for billing sync
  • A consistent entitlement source for app authorization

Quick Start

Install dependencies with pnpm add @polar-sh/sdk @polar-sh/nextjs.

Frequently Asked Questions about polar-sh-nextjs-convex

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

FAQPage Schema
How do I integrate Polar.sh billing with Next.js and Convex?

To integrate Polar.sh billing, scaffold checkout and customer portal routes in Next.js App Router, then use Convex mutations to sync webhook events into entitlements. Install the Polar SDK and configure environment variables for the webhook handler.

How do Polar webhooks sync with Convex entitlements?

Polar webhooks sync with Convex by sending billing events to a Next.js webhook ingestion route, which then triggers Convex mutations. This webhook-driven architecture updates Convex entitlements for app authorization based on subscription and purchase data.

Can I handle both subscriptions and one-time purchases using Polar in Next.js?

Yes, Polar handles both subscriptions and one-time purchases in Next.js. The integration provides checkout routes for both purchase types and syncs the billing data to Convex to maintain a consistent entitlement source for authorization.

What is the best way to manage customer billing portals in a Convex Next.js app?

The best way to manage customer billing portals is scaffolding a dedicated Next.js App Router portal route using the Polar SDK. This lets users manage their subscriptions while Convex stays synced as the entitlement authority via webhooks.

Do I need a webhook handler to keep Convex entitlements updated with Polar billing?

Yes, a webhook ingestion route is required to keep Convex entitlements updated. The webhook handler receives Polar billing events and executes Convex mutations to sync subscription and purchase state for app authorization.

What packages are required to set up Polar checkout in a Next.js App Router project?

You need to install the @polar-sh/sdk and @polar-sh/nextjs packages using pnpm. These dependencies provide the tools to scaffold checkout routes and configure the Polar billing integration within your Next.js project.