agentsclimarketplace

010113 polar integration

Skill natuleadan/skills/skills/010113-polar-integration

Multi-domain agent skills collection for AI coding agents (Claude, Cursor, Copilot, OpenCode, and more). Covers programming, biology, cooking, and future domains. Installable via npx skills add.

Install
npx -y skills add natuleadan/skills --skill 010113-polar-integration

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Polar.sh payment integration — product sync, checkout, webhooks, multi-currency, MoR model, sandbox testing, and API reference.

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

2.3 KB, as published. Nobody here has run it

Polar.sh Payment Integration

Overview

Polar.sh is a Merchant of Record (MoR) platform that handles payment processing, tax collection, and billing. This skill covers the full integration flow: product synchronization, checkout sessions, webhook handling, database schema, and sandbox testing.

Architecture

Products DB → Sync Service → Polar API (Products/Variants/Prices)
                                       ↓
Client → Checkout Session → Polar Hosted Flow → Order Created
                                       ↓
Polar → Webhook → Application → Update Payment Status → Fulfillment

Quick Reference

Environment Variables

  • POLAR_ACCESS_TOKEN — Server-side API token (format: polar_oat_*)
  • POLAR_WEBHOOK_SECRET — Webhook signature verification
  • NEXT_PUBLIC_POLAR_SANDBOX — Toggle sandbox/production (true or omitted)

Core Flows

  1. Sync products to Polar before checkout — each product+variant+currency becomes a Polar product
  2. Create checkout session with line items and metadata — Polar handles the hosted payment UI
  3. Handle webhooks for order lifecycle events (order.paid, checkout.expired, etc.)
  4. Verify signatures using Standard Webhooks spec — @polar-sh/nextjs handles this automatically

Supported Countries

Polar supports 50+ countries including US, EU, UK, Canada, Australia, Brazil, Mexico, Colombia, Peru, Chile, and others. See Payment Flow for MoR model details.

References

  • Payment Flow — Product sync, checkout, multi-currency, error handling, MoR model, localization
  • Webhooks & Schema — Webhook events, DB schema, repository patterns, signature verification
  • API Reference — Polar REST API essentials (auth, products, checkout, orders)
  • Sandbox & Setup — Sandbox environment, API keys, webhook configuration
  • Code Examples — Sync, checkout, webhook, cancel, raw API calls

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.