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
products instead of the deprecated checkout fields product_id and
product_price_id.
ProductPrice.type and ProductPrice.recurring_interval are deprecated.
Set recurrence on Product.
See Catalog, pricing, and checkout.
Metrics query selection
- Select requested values with the
metrics query parameter.
- The deprecated
focus_metrics parameter 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 or environment="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/v1 or 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_id and standard UTM query parameters into
Checkout metadata.
- Seat checkouts accept
min_seats and max_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_trial to 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_period proration 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.paused and
subscription.resumed.
See Subscriptions, members, and benefits.
Customer and B2B quick reference
Customer identity and state
- Customers have
external_id get, update, and delete operations, and list
queries can filter by external ID.
- A checkout's
external_customer_id is 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/members is paginated and supports customer filtering. Polar
automatically creates an owner member.
- Member roles are
owner, billing_manager, and member.
- Ownership transfer demotes the former owner to billing manager.
- Member sessions use the
polar_mst_ prefix.
- Benefits can be member-specific; events accept
member_id or
external_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_id for hierarchies and external_id as 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.
1---2name: polar-knowledge-patch3description: Polar4license: MIT5---678# Polar Knowledge Patch910Use this skill for Polar SDK, Core API, Customer Portal, checkout, billing,11subscription, benefit, event, meter, webhook, metrics, and integration work.12Start with the breaking and deprecated behavior below, then open the reference13file that matches the task.1415## Reference index1617| Reference | Topics |18| --- | --- |19| [Clients, authentication, and operations](references/clients-auth-and-operations.md) | Preview SDKs, environments, API and Customer Portal authentication, pagination, rate limits, webhooks, OAuth2, SSO, and integrations |20| [Catalog, pricing, and checkout](references/catalog-pricing-and-checkout.md) | Product variants, recurrence, prices, payment methods, checkout controls, embedding, discounts, and trials |21| [Customers, billing, and self-service](references/customers-billing-and-self-service.md) | External IDs, Customer State, credit balances, invoice numbering, portal email, data export, and email behavior |22| [Subscriptions, members, and benefits](references/subscriptions-members-and-benefits.md) | Subscription mutation, scheduled updates, pause and resume, B2B members, seats, benefits, and license keys |23| [Events, meters, and metrics](references/events-meters-and-metrics.md) | Event hierarchy and idempotency, event types, meter units and time zones, and Metrics API semantics |2425## Breaking and deprecated behavior2627### Product recurrence and checkout selection2829- A product can no longer combine monthly and yearly pricing. Existing30 combinations continue to work.31- Represent variants as separate products and offer those products together in32 a checkout.33- Use `products` instead of the deprecated checkout fields `product_id` and34 `product_price_id`.35- `ProductPrice.type` and `ProductPrice.recurring_interval` are deprecated.36 Set recurrence on `Product`.3738See [Catalog, pricing, and checkout](references/catalog-pricing-and-checkout.md).3940### Metrics query selection4142- Select requested values with the `metrics` query parameter.43- The deprecated `focus_metrics` parameter has been removed.44- Metrics calculations exclude pending and unpaid orders and include only paid45 and refunded orders.4647See [Events, meters, and metrics](references/events-meters-and-metrics.md).4849### Embedded checkout allowlisting5051- Adding any host under Settings → Preferences → Embedding turns the configured52 host list into an allowlist.53- Organizations created from August 4, 2026 must configure hosts before54 embedding.55- Older organizations remain unrestricted until their first host is added.5657See [Catalog, pricing, and checkout](references/catalog-pricing-and-checkout.md).5859## SDK and environment quick reference6061The typed 2026-04 TypeScript and Python clients are prereleases.6263```bash64npm install @polar-sh/sdk@next65pip install --pre polar-sdk66```6768```ts69import { createPolar } from "@polar-sh/sdk/2026-04";7071const polar = createPolar({72 accessToken: process.env.POLAR_ACCESS_TOKEN!,73 environment: "sandbox",74});75```7677```python78from polar.v2026_04 import Polar79```8081- Both clients target production unless `environment: "sandbox"` in82 TypeScript or `environment="sandbox"` in Python is set.83- Sandbox data and credentials are isolated from production.8485## Authentication quick reference8687- Backend Core API calls use an Organization Access Token at88 `https://api.polar.sh/v1` or the sandbox base URL.89- Customer-facing code creates a Customer Access Token through90 `/v1/customer-sessions/` and uses the restricted `/v1/customer-portal/`91 surface.92- A Customer Access Token is customer-scoped. It cannot create products, issue93 refunds, or perform other organization-level operations.9495List endpoints use one-based `page` and `limit`. Both default to 1 and 10,96respectively, and `limit` has a maximum of 100. Read97`pagination.total_count` and `pagination.max_page` from list responses.9899See [Clients, authentication, and operations](references/clients-auth-and-operations.md).100101## Checkout and pricing quick reference102103### Prices and intervals104105- Products can define amounts in multiple currencies; the organization has a106 default presentment currency.107- Fixed discounts can define currency-specific amounts.108- Subscription products support daily, weekly, and custom interval counts.109- Polar also supports tax-inclusive prices, seat-based one-time products, and110 fixed, free, or custom ad-hoc price overrides on API-created checkouts.111112### Checkout controls113114- Checkout and Customer Portal sessions accept `return_url`; dashboard-created115 static Checkout Links can set it too.116- Checkout Links persist `reference_id` and standard UTM query parameters into117 Checkout metadata.118- Seat checkouts accept `min_seats` and `max_seats`.119- The business-purchase option requires a business billing name and full120 address.121122### Discounts and trials123124- Discount creation and update accept `max_redemptions_per_customer`.125- Repeat redemption is identified by customer ID, plus-alias-normalized email,126 or payment card.127- Configure trials on subscription products. Organization-level abuse128 prevention checks normalized email and card fingerprints.129- Set Checkout's `allow_trial` to force a purchase without the product's normal130 trial.131132See [Catalog, pricing, and checkout](references/catalog-pricing-and-checkout.md).133134## Subscription quick reference135136- Create subscriptions through the API without Checkout.137- Move an existing subscription from an archived price to the current price of138 the same product with proration.139- Add, change, or remove its discount.140- Change its current billing-period end unless it is already canceled.141- Use `next_period` proration behavior for product, price, and seat changes.142 Subscription objects and webhooks expose the pending update.143- Pausing takes effect at period end, stops billing, and revokes benefits. It144 does not delete the subscription or payment method.145- Resuming starts a new period and charges immediately. An automatic resume146 date is optional.147- Pause and resume transitions emit `subscription.paused` and148 `subscription.resumed`.149150See [Subscriptions, members, and benefits](references/subscriptions-members-and-benefits.md).151152## Customer and B2B quick reference153154### Customer identity and state155156- Customers have `external_id` get, update, and delete operations, and list157 queries can filter by external ID.158- A checkout's `external_customer_id` is copied to the customer created after159 payment.160- Customer State returns active subscriptions and granted benefits in one API161 call or webhook and correctly represents trialing subscriptions.162163### Members and seats164165- `GET /v1/members` is paginated and supports customer filtering. Polar166 automatically creates an owner member.167- Member roles are `owner`, `billing_manager`, and `member`.168- Ownership transfer demotes the former owner to billing manager.169- Member sessions use the `polar_mst_` prefix.170- Benefits can be member-specific; events accept `member_id` or171 `external_member_id`.172- Seats can be assigned by API, and customer seat changes are automatically173 prorated.174175See [Customers, billing, and self-service](references/customers-billing-and-self-service.md)176and [Subscriptions, members, and benefits](references/subscriptions-members-and-benefits.md).177178## Events and delivery quick reference179180- Events accept `parent_id` for hierarchies and `external_id` as an idempotency181 key.182- Event types are created from event names and support display names and a183 statistics endpoint. Events can carry cost metadata.184- Webhook payloads include a Standard Webhooks timestamp.185- By default, an endpoint is disabled after 10 consecutive failures.186 Organization members are notified, and the endpoint must be manually187 re-enabled after the receiver is fixed.188189See [Events, meters, and metrics](references/events-meters-and-metrics.md) and190[Clients, authentication, and operations](references/clients-auth-and-operations.md).