Polar Knowledge Patch
Use this skill for Polar SDK, Core API, Customer Portal, checkout, billing, subscription, benefit, event, meter, webhook, metrics, and integration work. Start with the breaking and deprecated behavior below, then open the reference file that matches the task.
Reference index
| Reference | Topics | | --- | --- | | Clients, authentication, and operations | Preview SDKs, environments, API and Customer Portal authentication, pagination, rate limits, webhooks, OAuth2, SSO, and integrations | | Catalog, pricing, and checkout | Product variants, recurrence, prices, payment methods, checkout controls, embedding, discounts, and trials | | Customers, billing, and self-service | External IDs, Customer State, credit balances, invoice numbering, portal email, data export, and email behavior | | Subscriptions, members, and benefits | Subscription mutation, scheduled updates, pause and resume, B2B members, seats, benefits, and license keys | | Events, meters, and metrics | Event hierarchy and idempotency, event types, meter units and time zones, and Metrics API semantics |
Breaking and deprecated behavior
Product recurrence and checkout selection
- A product can no longer combine monthly and yearly pricing. Existing combinations continue to work.
- Represent variants as separate products and offer those products together in a checkout.
- Use
productsinstead of the deprecated checkout fieldsproduct_idandproduct_price_id. ProductPrice.typeandProductPrice.recurring_intervalare deprecated. Set recurrence onProduct.
See Catalog, pricing, and checkout.
Metrics query selection
- Select requested values with the
metricsquery parameter. - The deprecated
focus_metricsparameter has been removed. - Metrics calculations exclude pending and unpaid orders and include only paid and refunded orders.
See Events, meters, and metrics.
Embedded checkout allowlisting
- Adding any host under Settings → Preferences → Embedding turns the configured host list into an allowlist.
- Organizations created from August 4, 2026 must configure hosts before embedding.
- Older organizations remain unrestricted until their first host is added.
See Catalog, pricing, and checkout.
SDK and environment quick reference
The typed 2026-04 TypeScript and Python clients are prereleases.
npm install @polar-sh/sdk@next
pip install --pre polar-sdk
import { createPolar } from "@polar-sh/sdk/2026-04";
const polar = createPolar({
accessToken: process.env.POLAR_ACCESS_TOKEN!,
environment: "sandbox",
});
from polar.v2026_04 import Polar
- Both clients target production unless
environment: "sandbox"in TypeScript orenvironment="sandbox"in Python is set. - Sandbox data and credentials are isolated from production.
Authentication quick reference
- Backend Core API calls use an Organization Access Token at
https://api.polar.sh/v1or the sandbox base URL. - Customer-facing code creates a Customer Access Token through
/v1/customer-sessions/and uses the restricted/v1/customer-portal/surface. - A Customer Access Token is customer-scoped. It cannot create products, issue refunds, or perform other organization-level operations.
List endpoints use one-based page and limit. Both default to 1 and 10,
respectively, and limit has a maximum of 100. Read
pagination.total_count and pagination.max_page from list responses.
See Clients, authentication, and operations.
Checkout and pricing quick reference
Prices and intervals
- Products can define amounts in multiple currencies; the organization has a default presentment currency.
- Fixed discounts can define currency-specific amounts.
- Subscription products support daily, weekly, and custom interval counts.
- Polar also supports tax-inclusive prices, seat-based one-time products, and fixed, free, or custom ad-hoc price overrides on API-created checkouts.
Checkout controls
- Checkout and Customer Portal sessions accept
return_url; dashboard-created static Checkout Links can set it too. - Checkout Links persist
reference_idand standard UTM query parameters into Checkout metadata. - Seat checkouts accept
min_seatsandmax_seats. - The business-purchase option requires a business billing name and full address.
Discounts and trials
- Discount creation and update accept
max_redemptions_per_customer. - Repeat redemption is identified by customer ID, plus-alias-normalized email, or payment card.
- Configure trials on subscription products. Organization-level abuse prevention checks normalized email and card fingerprints.
- Set Checkout's
allow_trialto force a purchase without the product's normal trial.
See Catalog, pricing, and checkout.
Subscription quick reference
- Create subscriptions through the API without Checkout.
- Move an existing subscription from an archived price to the current price of the same product with proration.
- Add, change, or remove its discount.
- Change its current billing-period end unless it is already canceled.
- Use
next_periodproration behavior for product, price, and seat changes. Subscription objects and webhooks expose the pending update. - Pausing takes effect at period end, stops billing, and revokes benefits. It does not delete the subscription or payment method.
- Resuming starts a new period and charges immediately. An automatic resume date is optional.
- Pause and resume transitions emit
subscription.pausedandsubscription.resumed.
See Subscriptions, members, and benefits.
Customer and B2B quick reference
Customer identity and state
- Customers have
external_idget, update, and delete operations, and list queries can filter by external ID. - A checkout's
external_customer_idis copied to the customer created after payment. - Customer State returns active subscriptions and granted benefits in one API call or webhook and correctly represents trialing subscriptions.
Members and seats
GET /v1/membersis paginated and supports customer filtering. Polar automatically creates an owner member.- Member roles are
owner,billing_manager, andmember. - Ownership transfer demotes the former owner to billing manager.
- Member sessions use the
polar_mst_prefix. - Benefits can be member-specific; events accept
member_idorexternal_member_id. - Seats can be assigned by API, and customer seat changes are automatically prorated.
See Customers, billing, and self-service and Subscriptions, members, and benefits.
Events and delivery quick reference
- Events accept
parent_idfor hierarchies andexternal_idas an idempotency key. - Event types are created from event names and support display names and a statistics endpoint. Events can carry cost metadata.
- Webhook payloads include a Standard Webhooks timestamp.
- By default, an endpoint is disabled after 10 consecutive failures. Organization members are notified, and the endpoint must be manually re-enabled after the receiver is fixed.
See Events, meters, and metrics and Clients, authentication, and operations.