Agent skill
polar
Polar payment platform integration for monetization, subscriptions, and license keys. Use when implementing checkout, managing products, or building customer portals.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/polar
SKILL.md
Polar Integration
Polar is a merchant-of-record platform for digital products, subscriptions, and license keys.
What I Do
- Guide implementation of Polar checkout and payments
- Help with subscription management and billing
- Assist with license key validation
- Set up webhook handlers for payment events
When to Use Me
- Implementing checkout flow for a product
- Adding subscription billing to an app
- Setting up license key validation
- Building a customer portal
- Handling payment webhooks
Quick Start
npm install @polar-sh/sdk
import { Polar } from "@polar-sh/sdk";
const polar = new Polar({
accessToken: process.env.POLAR_ACCESS_TOKEN!,
server: "production", // or "sandbox"
});
Key APIs
| API | Purpose |
|---|---|
polar.products.* |
Create/manage products and prices |
polar.checkouts.* |
Create checkout sessions |
polar.subscriptions.* |
Manage subscriptions |
polar.orders.* |
View order history |
polar.customers.* |
Customer management |
polar.licenseKeys.* |
Issue and validate licenses |
Environment Variables
| Variable | Description |
|---|---|
POLAR_ACCESS_TOKEN |
Organization Access Token (OAT) |
POLAR_WEBHOOK_SECRET |
Webhook signing secret |
Common Patterns
Create Checkout
const checkout = await polar.checkouts.create({
productId: "prod_xxx",
successUrl: "https://myapp.com/success",
});
// Redirect to checkout.url
Validate License Key
const result = await polar.licenseKeys.validate({
key: "XXXX-XXXX-XXXX-XXXX",
organizationId: "org_xxx",
});
Handle Webhook
import { validateEvent } from "@polar-sh/sdk/webhooks";
const event = validateEvent(body, signature, process.env.POLAR_WEBHOOK_SECRET!);
// event.type: "subscription.created", "order.created", etc.
Links
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?