The Polar connector lets your AI agent act in each user's Polar account. Each user connects their own Polar access token once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 60 tools.
- Tools
- 60
- What they doRead · write · destructive
- 36 · 19 · 536 read19 write5 destructive
- Users sign in with
- Access token
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet your credentials
Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret>Create the Polar connection
In AgentKit > Connections, create a Polar connection. The name you give it is the
connection_nameyour code passes. See Configure connections.Authorize a user and make your first call
quickstart.mts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'import { createInterface } from 'node:readline/promises'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENVIRONMENT_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'polar'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize Polar:', link)const rl = createInterface({ input: process.stdin, output: process.stdout })await rl.question('Press Enter after authorizing...')rl.close()// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'polar_benefits_list',toolInput: {},})console.log(result)Terminal window npx tsx quickstart.mtsquickstart.py import osfrom scalekit import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "polar"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize Polar:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="polar_benefits_list",connection_name=connection_name,identifier=identifier,)print(result)Terminal window python quickstart.pyEach user opens the link once and enters their Polar credentials there. See Authorize a user for the full flow and statuses.
Tools
Pass the exact name toexecute_toolpolar_benefit_getGet a benefit by ID.Read-onlyGet Benefit
Get a benefit by ID. Returns the benefit with type, description and type-specific properties. Use polar_benefit_get when you have the ID.
Inputs
idstringrequired- Benefit ID (UUID). Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
polar_benefit_grants_listList the customers who were granted a benefit, optionally only current or revoked grants.Read-onlyList Benefit Grants
List the customers who were granted a benefit, optionally only current or revoked grants. Returns items[] of grants with customer, granted_at, revoked_at and is_granted. Use polar_benefit_grants_list to see who has access.
Inputs
idstringrequired- Benefit ID (UUID). Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
customer_idstring- Only grants of this customer ID. Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.
is_grantedboolean- true for current grants, false for revoked. Example: true.
limitinteger- Page size, up to 100. Defaults to 10. Example: 50.
pageinteger- Page number, starting at 1. Defaults to 1. Example: 1.
polar_benefits_listList benefits (license keys, file downloads, GitHub or Discord access, custom perks), optionally by type or description.Read-onlyList Benefits
List benefits (license keys, file downloads, GitHub or Discord access, custom perks), optionally by type or description. Returns items[] of benefits with id, type, description and properties. Use polar_benefits_list to find a benefit ID.
Inputs
limitinteger- Page size, up to 100. Defaults to 10. Example: 50.
pageinteger- Page number, starting at 1. Defaults to 1. Example: 1.
querystring- Text to match against the description. Example: Pro license.
sortingstring- Sort criterion; prefix with - for descending, for example -created_at. Example: -created_at.
typestring- Benefit type. Example: license_keys.one of
customdiscordgithub_repositorydownloadableslicense_keysmeter_creditfeature_flagslack_shared_channel
polar_checkout_getGet a checkout session by ID.Read-onlyGet Checkout Session
Get a checkout session by ID. Returns the checkout with status, url, products, amounts, discount and customer details. Use polar_checkout_get to check whether a checkout succeeded.
Inputs
idstringrequired- Checkout session ID (UUID). Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
polar_checkout_link_getGet a checkout link by ID.Read-onlyGet Checkout Link
Get a checkout link by ID. Returns the link with url, label, products and settings. Use polar_checkout_link_get when you have the ID.
Inputs
idstringrequired- Checkout link ID (UUID). Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
polar_checkout_links_listList reusable checkout links, optionally for a product.Read-onlyList Checkout Links
List reusable checkout links, optionally for a product. Returns items[] of links with id, url, label, products and discount. Use polar_checkout_links_list to find an existing payment link.
Inputs
limitinteger- Page size, up to 100. Defaults to 10. Example: 50.
pageinteger- Page number, starting at 1. Defaults to 1. Example: 1.
product_idstring- Only links for this product ID. Example: d8f6a1c2-5b3e-4f7a-9c1d-2e3f4a5b6c7d.
sortingstring- Sort criterion; prefix with - for descending, for example -created_at. Example: -created_at.
polar_checkouts_listList checkout sessions, filtered by product, customer, status or customer email.Read-onlyList Checkout Sessions
List checkout sessions, filtered by product, customer, status or customer email. Returns items[] of checkouts with id, status, url, amount and customer details. Use polar_checkouts_list to track open or abandoned checkouts.
Inputs
customer_idstring- Only checkouts for this customer ID. Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.
external_customer_idstring- Only checkouts for this external customer ID. Example: usr_1337.
limitinteger- Page size, up to 100. Defaults to 10. Example: 50.
pageinteger- Page number, starting at 1. Defaults to 1. Example: 1.
product_idstring- Only checkouts for this product ID. Example: d8f6a1c2-5b3e-4f7a-9c1d-2e3f4a5b6c7d.
querystring- Customer email to filter by. Example: jane@example.com.
sortingstring- Sort criterion; prefix with - for descending, for example -created_at. Example: -created_at.
statusstring- Checkout status. Example: open.one of
openexpiredconfirmedsucceededfailed
polar_customer_getGet a customer by Polar ID.Read-onlyGet Customer
Get a customer by Polar ID. Returns the customer with email, name, external_id, billing address, tax ID and metadata. Use polar_customer_get when you have the Polar ID. Use polar_customer_get_by_external_id with your own ID.
Inputs
idstringrequired- Polar customer ID (UUID). Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.
polar_customer_get_by_external_idGet a customer by the external ID you set from your system.Read-onlyGet Customer by External ID
Get a customer by the external ID you set from your system. Returns the customer. Use polar_customer_get_by_external_id to map your user to a Polar customer.
Inputs
external_idstringrequired- The customer's ID in your system. Example: usr_1337.
polar_customer_meters_listList per-customer meter balances: consumed units, credited units and balance.Read-onlyList Customer Meters
List per-customer meter balances: consumed units, credited units and balance. Returns items[] with customer, meter, consumed_units, credited_units and balance. Use polar_customer_meters_list to check a customer's usage against credits.
Inputs
customer_idstring- Only meters of this customer ID. Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.
external_customer_idstring- Only meters of this external customer ID. Example: usr_1337.
limitinteger- Page size, up to 100. Defaults to 10. Example: 50.
meter_idstring- Only this meter ID. Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
pageinteger- Page number, starting at 1. Defaults to 1. Example: 1.
sortingstring- Sort criterion; prefix with - for descending, for example -created_at. Example: -created_at.
polar_customer_payment_methods_listList a customer's saved payment methods.Read-onlyList Customer Payment Methods
List a customer's saved payment methods. Returns items[] of payment methods with id, type and card brand, last4 and expiry. Use polar_customer_payment_methods_list to check whether a customer has a card on file.
Inputs
idstringrequired- Polar customer ID (UUID). Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.
limitinteger- Page size, up to 100. Defaults to 10. Example: 50.
pageinteger- Page number, starting at 1. Defaults to 1. Example: 1.
polar_customer_state_getGet a customer's full state: active subscriptions, granted benefits and meter balances.Read-onlyGet Customer State
Get a customer's full state: active subscriptions, granted benefits and meter balances. Returns the customer with active_subscriptions[], granted_benefits[] and active_meters[]. Use polar_customer_state_get to decide what a customer is entitled to.
Inputs
idstringrequired- Polar customer ID (UUID). Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.
polar_customers_listList customers, filtered by email, a text query or active subscription status.Read-onlyList Customers
List customers, filtered by email, a text query or active subscription status. Returns items[] of customers with id, email, name, external_id and metadata, and pagination. Use polar_customers_list to search customers. Use polar_customer_get for one customer.
Inputs
activeboolean- true for customers with at least one trialing, active or past_due subscription. Example: true.
emailstring- Exact email address to filter by. Example: jane@example.com.
limitinteger- Page size, up to 100. Defaults to 10. Example: 50.
pageinteger- Page number, starting at 1. Defaults to 1. Example: 1.
querystring- Text to match against name, email or external ID. Example: jane.
sortingstring- Sort criterion; prefix with - for descending, for example -created_at. Example: -created_at.
polar_discount_getGet a discount by ID.Read-onlyGet Discount
Get a discount by ID. Returns the discount with code, type, amount, duration, redemptions and products. Use polar_discount_get when you have the ID.
Inputs
idstringrequired- Discount ID (UUID). Example: 0b1c2d3e-4f5a-6b7c-8d9e-0f1a2b3c4d5e.
polar_discounts_listList discounts, optionally by name or code.Read-onlyList Discounts
List discounts, optionally by name or code. Returns items[] of discounts with id, name, code, type, amount or basis_points and duration. Use polar_discounts_list to find a discount ID.
Inputs
limitinteger- Page size, up to 100. Defaults to 10. Example: 50.
pageinteger- Page number, starting at 1. Defaults to 1. Example: 1.
querystring- Text to match against the discount name or code. Example: BLACKFRIDAY.
sortingstring- Sort criterion; prefix with - for descending, for example -created_at. Example: -created_at.
polar_dispute_getGet a dispute by ID.Read-onlyGet Dispute
Get a dispute by ID. Returns the dispute with status, amount, order and payment. Use polar_dispute_get when you have the ID.
Inputs
idstringrequired- Dispute ID (UUID). Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
polar_disputes_listList payment disputes, filtered by order or status.Read-onlyList Disputes
List payment disputes, filtered by order or status. Returns items[] of disputes with id, status, amount and order. Use polar_disputes_list to monitor chargebacks.
Inputs
limitinteger- Page size, up to 100. Defaults to 10. Example: 50.
order_idstring- Only disputes of this order ID. Example: 1d2e3f4a-5b6c-7d8e-9f0a-1b2c3d4e5f6a.
pageinteger- Page number, starting at 1. Defaults to 1. Example: 1.
sortingstring- Sort criterion; prefix with - for descending, for example -created_at. Example: -created_at.
statusstring- Dispute status. Example: needs_response.one of
preventedearly_warningneeds_responseunder_reviewlostwon
polar_events_listList ingested and system events, filtered by customer, name, source, meter or time range.Read-onlyList Events
List ingested and system events, filtered by customer, name, source, meter or time range. Returns items[] of events with id, name, source, timestamp, customer and metadata. Use polar_events_list to inspect usage events.
Inputs
customer_idstring- Only events of this customer ID. Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.
end_timestampstring- Only events before this date-time (ISO 8601). Example: 2026-11-30T23:59:59Z.
external_customer_idstring- Only events of this external customer ID. Example: usr_1337.
limitinteger- Page size, up to 100. Defaults to 10. Example: 50.
meter_idstring- Only events matching this meter ID. Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
namestring- Only events with this name. Example: api_call.
pageinteger- Page number, starting at 1. Defaults to 1. Example: 1.
sortingstring- Sort criterion; prefix with - for descending, for example -created_at. Example: -timestamp.
sourcestring- system for Polar events, user for ingested events. Example: user.one of
systemuser start_timestampstring- Only events after this date-time (ISO 8601). Example: 2026-11-01T00:00:00Z.
polar_license_key_getGet a license key by ID.Read-onlyGet License Key
Get a license key by ID. Returns the key with status, usage, limits, expiry, customer and activations. Use polar_license_key_get when you have the ID.
Inputs
idstringrequired- License key ID (UUID). Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
polar_license_keys_listList license keys, optionally for a benefit.Read-onlyList License Keys
List license keys, optionally for a benefit. Returns items[] of license keys with id, display_key, status, usage, limits and customer. Use polar_license_keys_list to find a customer's keys.
Inputs
benefit_idstring- Only keys granted by this license key benefit ID. Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
limitinteger- Page size, up to 100. Defaults to 10. Example: 50.
pageinteger- Page number, starting at 1. Defaults to 1. Example: 1.
polar_meter_getGet a meter by ID.Read-onlyGet Meter
Get a meter by ID. Returns the meter with name, unit, filter and aggregation. Use polar_meter_get when you have the ID.
Inputs
idstringrequired- Meter ID (UUID). Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
polar_meter_quantities_getGet a meter's aggregated quantities over a time range, bucketed by interval, optionally per customer.Read-onlyGet Meter Quantities
Get a meter's aggregated quantities over a time range, bucketed by interval, optionally per customer. Returns quantities[] with timestamp and quantity, and total. Use polar_meter_quantities_get to report usage.
Inputs
end_timestampstringrequired- End of the range (ISO 8601 date-time). Example: 2026-11-30T23:59:59Z.
idstringrequired- Meter ID (UUID). Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
intervalstringrequired- Bucket size. Example: day.one of
hourdayweekmonthyear start_timestampstringrequired- Start of the range (ISO 8601 date-time). Example: 2026-11-01T00:00:00Z.
customer_idstring- Only usage of this customer ID. Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.
external_customer_idstring- Only usage of this external customer ID. Example: usr_1337.
polar_meters_listList usage meters, optionally by name or archived state.Read-onlyList Meters
List usage meters, optionally by name or archived state. Returns items[] of meters with id, name, unit, filter and aggregation. Use polar_meters_list to find a meter ID for polar_meter_quantities_get.
Inputs
is_archivedboolean- true for archived meters only. Example: false.
limitinteger- Page size, up to 100. Defaults to 10. Example: 50.
pageinteger- Page number, starting at 1. Defaults to 1. Example: 1.
querystring- Text to match against the meter name. Example: API calls.
sortingstring- Sort criterion; prefix with - for descending, for example -created_at. Example: -created_at.
polar_metrics_getGet revenue and sales metrics in cents (orders, revenue, MRR, subscriptions, checkouts and more) over a date range, by interval.Read-onlyGet Metrics
Get revenue and sales metrics in cents (orders, revenue, MRR, subscriptions, checkouts and more) over a date range, by interval. Returns periods[] with each metric's value, totals and the metric definitions. Use polar_metrics_get for revenue reporting.
Inputs
end_datestringrequired- End date (YYYY-MM-DD). Example: 2026-11-30.
intervalstringrequired- Period size. Example: day.one of
yearmonthweekdayhour start_datestringrequired- Start date (YYYY-MM-DD). Example: 2026-11-01.
billing_typestring- one_time or recurring products only. Example: recurring.one of
one_timerecurring customer_idstring- Only metrics for this customer ID. Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.
product_idstring- Only metrics for this product ID. Example: d8f6a1c2-5b3e-4f7a-9c1d-2e3f4a5b6c7d.
timezonestring- IANA timezone for the periods. Defaults to UTC. Example: Europe/Paris.
polar_order_getGet an order by ID.Read-onlyGet Order
Get an order by ID. Returns the order with status, amounts, tax, items, billing address, product, subscription and customer. Use polar_order_get for order details.
Inputs
idstringrequired- Order ID (UUID). Example: 1d2e3f4a-5b6c-7d8e-9f0a-1b2c3d4e5f6a.
polar_order_invoice_getGet the download URL of an order's invoice.Read-onlyGet Order Invoice
Get the download URL of an order's invoice. Returns url. Use polar_order_invoice_get after polar_order_invoice_generate.
Inputs
idstringrequired- Order ID (UUID). Example: 1d2e3f4a-5b6c-7d8e-9f0a-1b2c3d4e5f6a.
polar_orders_listList orders (one-time purchases and subscription invoices), filtered by product, customer, discount, checkout or billing reason.Read-onlyList Orders
List orders (one-time purchases and subscription invoices), filtered by product, customer, discount, checkout or billing reason. Returns items[] of orders with id, status, amounts, billing_reason, product and customer. Use polar_orders_list to review sales. Use polar_order_get for one order.
Inputs
checkout_idstring- Only orders from this checkout ID. Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
customer_idstring- Only orders of this customer ID. Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.
discount_idstring- Only orders using this discount ID. Example: 0b1c2d3e-4f5a-6b7c-8d9e-0f1a2b3c4d5e.
external_customer_idstring- Only orders of this external customer ID. Example: usr_1337.
limitinteger- Page size, up to 100. Defaults to 10. Example: 50.
pageinteger- Page number, starting at 1. Defaults to 1. Example: 1.
product_billing_typestring- one_time for one-time purchases, recurring for subscription creations and renewals. Example: recurring.one of
one_timerecurring product_idstring- Only orders for this product ID. Example: d8f6a1c2-5b3e-4f7a-9c1d-2e3f4a5b6c7d.
sortingstring- Sort criterion; prefix with - for descending, for example -created_at. Example: -created_at.
statusstring- Order status. Example: paid.one of
draftpendingpaidrefundedpartially_refundedvoid subscription_idstring- Only orders of this subscription ID. Example: 5a6b7c8d-9e0f-1a2b-3c4d-5e6f7a8b9c0d.
polar_organization_getGet an organization by ID.Read-onlyGet Organization
Get an organization by ID. Returns the organization with name, slug, settings and feature flags. Use polar_organization_get to read organization settings.
Inputs
idstringrequired- Organization ID (UUID). Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
polar_organizations_listList the organizations the token can access, optionally by slug.Read-onlyList Organizations
List the organizations the token can access, optionally by slug. Returns items[] of organizations with id, name and slug. Use polar_organizations_list to get your organization ID for license key tools.
Inputs
limitinteger- Page size, up to 100. Defaults to 10. Example: 50.
pageinteger- Page number, starting at 1. Defaults to 1. Example: 1.
slugstring- Organization slug to filter by. Example: acme.
sortingstring- Sort criterion; prefix with - for descending, for example -created_at. Example: -created_at.
polar_payment_getGet a payment by ID.Read-onlyGet Payment
Get a payment by ID. Returns the payment with status, amount, method details and decline reason. Use polar_payment_get when you have the ID.
Inputs
idstringrequired- Payment ID (UUID). Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
polar_payments_listList payment attempts, filtered by checkout, order, customer, status or method.Read-onlyList Payments
List payment attempts, filtered by checkout, order, customer, status or method. Returns items[] of payments with id, status, amount, currency, method and decline reason. Use polar_payments_list to investigate failed payments.
Inputs
checkout_idstring- Only payments of this checkout ID. Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
customer_idstring- Only payments of this customer ID. Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.
limitinteger- Page size, up to 100. Defaults to 10. Example: 50.
methodstring- Payment method, for example card. Example: card.
order_idstring- Only payments of this order ID. Example: 1d2e3f4a-5b6c-7d8e-9f0a-1b2c3d4e5f6a.
pageinteger- Page number, starting at 1. Defaults to 1. Example: 1.
sortingstring- Sort criterion; prefix with - for descending, for example -created_at. Example: -created_at.
statusstring- Payment status. Example: failed.one of
pendingsucceededfailed
polar_product_getGet a product by ID.Read-onlyGet Product
Get a product by ID. Returns the product with prices, benefits, medias and custom fields. Use polar_product_get when you have the ID.
Inputs
idstringrequired- Product ID (UUID). Example: d8f6a1c2-5b3e-4f7a-9c1d-2e3f4a5b6c7d.
polar_products_listList products, filtered by name, archived state, recurring or one-time, benefit or visibility.Read-onlyList Products
List products, filtered by name, archived state, recurring or one-time, benefit or visibility. Returns items[] of products with id, name, prices, benefits and recurring_interval. Use polar_products_list to find a product ID.
Inputs
benefit_idstring- Only products granting this benefit ID. Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
is_archivedboolean- true for archived products only, false for active. Example: false.
is_recurringboolean- true for subscription products, false for one-time purchases. Example: true.
limitinteger- Page size, up to 100. Defaults to 10. Example: 50.
pageinteger- Page number, starting at 1. Defaults to 1. Example: 1.
querystring- Text to match against the product name. Example: Pro.
sortingstring- Sort criterion; prefix with - for descending, for example -created_at. Example: -created_at.
visibilitystring- Product visibility. Example: public.one of
draftprivatepublic
polar_refunds_listList refunds, filtered by order, subscription, customer or whether the refund succeeded.Read-onlyList Refunds
List refunds, filtered by order, subscription, customer or whether the refund succeeded. Returns items[] of refunds with id, status, reason, amount and order_id. Use polar_refunds_list to review refunds.
Inputs
customer_idstring- Only refunds of this customer ID. Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.
limitinteger- Page size, up to 100. Defaults to 10. Example: 50.
order_idstring- Only refunds of this order ID. Example: 1d2e3f4a-5b6c-7d8e-9f0a-1b2c3d4e5f6a.
pageinteger- Page number, starting at 1. Defaults to 1. Example: 1.
sortingstring- Sort criterion; prefix with - for descending, for example -created_at. Example: -created_at.
subscription_idstring- Only refunds of this subscription ID. Example: 5a6b7c8d-9e0f-1a2b-3c4d-5e6f7a8b9c0d.
succeededboolean- true for succeeded refunds only. Example: true.
polar_subscription_getGet a subscription by ID.Read-onlyGet Subscription
Get a subscription by ID. Returns the subscription with status, prices, current period, discount, customer and cancellation details. Use polar_subscription_get when you have the ID.
Inputs
idstringrequired- Subscription ID (UUID). Example: 5a6b7c8d-9e0f-1a2b-3c4d-5e6f7a8b9c0d.
polar_subscriptions_listList subscriptions, filtered by product, customer, discount, status or cancellation.Read-onlyList Subscriptions
List subscriptions, filtered by product, customer, discount, status or cancellation. Returns items[] of subscriptions with id, status, amount, currency, current period, product and customer. Use polar_subscriptions_list to find a customer's subscriptions.
Inputs
activeboolean- true for active subscriptions, false for inactive. Example: true.
cancel_at_period_endboolean- true for subscriptions set to cancel at period end. Example: false.
customer_idstring- Only subscriptions of this customer ID. Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.
external_customer_idstring- Only subscriptions of this external customer ID. Example: usr_1337.
limitinteger- Page size, up to 100. Defaults to 10. Example: 50.
pageinteger- Page number, starting at 1. Defaults to 1. Example: 1.
product_idstring- Only subscriptions to this product ID. Example: d8f6a1c2-5b3e-4f7a-9c1d-2e3f4a5b6c7d.
sortingstring- Sort criterion; prefix with - for descending, for example -created_at. Example: -started_at.
statusstring- Subscription status. Example: active.one of
incompleteincomplete_expiredtrialingactivepast_duecanceledunpaidpaused
polar_checkout_createCreate a checkout session for one or more products and get its payment URL.WriteCreate Checkout Session
Create a checkout session for one or more products and get its payment URL. Returns the checkout with id, url, client_secret, status, amount and expires_at. Use polar_checkout_create for a one-off payment link. Use polar_checkout_link_create for a reusable link.
Inputs
productsarrayrequired- Product IDs offered at checkout; the first is selected by default. Example: ["d8f6a1c2-5b3e-4f7a-9c1d-2e3f4a5b6c7d"].
allow_discount_codesboolean- Let the customer enter a discount code. Defaults to true. Example: true.
amountinteger- Amount in cents for a pay-what-you-want price. Example: 1500.
customer_emailstring- Email to pre-fill. Example: jane@example.com.
customer_idstring- ID of an existing Polar customer to pre-fill. Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.
customer_metadataobject- Metadata copied to the customer created by the checkout. Example: {"plan_source": "website"}.
customer_namestring- Name to pre-fill. Example: Jane Doe.
discount_idstring- ID of a discount to apply. Example: 0b1c2d3e-4f5a-6b7c-8d9e-0f1a2b3c4d5e.
external_customer_idstring- Your ID for the customer; the order is linked to the matching or a new customer. Example: usr_1337.
metadataobject- Key-value metadata to store on the record (string keys up to 40 characters; string, number or boolean values). Example: {"crm_id": "A-77"}.
return_urlstring- URL for a back button in the checkout. Example: https://example.com/pricing.
success_urlstring- Redirect URL after payment; may include {CHECKOUT_ID}. Example: https://example.com/thanks?checkout_id={CHECKOUT_ID}
trial_intervalstring- Unit of the free trial period. Example: day.one of
dayweekmonthyear trial_interval_countinteger- Number of trial_interval units, for example 14 days. Example: 14.
polar_checkout_link_createCreate a reusable checkout link for one or more products.WriteCreate Checkout Link
Create a reusable checkout link for one or more products. Returns the link with id and url. Use polar_checkout_link_create to share a permanent buy link. Use polar_checkout_create for a single session.
Inputs
productsarrayrequired- Product IDs available on the link. Example: ["d8f6a1c2-5b3e-4f7a-9c1d-2e3f4a5b6c7d"].
allow_discount_codesboolean- Let customers enter discount codes. Defaults to true. Example: true.
discount_idstring- ID of a discount to apply. Example: 0b1c2d3e-4f5a-6b7c-8d9e-0f1a2b3c4d5e.
labelstring- Internal label for the link. Example: Pricing page - Pro.
metadataobject- Key-value metadata to store on the record (string keys up to 40 characters; string, number or boolean values). Example: {"crm_id": "A-77"}.
require_billing_addressboolean- Require a full billing address. Example: false.
success_urlstring- Redirect URL after payment. Example: https://example.com/thanks.
trial_intervalstring- Unit of the free trial period. Example: day.one of
dayweekmonthyear trial_interval_countinteger- Number of trial_interval units, for example 14 days. Example: 14.
polar_customer_createCreate a customer, optionally with your own external_id.WriteCreate Customer
Create a customer, optionally with your own external_id. Returns the customer with id, email, name and external_id. Use polar_customer_create to register a customer before creating a subscription or customer session.
Inputs
billing_addressobject- Billing address with country (ISO 3166-1 alpha-2, required) and optional line1, line2, postal_code, city and state. Example: {"country": "US", "line1": "1 Main St", "city": "Austin", "state": "US-TX", "postal_code": "78701"}.
emailstring- Customer email address, unique in the organization. Required for individual customers. Example: jane@example.com.
external_idstring- The customer's ID in your system; unique and cannot be changed once set. Example: usr_1337.
localestring- Customer locale as a language tag. Example: en.
metadataobject- Key-value metadata to store on the record (string keys up to 40 characters; string, number or boolean values). Example: {"crm_id": "A-77"}.
namestring- Customer name. Example: Jane Doe.
tax_idstring- Tax ID of the customer, for example an EU VAT number. Example: FR61954506077.
typestring- individual (default; email required) or team (a business with members). Example: individual.one of
individualteam
polar_customer_session_createCreate a customer portal session so a customer can manage their orders, subscriptions and benefits.WriteCreate Customer Portal Session
Create a customer portal session so a customer can manage their orders, subscriptions and benefits. Returns token, expires_at and customer_portal_url. Use polar_customer_session_create to send a customer a self-service portal link.
Inputs
customer_idstringrequired- Polar customer ID (UUID) to create the session for. Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.
return_urlstring- URL for a back button in the customer portal. Example: https://example.com/account.
polar_customer_updateUpdate a customer's email, name, external ID, billing address, tax ID, locale or metadata.WriteUpdate Customer
Update a customer's email, name, external ID, billing address, tax ID, locale or metadata. Returns the updated customer. Use polar_customer_update to correct customer details.
Inputs
idstringrequired- Polar customer ID (UUID). Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.
billing_addressobject- Billing address with country (ISO 3166-1 alpha-2, required) and optional line1, line2, postal_code, city and state. Example: {"country": "US", "line1": "1 Main St", "city": "Austin", "state": "US-TX", "postal_code": "78701"}.
emailstring- Customer email address, unique in the organization. Required for individual customers. Example: jane@example.com.
external_idstring- The customer's ID in your system; unique and cannot be changed once set. Example: usr_1337.
localestring- Customer locale as a language tag. Example: en.
metadataobject- Key-value metadata to store on the record (string keys up to 40 characters; string, number or boolean values). Example: {"crm_id": "A-77"}.
namestring- Customer name. Example: Jane Doe.
tax_idstring- Tax ID of the customer, for example an EU VAT number. Example: FR61954506077.
polar_discount_createCreate a fixed-amount or percentage discount, optionally with a code customers can enter.WriteCreate Discount
Create a fixed-amount or percentage discount, optionally with a code customers can enter. Returns the discount. Use polar_discount_create for promotions; apply it with a checkout or subscription update.
Inputs
durationstringrequired- For subscriptions: apply once, forever or repeating (set duration_in_months). Example: once.one of
onceforeverrepeating namestringrequired- Discount name shown to customers. Example: Black Friday.
typestringrequired- fixed for an amount off (set amount and currency) or percentage (set basis_points). Example: percentage.one of
fixedpercentage amountinteger- Amount off in cents for a fixed discount. Example: 500.
basis_pointsinteger- Percentage off in basis points for a percentage discount, for example 2500 for 25%. Example: 2500.
codestring- Code customers enter at checkout, 3 to 256 letters and digits. Example: BLACKFRIDAY.
currencystring- Lowercase currency of a fixed discount amount, for example usd. Example: usd.
duration_in_monthsinteger- Months to apply a repeating discount. Example: 3.
ends_atstring- Date-time after which the discount is no longer redeemable (ISO 8601). Example: 2026-12-01T00:00:00Z.
max_redemptionsinteger- Maximum total redemptions. Example: 100.
metadataobject- Key-value metadata to store on the record (string keys up to 40 characters; string, number or boolean values). Example: {"crm_id": "A-77"}.
productsarray- Product IDs the discount applies to; all products when empty. Example: ["d8f6a1c2-5b3e-4f7a-9c1d-2e3f4a5b6c7d"].
starts_atstring- Date-time from which the discount is redeemable (ISO 8601). Example: 2026-11-27T00:00:00Z.
polar_discount_updateUpdate a discount's name, code, dates, redemption limit, products or metadata.WriteUpdate Discount
Update a discount's name, code, dates, redemption limit, products or metadata. Returns the updated discount. Use polar_discount_update to extend or limit a promotion.
Inputs
idstringrequired- Discount ID (UUID). Example: 0b1c2d3e-4f5a-6b7c-8d9e-0f1a2b3c4d5e.
codestring- Code customers enter at checkout. Example: BLACKFRIDAY.
ends_atstring- Date-time after which the discount is no longer redeemable (ISO 8601). Example: 2026-12-02T00:00:00Z.
max_redemptionsinteger- Maximum total redemptions. Example: 200.
metadataobject- Key-value metadata to store on the record (string keys up to 40 characters; string, number or boolean values). Example: {"crm_id": "A-77"}.
namestring- Discount name shown to customers. Example: Black Friday.
productsarray- Product IDs the discount applies to. Example: ["d8f6a1c2-5b3e-4f7a-9c1d-2e3f4a5b6c7d"].
starts_atstring- Date-time from which the discount is redeemable (ISO 8601). Example: 2026-11-27T00:00:00Z.
polar_events_ingestSend usage events for customers, which meters aggregate for usage-based billing.WriteIngest Events
Send usage events for customers, which meters aggregate for usage-based billing. Returns inserted, the number of events stored. Use polar_events_ingest to report usage such as API calls or tokens.
Inputs
eventsarrayrequired- Events, each with name, customer_id or external_customer_id, optional timestamp (ISO 8601) and metadata. Example: [{"name": "api_call", "external_customer_id": "usr_1337", "metadata": {"tokens": 120}}].
polar_license_key_activateActivate a license key on a device or instance, within its activation limit.WriteActivate License Key
Activate a license key on a device or instance, within its activation limit. Returns the activation with id, label and license_key. Use polar_license_key_activate when a customer installs your software; store the activation ID.
Inputs
keystringrequired- The license key. Example: POLAR-1A2B3C-4D5E6F-7A8B9C.
labelstringrequired- Label for the activation, such as the device name. Example: Jane's MacBook.
organization_idstringrequired- Your Polar organization ID (UUID). Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
conditionsobject- Conditions later validations must match. Example: {"major_version": 2}.
metaobject- Extra information to store on the activation. Example: {"os": "macOS"}.
polar_license_key_updateUpdate a license key's status, usage count, limits or expiry.WriteUpdate License Key
Update a license key's status, usage count, limits or expiry. Returns the updated license key. Use polar_license_key_update to revoke or disable a key or raise its limits.
Inputs
idstringrequired- License key ID (UUID). Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
expires_atstring- Expiry date-time (ISO 8601). Example: 2027-12-31T23:59:59Z.
limit_activationsinteger- Maximum activations, 1 to 50. Example: 3.
limit_usageinteger- Maximum usage count. Example: 1000.
statusstring- granted, revoked or disabled. Example: granted.one of
grantedrevokeddisabled usageinteger- Current usage count. Example: 0.
polar_license_key_validateCheck that a license key is valid, optionally for an activation, benefit, customer or conditions, and optionally count usage.WriteValidate License Key
Check that a license key is valid, optionally for an activation, benefit, customer or conditions, and optionally count usage. Returns the license key with status and validations, or 404 if invalid. Use polar_license_key_validate in your app's license check.
Inputs
keystringrequired- The license key the customer entered. Example: POLAR-1A2B3C-4D5E6F-7A8B9C.
organization_idstringrequired- Your Polar organization ID (UUID). Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
activation_idstring- Activation ID to validate against. Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
benefit_idstring- Benefit ID the key must belong to. Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
conditionsobject- Key-value conditions that must match the activation's conditions. Example: {"major_version": 2}.
customer_idstring- Customer ID the key must belong to. Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.
increment_usageinteger- Amount to add to the key's usage count. Example: 1.
polar_meter_createCreate a usage meter that aggregates ingested events for usage-based billing.WriteCreate Meter
Create a usage meter that aggregates ingested events for usage-based billing. Returns the meter. Use polar_meter_create before ingesting events with polar_events_ingest.
Inputs
aggregationobjectrequired- How to combine matching events: {"func": "count"}, or {"func": "sum", "property": "tokens"} (also max, min, avg), or {"func": "unique", "property": "user_id"}. Example: {"func": "count"}.
filterobjectrequired- Which events count: {"conjunction": "and" or "or", "clauses": [{"property": ..., "operator": eq, ne, gt, gte, lt, lte, like or not_like, "value": ...}]}. Example: {"conjunction": "and", "clauses": [{"property": "name", "operator": "eq", "value": "api_call"}]}.
namestringrequired- Meter name shown on invoices and usage. Example: API calls.
custom_labelstring- Label for a custom unit, for example request. Example: request.
metadataobject- Key-value metadata to store on the record (string keys up to 40 characters; string, number or boolean values). Example: {"crm_id": "A-77"}.
unitstring- Display unit: scalar, token or custom (set custom_label). Example: scalar.one of
scalartokencustom
polar_order_invoice_generateStart generating the invoice PDF for a paid order.WriteGenerate Order Invoice
Start generating the invoice PDF for a paid order. Returns 202 Accepted; the invoice is created asynchronously. Use polar_order_invoice_generate once, then fetch the URL with polar_order_invoice_get.
Inputs
idstringrequired- Order ID (UUID). Example: 1d2e3f4a-5b6c-7d8e-9f0a-1b2c3d4e5f6a.
polar_order_updateUpdate the billing name or address shown on an order's invoice.WriteUpdate Order
Update the billing name or address shown on an order's invoice. Returns the updated order. Use polar_order_update before generating the invoice with polar_order_invoice_generate.
Inputs
idstringrequired- Order ID (UUID). Example: 1d2e3f4a-5b6c-7d8e-9f0a-1b2c3d4e5f6a.
billing_addressobject- Address to show on the invoice; country and state cannot change. Example: {"country": "US", "line1": "1 Main St", "city": "Austin", "state": "US-TX", "postal_code": "78701"}.
billing_namestring- Name to show on the invoice. Example: Acme Inc.
polar_product_createCreate a one-time or recurring product with its prices.WriteCreate Product
Create a one-time or recurring product with its prices. Returns the product with id and prices. Use polar_product_create to add something to sell; leave recurring_interval empty for a one-time purchase.
Inputs
namestringrequired- Product name. Example: Pro plan.
pricesarrayrequired- Prices. A fixed price is {"amount_type": "fixed", "price_amount": <cents>, "price_currency": "usd"}; a free price is {"amount_type": "free"}; pay-what-you-want is {"amount_type": "custom"}. Example: [{"amount_type": "fixed", "price_amount": 1900, "price_currency": "usd"}].
descriptionstring- Product description (Markdown). Example: Everything in Basic plus priority support.
metadataobject- Key-value metadata to store on the record (string keys up to 40 characters; string, number or boolean values). Example: {"crm_id": "A-77"}.
recurring_intervalstring- Billing interval for a subscription product; leave empty for a one-time product. Example: month.one of
dayweekmonthyear recurring_interval_countinteger- Number of intervals between charges, for example 3 with month for quarterly. Defaults to 1. Example: 1.
trial_intervalstring- Unit of the free trial period. Example: day.one of
dayweekmonthyear trial_interval_countinteger- Number of trial_interval units, for example 14 days. Example: 14.
visibilitystring- draft, private (only via direct link) or public. Defaults to public. Example: public.one of
draftprivatepublic
polar_product_updateUpdate a product's name, description, prices, visibility or archive it.WriteUpdate Product
Update a product's name, description, prices, visibility or archive it. Returns the updated product. Use polar_product_update to change pricing or archive a product. To keep existing prices, include them as {"id": "<price id>"}.
Inputs
idstringrequired- Product ID (UUID). Example: d8f6a1c2-5b3e-4f7a-9c1d-2e3f4a5b6c7d.
descriptionstring- Product description (Markdown). Example: Everything in Basic plus priority support.
is_archivedboolean- true to archive the product so it can no longer be bought. Example: false.
metadataobject- Key-value metadata to store on the record (string keys up to 40 characters; string, number or boolean values). Example: {"crm_id": "A-77"}.
namestring- Product name. Example: Pro plan.
pricesarray- The full new list of prices. Keep an existing price with {"id": "<price id>"}; add one with a price object. Example: [{"id": "3f6a1b2c-0000-4000-8000-000000000001"}, {"amount_type": "fixed", "price_amount": 2900, "price_currency": "usd"}].
trial_intervalstring- Unit of the free trial period. Example: day.one of
dayweekmonthyear trial_interval_countinteger- Number of trial_interval units, for example 14 days. Example: 14.
visibilitystring- draft, private or public. Example: public.one of
draftprivatepublic
polar_refund_createRefund part or all of an order.WriteCreate Refund
Refund part or all of an order. Returns the refund with id, status and amount. Use polar_refund_create to give money back; set revoke_benefits to also remove access.
Inputs
amountintegerrequired- Amount to refund in cents, at least 1 and no more than the refundable amount. Example: 1900.
order_idstringrequired- ID of the order to refund. Example: 1d2e3f4a-5b6c-7d8e-9f0a-1b2c3d4e5f6a.
reasonstringrequired- Reason for the refund. Example: customer_request.one of
duplicatefraudulentcustomer_requestservice_disruptionsatisfaction_guaranteedispute_preventiontax_refundvat_reverse_charge_correctionother commentstring- Internal comment. Example: Refunded after support ticket 4411.
metadataobject- Key-value metadata to store on the record (string keys up to 40 characters; string, number or boolean values). Example: {"crm_id": "A-77"}.
revoke_benefitsboolean- true to also revoke the customer's benefits (full refunds of one-time purchases only). Example: false.
polar_subscription_createCreate a subscription to a free recurring product for a customer.WriteCreate Subscription
Create a subscription to a free recurring product for a customer. Returns the subscription. Use polar_subscription_create only for free products; paid products need polar_checkout_create.
Inputs
customer_idstringrequired- Polar customer ID (UUID). Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.
product_idstringrequired- ID of the free recurring product. Example: d8f6a1c2-5b3e-4f7a-9c1d-2e3f4a5b6c7d.
metadataobject- Key-value metadata to store on the record (string keys up to 40 characters; string, number or boolean values). Example: {"crm_id": "A-77"}.
polar_subscription_updateChange a subscription: switch product, apply a discount, set seats, schedule cancellation at period end or undo it.WriteUpdate Subscription
Change a subscription: switch product, apply a discount, set seats, schedule cancellation at period end or undo it. Returns the updated subscription. Use polar_subscription_update for plan changes and scheduled cancellation. Use polar_subscription_revoke to end it immediately. Send one kind of change per call.
Inputs
idstringrequired- Subscription ID (UUID). Example: 5a6b7c8d-9e0f-1a2b-3c4d-5e6f7a8b9c0d.
cancel_at_period_endboolean- true to cancel when the current period ends, false to undo a scheduled cancellation. Example: true.
customer_cancellation_commentstring- The customer's feedback on why they cancel. Example: Moving to an annual plan elsewhere.
customer_cancellation_reasonstring- Reason for cancelling. Example: too_expensive.one of
customer_servicelow_qualitymissing_featuresswitched_servicetoo_complextoo_expensiveunusedother discount_idstring- Discount ID to apply. Example: 0b1c2d3e-4f5a-6b7c-8d9e-0f1a2b3c4d5e.
metadataobject- Key-value metadata to store on the record (string keys up to 40 characters; string, number or boolean values). Example: {"crm_id": "A-77"}.
product_idstring- Product ID to switch the subscription to. Example: d8f6a1c2-5b3e-4f7a-9c1d-2e3f4a5b6c7d.
proration_behaviorstring- How to bill a product or seat change: invoice now, prorate on the next invoice, next_period or reset. Defaults to the organization setting. Example: prorate.one of
invoiceproratenext_periodreset seatsinteger- New number of seats (seat-based pricing only). Example: 5.
polar_checkout_link_deleteDelete a checkout link so it can no longer be used.DestructiveDelete Checkout Link
Delete a checkout link so it can no longer be used. Returns 204 No Content. Use polar_checkout_link_delete to retire a payment link.
- Idempotent
Inputs
idstringrequired- Checkout link ID (UUID). Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
polar_customer_deleteDelete a customer; their subscriptions are cancelled and benefits revoked immediately.DestructiveDelete Customer
Delete a customer; their subscriptions are cancelled and benefits revoked immediately. Returns 204 No Content. Use polar_customer_delete only when a customer must be removed.
- Idempotent
Inputs
idstringrequired- Polar customer ID (UUID). Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.
polar_discount_deleteDelete a discount.DestructiveDelete Discount
Delete a discount. Returns 204 No Content. Use polar_discount_delete to end a promotion permanently.
- Idempotent
Inputs
idstringrequired- Discount ID (UUID). Example: 0b1c2d3e-4f5a-6b7c-8d9e-0f1a2b3c4d5e.
polar_license_key_deactivateRemove an activation from a license key, freeing a slot.DestructiveDeactivate License Key
Remove an activation from a license key, freeing a slot. Returns 204 No Content. Use polar_license_key_deactivate when a customer uninstalls your software.
Inputs
activation_idstringrequired- ID of the activation to remove. Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
keystringrequired- The license key. Example: POLAR-1A2B3C-4D5E6F-7A8B9C.
organization_idstringrequired- Your Polar organization ID (UUID). Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
polar_subscription_revokeCancel a subscription immediately and revoke its benefits.DestructiveRevoke Subscription
Cancel a subscription immediately and revoke its benefits. Returns the revoked subscription. Use polar_subscription_revoke to end access now. Use polar_subscription_update with cancel_at_period_end to cancel at renewal.
- Idempotent
Inputs
idstringrequired- Subscription ID (UUID). Example: 5a6b7c8d-9e0f-1a2b-3c4d-5e6f7a8b9c0d.
No tools match.