Skip to content
Back to skills

Polar Knowledge Patch

ASecurity

Polar

  • 25 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 5, 2026
developmenttypescriptpythonapi

Works with

  • cursor
  • cli
  • api
  • mcp

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 7 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add Nevaberry/nevaberry-plugins --skill polar-knowledge-patch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Polar Knowledge Patch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Polar Knowledge Patch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nevaberry-polar-knowledge-patch/badge)](https://www.skillsdirectory.com/skills/nevaberry-polar-knowledge-patch)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: polar-knowledge-patch
description: Polar
version: null
license: MIT
metadata:
  author: Nevaberry
---


# Polar

Load this skill when working with Polar SDKs, API access, checkout,
subscriptions, customer entitlements, usage metering, or billing integrations.

## Reference index

| Reference | Topics |
| --- | --- |
| [SDK and API access](references/sdk-and-api-access.md) | Preview SDK installation, sandbox, portal authentication, pagination, quotas, OAuth2, MCP, agent account handoff |
| [Products and checkout](references/products-and-checkout.md) | Product variants, currencies, price overrides, tax, payment methods, embedding, return URLs, discounts, trial controls, WebMCP |
| [Customers and subscriptions](references/customers-and-subscriptions.md) | External IDs, Customer State, billing intervals, subscription changes, pauses, members, ownership, seats, portal self-service |
| [Benefits, events, and meters](references/benefits-events-and-meters.md) | Feature Flags, license keys, revocation, event ingestion, member usage, costs, system events, meter lifecycle |
| [Billing and integrations](references/billing-and-integrations.md) | Webhooks, metrics, balances, invoices, SSO, customer emails, DNS validation, payouts, Zapier, Stripe migration |

## Breaking changes and deprecations

### Checkout product selection

Offer monthly and yearly plans as separate products with their own prices
and benefits. Create a Checkout Session with both product IDs so buyers can
choose one:

```json
{"products":["<monthly-product-id>","<yearly-product-id>"]}
```

This replaces the deprecated `product_id` and `product_price_id` fields.
Existing products with mixed intervals still work, but pricing edits show a
warning. Read `recurring_interval` from `Product`; `ProductPrice.type` and
`ProductPrice.recurring_interval` are deprecated.

### Metrics selection

Use the `metrics` query parameter to select which metrics to compute.
The deprecated `focus_metrics` parameter was removed.
Order-based metrics include paid and refunded orders; cumulative revenue
includes history before the requested date range.

### Embedding and SSO requirements

Configure checkout hosts in **Settings → Preferences → Embedding**.
The first entry restricts embedding to listed hosts. Organizations created
on or after August 4, 2026 need an allowlist before they can embed.

SSO setup requires a verified domain. Add a domain you own in
**Settings → Domains** and verify it with a DNS TXT record.
Organization SSO is available on the Scale plan under **Settings → SSO**.

### License expiration and webhook health

License-key activation enforces `expires_at`.
Webhook endpoints are disabled after 10 consecutive failures by default;
organization members receive email when that happens. Resolve delivery
issues and manually re-enable the endpoint in the dashboard.
Events skipped while disabled do not count as failures.
For source-IP restrictions, account for the ranges added October 27, 2025;
see the [webhook IP allowlist](https://polar.sh/docs/integrate/webhooks/delivery#ip-allowlist).

## SDK and API essentials

### Preview clients and sandbox

The `2026-04` SDKs require an explicit prerelease install:

```sh
npm install @polar-sh/sdk@next
pip install --pre polar-sdk
# With uv: uv add polar-sdk --prerelease allow
```

Clients default to production. Set `environment` to `"sandbox"` and use a
token issued in the sandbox, which has its own users, organizations, and data.
See [SDK and API access](references/sdk-and-api-access.md) for the versioned
TypeScript and Python imports and external-customer state examples.

### Portal authentication and list responses

Keep the organization access token on the server. Create a Customer Session
through `POST /v1/customer-sessions/`, then use the returned customer access
token as a bearer token for the signed-in customer's own data.

List endpoints use one-based `page`; `limit` defaults to 10 and caps at 100.
Read `items` and advance through `pagination.max_page`.
`pagination.total_count` counts all matches for the query.

### Request quotas

Production allows 500 requests/minute and sandbox allows 100 requests/minute
per organization, customer, or OAuth2 client. Unauthenticated license-key
validation, activation, and deactivation are limited to 3 requests/second
in both environments. On HTTP 429, use `Retry-After` to time the retry.

## Checkout configuration

### Currencies, prices, and tax

Add multiple currencies to one product; checkout selects the currency by
the buyer's region. Set the organization's default presentment currency
for the dashboard. Fixed-amount discounts can carry amounts per currency.

A Checkout Session can override a catalog price for an individual purchase
through the API or SDK, using fixed, free, or custom prices.
Use the organization's default tax behavior for tax-inclusive prices.
Free and other zero-amount orders bypass tax calculation.

### Return paths and attribution

Set `return_url` on a Checkout Session or Customer Session to give buyers
a way back to your app. Static checkout links also support a custom return
URL in the dashboard. Checkout-link query parameters `reference_id`,
`utm_source`, `utm_medium`, `utm_campaign`, `utm_content`, and `utm_term`
are stored in checkout metadata.

### Discount limits and trial controls

Set `max_redemptions_per_customer` when creating or updating a discount.
A matching customer ID, payment card, or email after stripping plus aliases
counts as the same buyer.

Enable **Prevent trial abuse** in **Settings → Subscription** to match repeat
trials by plus-normalized email or payment-method fingerprint. Blocked buyers
can still subscribe at the regular price. Pass `{"allow_trial":false}` when
creating a Checkout Session to disable its trial.

## Customer identity and subscription changes

### External identity and entitlements

Use `external_id` for your account ID and the dedicated external-ID operations
for `GET`, `PATCH`, and `DELETE`. List Customers also matches it in `query`.
Set `external_customer_id` on a Checkout Session to assign it to the newly
created customer after a successful checkout.

Customer State combines active subscriptions and granted benefits and is
also available as a webhook. It includes trialing subscriptions, so an
entitlement check based on Customer State must account for the trial period.

### Pricing and billing periods

Subscription products can bill daily, weekly, monthly, or yearly; set the
interval count in the dashboard or API for periods such as every two weeks.
The subscription creation endpoint provisions a subscription without checkout.
An existing subscription's discount can be added, replaced, or removed in
the dashboard or through Update Subscription.

Update a subscription to its existing product to move archived pricing to
current pricing. The dashboard calls this **Upgrade pricing**, and proration
uses the active subscription prices.
The API can change the current billing period's end date and computes the
resulting proration automatically. Make the change before cancellation.

Use `next_period` proration behavior to defer product swaps, price updates,
or seat-count changes to the next billing cycle. Pending changes appear on
subscription objects and webhooks, in the dashboard, and in the portal.

### Pauses and resumes

Use Update Subscription to schedule a pause at period end, optionally with
an automatic resume date. At the pause, billing stops and benefits are revoked;
the payment method stays on file. Resuming starts a new billing period and
charges immediately. Enable **Enable subscription pause** under
**Settings → Customer portal** for self-service and handle
`subscription.paused` and `subscription.resumed` to track transitions.

### Members and seats

Customer creation automatically creates the owner member. Member sessions
use the `polar_mst_` prefix and preserve member identity and permissions.
Owners and billing managers can manage the team; benefit grants can target
individual members.

Seat-based pricing supports subscriptions and one-time purchases. Assign
seats through the API, use zero-priced tiers where needed, and set checkout
bounds with fields such as `{"min_seats":3,"max_seats":20}`.
Customers can adjust subscription seat counts in the portal with automatic
proration.

## Benefits and usage

Feature Flag benefits represent application entitlements; read their grants
from the API or webhooks. Their JSON metadata is private to the integration.
After failed payment, benefits are revoked immediately by default; a
configurable grace period can keep ordinary and seat benefits active through
the payment retry window.

Use `parent_id` for event hierarchy and `external_id` for ingestion idempotency.
Send `member_id` or `external_member_id` for member-level usage attribution;
ingestion validates the member. Events can carry sub-cent costs, and the
variance API surfaces cost spikes or drops on individual events.

Set a meter's display unit and value multiplier to price raw usage in billing
units. Use `timezone` on the meter quantities endpoint to group by local date.
Granting credits creates a customer meter when needed. Archive a meter once
active products and benefits no longer reference it.

## Agent integrations

Use the official ChatGPT plugin or connect the MCP server through an
MCP-capable client such as Cursor or OpenCode. It supports account setup,
pricing, meters, credits, and customer support.
An agent can create an account and obtain API access before you sign up;
use its claim code to take over the account, after which it can continue
working on your behalf.

In a WebMCP-capable browser, agents can read the order, fill in customer
details, apply a discount, change the seat count, and submit hosted checkout.
Agents can also pay on the buyer's behalf with Agentcard.

Files in this skill

  • SKILL.md7.2 KB
  • coverage.json342 B
  • references/benefits-events-and-meters.md1.5 KB
  • references/billing-and-integrations.md1.8 KB
  • references/customers-and-subscriptions.md1.9 KB
  • references/products-and-checkout.md2.4 KB
  • references/sdk-and-api-access.md1.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.