polar-integration

Integrate Polar billing endpoints into JavaScript and TypeScript applications.

255|42|Updated Nov 16, 2023
One-click install
npx skills add https://github.com/chmonitor/chmonitor --skill polar-integration
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: polar-integration
Source: https://github.com/chmonitor/chmonitor/tree/main/.agents/skills/polar-integration
Command: npx skills add https://github.com/chmonitor/chmonitor --skill polar-integration

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the friction of adding Polar billing functionality to JavaScript and TypeScript applications across any web framework, removing the need to use deprecated framework-specific Polar SDK packages and providing unified, framework-agnostic implementation recipes for all core Polar endpoints.

Core Features & Use Cases

  • Three Core Polar Endpoints: Provides complete, production-ready implementation recipes for Polar Checkout, Customer Portal, and Webhooks endpoints.
  • Framework-Agnostic Guidance: Includes idiomatic code adjustments for all major frameworks and runtimes including Next.js, Express, Hono, Astro, SvelteKit, Remix, TanStack Start, Nuxt, Fastify, Elysia, Deno, Supabase Edge Functions, Cloudflare Workers, and Bun.
  • Use Case: A SaaS developer building a SvelteKit app can copy the canonical Checkout endpoint recipe, add their Polar product IDs, and have a working hosted checkout flow in minutes without researching framework-specific SDK quirks or deprecated packages.

Quick Start

Use the polar-integration skill to add a working Polar Checkout endpoint to your existing Express API that redirects authenticated users to a hosted Polar checkout page for your specified products.

Frequently Asked Questions about polar-integration

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

FAQPage Schema
How do I integrate Polar billing into a JavaScript or TypeScript application?

Polar billing integration uses the official @polar-sh/sdk to implement checkout sessions, customer portal access, and webhook event handling via framework-agnostic Web Standards recipes. The Skill provides production-ready endpoints for all major JavaScript and TypeScript frameworks.

Can I use the Polar SDK with Cloudflare Workers, Hono, or Bun?

Yes, Polar integration supports Cloudflare Workers, Hono, and Bun, along with Next.js, Express, Deno, Astro, SvelteKit, and other runtimes through framework-agnostic Web Standards implementation recipes.

What is the best way to handle Polar webhooks in an Express or Next.js API?

The best way to handle Polar webhooks is using the official @polar-sh/sdk to validate and process events through production-ready, framework-agnostic endpoint recipes included in the Skill. This avoids deprecated framework-specific packages and ensures secure implementation.

Do I need deprecated framework-specific Polar packages to add a checkout flow?

No, you do not need deprecated framework-specific packages to add a Polar checkout flow. The Skill provides canonical recipes using the official @polar-sh/sdk to create hosted checkout pages across any JavaScript or TypeScript framework.

How do I create a Polar hosted checkout session for a SvelteKit app?

To create a Polar hosted checkout session in SvelteKit, copy the canonical Checkout endpoint recipe, add your Polar product IDs, and redirect authenticated users to the hosted Polar checkout page. This framework-agnostic approach works without SDK quirks.