Access the Polar API with managed OAuth authentication. Manage products, checkouts, orders, subscriptions, customers, refunds, discounts, benefits, license keys, meters, and metrics for software sold through Polar. All access runs through the Maton gateway and the maton CLI.
Permissions
Scopes
Choose which of these OAuth scopes the connection asks for when you connect, or pass them as scopes to Create Connection. Always scopes are added whatever you choose, By default ones are requested when you don't choose, and Optional ones only when you choose them. See Scopes.
| Scope | Requested |
|---|---|
openid | Always |
profile | Always |
email | Always |
user:read | By default |
user:write | By default |
organizations:read | By default |
organizations:write | By default |
custom_fields:read | By default |
custom_fields:write | By default |
discounts:read | By default |
discounts:write | By default |
checkout_links:read | By default |
checkout_links:write | By default |
checkouts:read | By default |
checkouts:write | By default |
transactions:read | By default |
transactions:write | By default |
payouts:read | By default |
payouts:write | By default |
products:read | By default |
products:write | By default |
benefits:read | By default |
benefits:write | By default |
events:read | By default |
events:write | By default |
meters:read | By default |
meters:write | By default |
files:read | By default |
files:write | By default |
subscriptions:read | By default |
subscriptions:write | By default |
customers:read | By default |
customers:write | By default |
members:read | By default |
members:write | By default |
wallets:read | By default |
wallets:write | By default |
disputes:read | By default |
disputes:write | By default |
customer_meters:read | By default |
customer_sessions:write | By default |
member_sessions:write | By default |
customer_seats:read | By default |
customer_seats:write | By default |
orders:read | By default |
orders:write | By default |
refunds:read | By default |
refunds:write | By default |
payments:read | By default |
metrics:read | By default |
metrics:write | By default |
webhooks:read | By default |
webhooks:write | By default |
license_keys:read | By default |
license_keys:write | By default |
customer_portal:read | By default |
customer_portal:write | By default |
notifications:read | By default |
notifications:write | By default |
notification_recipients:read | By default |
notification_recipients:write | By default |
Suggested read access
In the Console, Read limits the connection to these 57 read-only endpoints, plus deny rules for any write endpoint a broader rule would otherwise match. Endpoints Maton has found to return credentials, start jobs, or spend credits are left out; a few reads that can change state or return a secret depending on their parameters stay in, and their descriptions say how. It is a suggestion: the saved rules are exactly the ones you see, and you can change them with Custom. See Access policy.
Reference
Identity
Get the Connected User
maton api '/polar/v1/oauth2/userinfo'Response:
{
"sub": "{user_id}",
"email": "jane@example.com",
"email_verified": true
}name may be absent. GET /v1/users/me returns 403 NotPermitted for OAuth tokens even with every scope; use /v1/oauth2/userinfo.
Organizations
List Organizations
maton api '/polar/v1/organizations/'Returns the organizations the token can reach, each with id, name, slug, status, default_presentment_currency, and capabilities. Use the id as organization_id elsewhere. Also accepts slug.
Get Organization
maton api '/polar/v1/organizations/{organization_id}'Products
List Products
maton api '/polar/v1/products/?limit=10'Query parameters:
organization_id- Filter by organization (repeat for several)query- Search by nameis_archived-trueorfalseis_recurring-truefor subscription products,falsefor one-timebenefit_id- Products granting this benefitvisibility-draft,private, orpublicpage,limit- Pagination (defaultlimit10, max 100)sorting- e.g.-created_at(default),name,price_amount
Response (trimmed):
{
"items": [
{
"id": "{product_id}",
"name": "Pro Plan",
"description": "Everything in Pro",
"visibility": "public",
"is_recurring": true,
"recurring_interval": "month",
"recurring_interval_count": 1,
"is_archived": false,
"organization_id": "{organization_id}",
"prices": [
{"id": "{price_id}", "amount_type": "fixed", "price_currency": "usd", "price_amount": 1900, "is_archived": false}
],
"benefits": []
}
],
"pagination": {"total_count": 1, "max_page": 1}
}Get Product
maton api '/polar/v1/products/{product_id}'Create Product
maton api -X POST '/polar/v1/products/' -H 'Content-Type: application/json' --input - <<'JSON'
{
"name": "Pro Plan",
"description": "Everything in Pro",
"organization_id": "{organization_id}",
"recurring_interval": "month",
"prices": [
{"amount_type": "fixed", "price_currency": "usd", "price_amount": 1900}
]
}
JSONNote: name and prices are required. recurring_interval (day, week, month, year) makes it a subscription product; omit it (or send null) for a one-time purchase. Other price types (amount_type): custom (pay what you want), seat_based, unit_based, metered_unit, metered_tiers; a fixed price with price_amount 0 is free. New products default to public visibility, so they can be bought as soon as a checkout links to them; set "visibility": "draft" to review first.
Update Product
maton api -X PATCH '/polar/v1/products/{product_id}' -H 'Content-Type: application/json' --input - <<'JSON'
{
"description": "Everything in Pro, plus priority support"
}
JSONNote: Sending prices replaces the price list: include existing prices as {"id": "{price_id}"} to keep them; any left out are removed from the product. A price change applies to new purchases. "is_archived": true stops new sales of the product; existing subscribers keep access.
Checkout Links
A checkout link is a reusable, shareable URL that starts a checkout for one or more products.
List Checkout Links
maton api '/polar/v1/checkout-links/?limit=10'Query parameters: organization_id, product_id, page, limit, sorting.
Create Checkout Link
maton api -X POST '/polar/v1/checkout-links/' -H 'Content-Type: application/json' --input - <<'JSON'
{
"payment_processor": "stripe",
"products": ["{product_id}"],
"label": "Pricing page",
"allow_discount_codes": true,
"success_url": "https://example.com/thanks?checkout_id={CHECKOUT_ID}"
}
JSONNote: {CHECKOUT_ID} is left literally; Polar substitutes it on redirect. payment_processor (stripe) and products are required. The response url is the shareable link.
Delete Checkout Link
maton api -X DELETE '/polar/v1/checkout-links/{checkout_link_id}'Note: Anyone with the old URL can no longer buy through it.
Checkout Sessions
List Checkout Sessions
maton api '/polar/v1/checkouts/?limit=10'Query parameters: organization_id, product_id, customer_id, external_customer_id, status (open, expired, confirmed, succeeded, failed), query, page, limit, sorting.
Get Checkout Session
maton api '/polar/v1/checkouts/{checkout_id}'Create Checkout Session
maton api -X POST '/polar/v1/checkouts/' -H 'Content-Type: application/json' --input - <<'JSON'
{
"products": ["{product_id}"],
"customer_email": "jane@example.com",
"success_url": "https://example.com/thanks?checkout_id={CHECKOUT_ID}"
}
JSONNote: products is required; the first is selected by default. Optional: customer_id or external_customer_id to link an existing customer, discount_id, allow_discount_codes, metadata. The response url is a one-off payment page for the customer; it charges nothing until they pay.
Orders
List Orders
maton api '/polar/v1/orders/?limit=10'Query parameters:
organization_id,product_id,customer_id,external_customer_id,subscription_id,checkout_id,discount_idstatus-draft,pending,paid,refunded,partially_refunded,voidproduct_billing_type-one_timeorrecurringcreated_after,created_before- ISO 8601 timestampspage,limit,sorting(e.g.-created_at,-amount)
Example:
maton api '/polar/v1/orders/?status=paid&created_after=2026-11-01T00:00:00Z&limit=25'Response (trimmed):
{
"items": [
{
"id": "{order_id}",
"created_at": "2026-11-03T14:12:09Z",
"status": "paid",
"billing_reason": "subscription_cycle",
"subtotal_amount": 1900,
"discount_amount": 0,
"tax_amount": 0,
"total_amount": 1900,
"refunded_amount": 0,
"refundable_amount": 1900,
"currency": "usd",
"customer_id": "{customer_id}",
"product_id": "{product_id}",
"subscription_id": "{subscription_id}",
"invoice_number": "INV-0001"
}
],
"pagination": {"total_count": 1, "max_page": 1}
}Each order also embeds customer, product, subscription, and line items.
Get Order
maton api '/polar/v1/orders/{order_id}'Get Order Invoice
maton api '/polar/v1/orders/{order_id}/invoice'Note: Returns the invoice download url once it has been generated (is_invoice_generated on the order). POST /v1/orders/{order_id}/invoice triggers generation from the order's current billing details; ask first.
Subscriptions
List Subscriptions
maton api '/polar/v1/subscriptions/?active=true&limit=10'Query parameters:
organization_id,product_id,customer_id,external_customer_id,discount_idactive-truefor active subscriptions onlystatus-incomplete,trialing,active,past_due,canceled,unpaid,paused, ...cancel_at_period_end-truefor subscriptions scheduled to endstarted_after,started_before,canceled_at_after,canceled_at_beforepage,limit,sorting(e.g.-started_at)
Get Subscription
maton api '/polar/v1/subscriptions/{subscription_id}'Note: Key fields: status, amount, currency, recurring_interval, current_period_end, cancel_at_period_end, customer, product.
Cancel Subscription at Period End
maton api -X PATCH '/polar/v1/subscriptions/{subscription_id}' -H 'Content-Type: application/json' --input - <<'JSON'
{
"cancel_at_period_end": true
}
JSONNote: "cancel_at_period_end": false undoes a scheduled cancellation.
Change Plan
maton api -X PATCH '/polar/v1/subscriptions/{subscription_id}' -H 'Content-Type: application/json' --input - <<'JSON'
{
"product_id": "{new_product_id}",
"proration_behavior": "prorate"
}
JSONNote: Changes what the customer is billed. proration_behavior is invoice (charge the difference now), prorate (on the next invoice), next_period, or reset; omitted, the organization default applies. Other single-purpose bodies for this endpoint: {"discount_id": ...} (null removes it), {"trial_end": ...}, {"seats": ...}. Send one kind of change per request.
Revoke Subscription Immediately
maton api -X DELETE '/polar/v1/subscriptions/{subscription_id}'Note: PATCH with {"revoke": true} does the same.
Customers
List Customers
maton api '/polar/v1/customers/?limit=10'Query parameters: organization_id, email (exact match), query (name or email search), active, page, limit, sorting.
Example:
maton api '/polar/v1/customers/?email=jane%40example.com'Get Customer
maton api '/polar/v1/customers/{customer_id}'
maton api '/polar/v1/customers/external/{external_id}'Note: external_id is the user's own ID for the customer, if they set one.
Get Customer State
maton api '/polar/v1/customers/{customer_id}/state'Note: Returns the customer with their active subscriptions, granted benefits, and meter balances in one call — the usual way to answer "what does this customer have access to?".
Update Customer
maton api -X PATCH '/polar/v1/customers/{customer_id}' -H 'Content-Type: application/json' --input - <<'JSON'
{
"name": "Jane Doe"
}
JSONNote: Updatable: email, name, billing_address, tax_id, locale, external_id (set once), metadata. DELETE /v1/customers/{customer_id} cannot be undone: it immediately cancels the customer's active subscriptions and revokes all their benefits.
List Members
maton api '/polar/v1/members/?limit=10'
maton api '/polar/v1/customers/{customer_id}/members'Note: Members are the people within a team customer.
Refunds
List Refunds
maton api '/polar/v1/refunds/?limit=10'Query parameters: organization_id, order_id, subscription_id, customer_id, succeeded, page, limit, sorting.
Create Refund
maton api -X POST '/polar/v1/refunds/' -H 'Content-Type: application/json' --input - <<'JSON'
{
"order_id": "{order_id}",
"amount": 1900,
"reason": "customer_request",
"comment": "Requested within 14 days"
}
JSONNote: order_id, amount (cents, at least 1) and reason are required. reason is duplicate, fraudulent, customer_request, service_disruption, satisfaction_guarantee, or other. "revoke_benefits": true also revokes what the order granted; Polar allows it only for one-time purchases (a subscription's benefits end when the subscription is revoked).
Payments and Disputes
maton api '/polar/v1/payments/?limit=10'
maton api '/polar/v1/payments/{payment_id}'
maton api '/polar/v1/disputes/?limit=10'
maton api '/polar/v1/disputes/{dispute_id}'Note: Payments filter by organization_id, checkout_id, order_id, customer_id, status (pending, succeeded, failed), method. Disputes filter by organization_id, order_id, status (needs_response, under_review, won, lost, ...). POST /v1/disputes/{dispute_id}/accept concedes the chargeback and the funds; only on explicit request.
Discounts
List Discounts
maton api '/polar/v1/discounts/?limit=10'Query parameters: organization_id, query, page, limit, sorting.
Create Discount
maton api -X POST '/polar/v1/discounts/' -H 'Content-Type: application/json' --input - <<'JSON'
{
"name": "Launch week",
"type": "percentage",
"basis_points": 2000,
"duration": "once",
"code": "LAUNCH20",
"max_redemptions": 100,
"ends_at": "2026-12-31T23:59:59Z",
"organization_id": "{organization_id}"
}
JSONNote: basis_points is hundredths of a percent (2000 = 20%). For a fixed amount use "type": "fixed" with amount (cents) and currency. duration is once, forever, or repeating (with duration_in_months). products limits which products it applies to. Confirm the amount, code, and limits; a public code can be redeemed by anyone who has it.
Benefits and License Keys
maton api '/polar/v1/benefits/?limit=10'
maton api '/polar/v1/benefits/{benefit_id}/grants?limit=10'
maton api '/polar/v1/license-keys/?limit=10'
maton api '/polar/v1/license-keys/{license_key_id}'Note: Benefits filter by organization_id, type (license_keys, downloadables, github_repository, discord, custom, meter_credit, feature_flag, ...). License keys filter by organization_id, benefit_id, status (granted, revoked, disabled); each carries the full key and a masked display_key.
Disable a License Key
maton api -X PATCH '/polar/v1/license-keys/{license_key_id}' -H 'Content-Type: application/json' --input - <<'JSON'
{
"status": "disabled"
}
JSONNote: The customer's software stops validating; confirm the customer first. Also settable: limit_activations, limit_usage, expires_at.
Metrics
Get Metrics
maton api '/polar/v1/metrics/?start_date=2026-10-01&end_date=2026-10-31&interval=day'Query parameters:
start_date,end_date,interval- Required.intervalishour,day,week,month, oryeartimezone- IANA name, defaultUTCorganization_id,product_id,billing_type(one_time,recurring),customer_idmetrics- Limit to specific metric slugs (repeat for several)
Response (trimmed):
{
"periods": [
{"timestamp": "2026-10-01T00:00:00Z", "orders": 3, "revenue": 5700, "net_revenue": 5300, "active_subscriptions": 12, "monthly_recurring_revenue": 22800, "churned_subscriptions": 0}
],
"totals": {"orders": 41, "revenue": 77900},
"metrics": {"revenue": {"slug": "revenue", "display_name": "Revenue", "type": "currency"}}
}Money metrics are in cents.
Get Metric Limits
maton api '/polar/v1/metrics/limits'Returns min_date and, per interval, the allowed range in days (for example day up to 366 days, hour up to 7).
Usage Billing
maton api '/polar/v1/meters/?limit=10'
maton api '/polar/v1/meters/{meter_id}/quantities?start_timestamp=2026-11-01T00:00:00Z&end_timestamp=2026-11-26T00:00:00Z&interval=day'
maton api '/polar/v1/customer-meters/?customer_id={customer_id}'
maton api '/polar/v1/events/?limit=10'
maton api '/polar/v1/events/names'Note: POST /v1/events/ingest records usage that customers are billed for; ingest only events the user supplies.
Other Read Endpoints
maton api '/polar/v1/custom-fields/?limit=10'
maton api '/polar/v1/files/?limit=10'
maton api '/polar/v1/benefit-grants/?limit=10'
maton api '/polar/v1/customer-seats?subscription_id={subscription_id}'Note: customer-seats requires subscription_id or order_id (otherwise 400).
Webhook Endpoints
maton api '/polar/v1/webhooks/endpoints'
maton api '/polar/v1/webhooks/deliveries?endpoint_id={endpoint_id}&limit=10'Create Webhook Endpoint
maton api -X POST '/polar/v1/webhooks/endpoints' -H 'Content-Type: application/json' --input - <<'JSON'
{
"url": "https://hooks.example.com/polar",
"format": "raw",
"events": ["order.paid", "subscription.canceled"],
"organization_id": "{organization_id}"
}
JSONNote: url, format (raw, discord, slack) and events are required. The response includes the signing secret; treat it as a credential and do not print it. DELETE /v1/webhooks/endpoints/{endpoint_id} stops delivery.
Pagination
List endpoints take page (from 1) and limit (default 10, max 100) and return items with a pagination object:
{"items": [], "pagination": {"total_count": 42, "max_page": 5}}maton api '/polar/v1/orders/?limit=100&page=1'
maton api '/polar/v1/orders/?limit=100&page=2'Stop when page reaches max_page.
Notes
- IDs are UUIDs; a malformed ID returns
422 RequestValidationError, an unknown one404 ResourceNotFound. - Amounts are integers in the smallest currency unit; currencies are lowercase ISO codes (
usd). - Timestamps are ISO 8601 (UTC).
- Array filters repeat the parameter:
?product_id={a}&product_id={b}.sortingtakes a field name,-prefix for descending. - Errors are JSON
{"error": "...", "detail": ...}; validation errors list each field indetail. - Payouts, transactions and wallets have OAuth scopes but no endpoints in Polar's public API; they are not part of this reference.
- Rate limit: Polar documents 500 requests per minute in production. On
429, wait forRetry-After.