> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended** (the `-y` flags skip prompts, so the command runs without an interactive terminal):
> ```bash
> npx -y @scalekit-inc/cli setup -y
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup -y
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for other Agent Skills-compatible agents in `~/.agents/skills`.
> Skills: integrate-agentkit, implement-saaskit, add-mcp-oauth, implement-sso, implement-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Connect AI agents to Polar

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.

**Authentication:** Bearer Token
**Categories:** Accounting & Finance
**Tools:** 60: 36 read, 19 write, 5 destructive
**Users sign in with:** Access token
**Built by:** Scalekit connector
**Try it:** [Playground in the Scalekit dashboard](https://app.scalekit.com/ws/signup?sk_intent=playground&provider=POLAR)

## Setup

1. ### Install the SDK

   **Node.js**

   ```bash
   npm install @scalekit-sdk/node dotenv
   ```

   **Python**

   ```bash
   pip install scalekit-sdk-python python-dotenv
   ```

2. ### Set your credentials

   Add your Scalekit credentials to your `.env` file. Find values in **[app.scalekit.com](https://app.scalekit.com)** > **Developers** > **API Credentials**.

   ```sh title=".env"
   SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
   SCALEKIT_CLIENT_ID=<your-client-id>
   SCALEKIT_CLIENT_SECRET=<your-client-secret>
   ```

3. ### Create the Polar connection

   In **AgentKit > Connections**, create a Polar connection. The name you give it is the `connection_name` your code passes. See [Configure connections](/agentkit/connections/).

4. ### Authorize a user and make your first call

   **Node.js** (`quickstart.mts`)

   ```typescript
   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.actions

   const connector = 'polar'
   const identifier = 'user_123'

   // Generate an authorization link for the user
   const { 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 call
   const result = await actions.executeTool({
     connector,
     identifier,
     toolName: 'polar_benefits_list',
     toolInput: {},
   })
   console.log(result)
   ```

   ```bash
   npx tsx quickstart.mts
   ```

   **Python** (`quickstart.py`)

   ```python
   import os
   from scalekit import ScalekitClient
   from dotenv import load_dotenv
   load_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.actions

   connection_name = "polar"
   identifier = "user_123"

   # Generate an authorization link for the user
   link_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 call
   result = actions.execute_tool(
       tool_input={},
       tool_name="polar_benefits_list",
       connection_name=connection_name,
       identifier=identifier,
   )
   print(result)
   ```

   ```bash
   python quickstart.py
   ```

   Each user opens the link once and enters their Polar credentials there. See [Authorize a user](/agentkit/tools/authorize/) for the full flow and statuses.

## Tools

Pass the exact name to `execute_tool`, with an input like each tool's example. To ask for a tool that's missing, use the [request form](https://scalekitsupport.portal.usepylon.com/forms/request-a-connector-tool).

**Node.js**

```typescript
const result = await actions.executeTool({
  toolName: 'polar_benefit_get',
  toolInput: {
    id: '<id>',
  },
  connector: 'polar',
  identifier: 'user_123',
})
```

**Python**

```python
result = actions.execute_tool(
    tool_name="polar_benefit_get",
    tool_input={
        "id": "<id>",
    },
    connection_name="polar",
    identifier="user_123",
)
```

`result.data` is the app's response as JSON, and `result.execution_id` (`executionId` in Node.js) is the ID of the call.

### `polar_benefit_get`

Get Benefit · Read-only

Get a benefit by ID.
Returns the benefit with type, description and type-specific properties.
Use polar_benefit_get when you have the ID.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `id` (`string`, required): Benefit ID (UUID). Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.

Example input: `{"id":"<id>"}`

### `polar_benefit_grants_list`

List Benefit Grants · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `id` (`string`, required): Benefit ID (UUID). Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
- `customer_id` (`string`, optional): Only grants of this customer ID. Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.
- `is_granted` (`boolean`, optional): true for current grants, false for revoked. Example: true.
- `limit` (`integer`, optional): Page size, up to 100. Defaults to 10. Example: 50.
- `page` (`integer`, optional): Page number, starting at 1. Defaults to 1. Example: 1.

Example input: `{"id":"<id>"}`

### `polar_benefits_list`

List Benefits · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `limit` (`integer`, optional): Page size, up to 100. Defaults to 10. Example: 50.
- `page` (`integer`, optional): Page number, starting at 1. Defaults to 1. Example: 1.
- `query` (`string`, optional): Text to match against the description. Example: Pro license.
- `sorting` (`string`, optional): Sort criterion; prefix with - for descending, for example -created_at. Example: -created_at.
- `type` (`string`, optional): Benefit type. Example: license_keys. One of: `custom`, `discord`, `github_repository`, `downloadables`, `license_keys`, `meter_credit`, `feature_flag`, `slack_shared_channel`.

Example input: `{}`

### `polar_checkout_get`

Get Checkout Session · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `id` (`string`, required): Checkout session ID (UUID). Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.

Example input: `{"id":"<id>"}`

### `polar_checkout_link_get`

Get Checkout Link · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `id` (`string`, required): Checkout link ID (UUID). Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.

Example input: `{"id":"<id>"}`

### `polar_checkout_links_list`

List Checkout Links · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `limit` (`integer`, optional): Page size, up to 100. Defaults to 10. Example: 50.
- `page` (`integer`, optional): Page number, starting at 1. Defaults to 1. Example: 1.
- `product_id` (`string`, optional): Only links for this product ID. Example: d8f6a1c2-5b3e-4f7a-9c1d-2e3f4a5b6c7d.
- `sorting` (`string`, optional): Sort criterion; prefix with - for descending, for example -created_at. Example: -created_at.

Example input: `{}`

### `polar_checkouts_list`

List Checkout Sessions · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `customer_id` (`string`, optional): Only checkouts for this customer ID. Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.
- `external_customer_id` (`string`, optional): Only checkouts for this external customer ID. Example: usr_1337.
- `limit` (`integer`, optional): Page size, up to 100. Defaults to 10. Example: 50.
- `page` (`integer`, optional): Page number, starting at 1. Defaults to 1. Example: 1.
- `product_id` (`string`, optional): Only checkouts for this product ID. Example: d8f6a1c2-5b3e-4f7a-9c1d-2e3f4a5b6c7d.
- `query` (`string`, optional): Customer email to filter by. Example: jane@example.com.
- `sorting` (`string`, optional): Sort criterion; prefix with - for descending, for example -created_at. Example: -created_at.
- `status` (`string`, optional): Checkout status. Example: open. One of: `open`, `expired`, `confirmed`, `succeeded`, `failed`.

Example input: `{}`

### `polar_customer_get`

Get Customer · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `id` (`string`, required): Polar customer ID (UUID). Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.

Example input: `{"id":"<id>"}`

### `polar_customer_get_by_external_id`

Get Customer by External ID · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `external_id` (`string`, required): The customer's ID in your system. Example: usr_1337.

Example input: `{"external_id":"<external_id>"}`

### `polar_customer_meters_list`

List Customer Meters · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `customer_id` (`string`, optional): Only meters of this customer ID. Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.
- `external_customer_id` (`string`, optional): Only meters of this external customer ID. Example: usr_1337.
- `limit` (`integer`, optional): Page size, up to 100. Defaults to 10. Example: 50.
- `meter_id` (`string`, optional): Only this meter ID. Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
- `page` (`integer`, optional): Page number, starting at 1. Defaults to 1. Example: 1.
- `sorting` (`string`, optional): Sort criterion; prefix with - for descending, for example -created_at. Example: -created_at.

Example input: `{}`

### `polar_customer_payment_methods_list`

List Customer Payment Methods · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `id` (`string`, required): Polar customer ID (UUID). Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.
- `limit` (`integer`, optional): Page size, up to 100. Defaults to 10. Example: 50.
- `page` (`integer`, optional): Page number, starting at 1. Defaults to 1. Example: 1.

Example input: `{"id":"<id>"}`

### `polar_customer_state_get`

Get Customer State · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `id` (`string`, required): Polar customer ID (UUID). Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.

Example input: `{"id":"<id>"}`

### `polar_customers_list`

List Customers · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `active` (`boolean`, optional): true for customers with at least one trialing, active or past_due subscription. Example: true.
- `email` (`string`, optional): Exact email address to filter by. Example: jane@example.com.
- `limit` (`integer`, optional): Page size, up to 100. Defaults to 10. Example: 50.
- `page` (`integer`, optional): Page number, starting at 1. Defaults to 1. Example: 1.
- `query` (`string`, optional): Text to match against name, email or external ID. Example: jane.
- `sorting` (`string`, optional): Sort criterion; prefix with - for descending, for example -created_at. Example: -created_at.

Example input: `{}`

### `polar_discount_get`

Get Discount · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `id` (`string`, required): Discount ID (UUID). Example: 0b1c2d3e-4f5a-6b7c-8d9e-0f1a2b3c4d5e.

Example input: `{"id":"<id>"}`

### `polar_discounts_list`

List Discounts · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `limit` (`integer`, optional): Page size, up to 100. Defaults to 10. Example: 50.
- `page` (`integer`, optional): Page number, starting at 1. Defaults to 1. Example: 1.
- `query` (`string`, optional): Text to match against the discount name or code. Example: BLACKFRIDAY.
- `sorting` (`string`, optional): Sort criterion; prefix with - for descending, for example -created_at. Example: -created_at.

Example input: `{}`

### `polar_dispute_get`

Get Dispute · Read-only

Get a dispute by ID.
Returns the dispute with status, amount, order and payment.
Use polar_dispute_get when you have the ID.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `id` (`string`, required): Dispute ID (UUID). Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.

Example input: `{"id":"<id>"}`

### `polar_disputes_list`

List Disputes · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `limit` (`integer`, optional): Page size, up to 100. Defaults to 10. Example: 50.
- `order_id` (`string`, optional): Only disputes of this order ID. Example: 1d2e3f4a-5b6c-7d8e-9f0a-1b2c3d4e5f6a.
- `page` (`integer`, optional): Page number, starting at 1. Defaults to 1. Example: 1.
- `sorting` (`string`, optional): Sort criterion; prefix with - for descending, for example -created_at. Example: -created_at.
- `status` (`string`, optional): Dispute status. Example: needs_response. One of: `prevented`, `early_warning`, `needs_response`, `under_review`, `lost`, `won`.

Example input: `{}`

### `polar_events_list`

List Events · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `customer_id` (`string`, optional): Only events of this customer ID. Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.
- `end_timestamp` (`string`, optional): Only events before this date-time (ISO 8601). Example: 2026-11-30T23:59:59Z.
- `external_customer_id` (`string`, optional): Only events of this external customer ID. Example: usr_1337.
- `limit` (`integer`, optional): Page size, up to 100. Defaults to 10. Example: 50.
- `meter_id` (`string`, optional): Only events matching this meter ID. Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
- `name` (`string`, optional): Only events with this name. Example: api_call.
- `page` (`integer`, optional): Page number, starting at 1. Defaults to 1. Example: 1.
- `sorting` (`string`, optional): Sort criterion; prefix with - for descending, for example -created_at. Example: -timestamp.
- `source` (`string`, optional): system for Polar events, user for ingested events. Example: user. One of: `system`, `user`.
- `start_timestamp` (`string`, optional): Only events after this date-time (ISO 8601). Example: 2026-11-01T00:00:00Z.

Example input: `{}`

### `polar_license_key_get`

Get License Key · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `id` (`string`, required): License key ID (UUID). Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.

Example input: `{"id":"<id>"}`

### `polar_license_keys_list`

List License Keys · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `benefit_id` (`string`, optional): Only keys granted by this license key benefit ID. Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
- `limit` (`integer`, optional): Page size, up to 100. Defaults to 10. Example: 50.
- `page` (`integer`, optional): Page number, starting at 1. Defaults to 1. Example: 1.

Example input: `{}`

### `polar_meter_get`

Get Meter · Read-only

Get a meter by ID.
Returns the meter with name, unit, filter and aggregation.
Use polar_meter_get when you have the ID.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `id` (`string`, required): Meter ID (UUID). Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.

Example input: `{"id":"<id>"}`

### `polar_meter_quantities_get`

Get Meter Quantities · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `end_timestamp` (`string`, required): End of the range (ISO 8601 date-time). Example: 2026-11-30T23:59:59Z.
- `id` (`string`, required): Meter ID (UUID). Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
- `interval` (`string`, required): Bucket size. Example: day. One of: `hour`, `day`, `week`, `month`, `year`.
- `start_timestamp` (`string`, required): Start of the range (ISO 8601 date-time). Example: 2026-11-01T00:00:00Z.
- `customer_id` (`string`, optional): Only usage of this customer ID. Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.
- `external_customer_id` (`string`, optional): Only usage of this external customer ID. Example: usr_1337.

Example input: `{"end_timestamp":"<end_timestamp>","id":"<id>","interval":"hour","start_timestamp":"<start_timestamp>"}`

### `polar_meters_list`

List Meters · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `is_archived` (`boolean`, optional): true for archived meters only. Example: false.
- `limit` (`integer`, optional): Page size, up to 100. Defaults to 10. Example: 50.
- `page` (`integer`, optional): Page number, starting at 1. Defaults to 1. Example: 1.
- `query` (`string`, optional): Text to match against the meter name. Example: API calls.
- `sorting` (`string`, optional): Sort criterion; prefix with - for descending, for example -created_at. Example: -created_at.

Example input: `{}`

### `polar_metrics_get`

Get Metrics · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `end_date` (`string`, required): End date (YYYY-MM-DD). Example: 2026-11-30.
- `interval` (`string`, required): Period size. Example: day. One of: `year`, `month`, `week`, `day`, `hour`.
- `start_date` (`string`, required): Start date (YYYY-MM-DD). Example: 2026-11-01.
- `billing_type` (`string`, optional): one_time or recurring products only. Example: recurring. One of: `one_time`, `recurring`.
- `customer_id` (`string`, optional): Only metrics for this customer ID. Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.
- `product_id` (`string`, optional): Only metrics for this product ID. Example: d8f6a1c2-5b3e-4f7a-9c1d-2e3f4a5b6c7d.
- `timezone` (`string`, optional): IANA timezone for the periods. Defaults to UTC. Example: Europe/Paris.

Example input: `{"end_date":"<end_date>","interval":"year","start_date":"<start_date>"}`

### `polar_order_get`

Get Order · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `id` (`string`, required): Order ID (UUID). Example: 1d2e3f4a-5b6c-7d8e-9f0a-1b2c3d4e5f6a.

Example input: `{"id":"<id>"}`

### `polar_order_invoice_get`

Get Order Invoice · Read-only

Get the download URL of an order's invoice.
Returns url.
Use polar_order_invoice_get after polar_order_invoice_generate.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `id` (`string`, required): Order ID (UUID). Example: 1d2e3f4a-5b6c-7d8e-9f0a-1b2c3d4e5f6a.

Example input: `{"id":"<id>"}`

### `polar_orders_list`

List Orders · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `checkout_id` (`string`, optional): Only orders from this checkout ID. Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
- `customer_id` (`string`, optional): Only orders of this customer ID. Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.
- `discount_id` (`string`, optional): Only orders using this discount ID. Example: 0b1c2d3e-4f5a-6b7c-8d9e-0f1a2b3c4d5e.
- `external_customer_id` (`string`, optional): Only orders of this external customer ID. Example: usr_1337.
- `limit` (`integer`, optional): Page size, up to 100. Defaults to 10. Example: 50.
- `page` (`integer`, optional): Page number, starting at 1. Defaults to 1. Example: 1.
- `product_billing_type` (`string`, optional): one_time for one-time purchases, recurring for subscription creations and renewals. Example: recurring. One of: `one_time`, `recurring`.
- `product_id` (`string`, optional): Only orders for this product ID. Example: d8f6a1c2-5b3e-4f7a-9c1d-2e3f4a5b6c7d.
- `sorting` (`string`, optional): Sort criterion; prefix with - for descending, for example -created_at. Example: -created_at.
- `status` (`string`, optional): Order status. Example: paid. One of: `draft`, `pending`, `paid`, `refunded`, `partially_refunded`, `void`.
- `subscription_id` (`string`, optional): Only orders of this subscription ID. Example: 5a6b7c8d-9e0f-1a2b-3c4d-5e6f7a8b9c0d.

Example input: `{}`

### `polar_organization_get`

Get Organization · Read-only

Get an organization by ID.
Returns the organization with name, slug, settings and feature flags.
Use polar_organization_get to read organization settings.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `id` (`string`, required): Organization ID (UUID). Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.

Example input: `{"id":"<id>"}`

### `polar_organizations_list`

List Organizations · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `limit` (`integer`, optional): Page size, up to 100. Defaults to 10. Example: 50.
- `page` (`integer`, optional): Page number, starting at 1. Defaults to 1. Example: 1.
- `slug` (`string`, optional): Organization slug to filter by. Example: acme.
- `sorting` (`string`, optional): Sort criterion; prefix with - for descending, for example -created_at. Example: -created_at.

Example input: `{}`

### `polar_payment_get`

Get Payment · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `id` (`string`, required): Payment ID (UUID). Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.

Example input: `{"id":"<id>"}`

### `polar_payments_list`

List Payments · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `checkout_id` (`string`, optional): Only payments of this checkout ID. Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
- `customer_id` (`string`, optional): Only payments of this customer ID. Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.
- `limit` (`integer`, optional): Page size, up to 100. Defaults to 10. Example: 50.
- `method` (`string`, optional): Payment method, for example card. Example: card.
- `order_id` (`string`, optional): Only payments of this order ID. Example: 1d2e3f4a-5b6c-7d8e-9f0a-1b2c3d4e5f6a.
- `page` (`integer`, optional): Page number, starting at 1. Defaults to 1. Example: 1.
- `sorting` (`string`, optional): Sort criterion; prefix with - for descending, for example -created_at. Example: -created_at.
- `status` (`string`, optional): Payment status. Example: failed. One of: `pending`, `succeeded`, `failed`.

Example input: `{}`

### `polar_product_get`

Get Product · Read-only

Get a product by ID.
Returns the product with prices, benefits, medias and custom fields.
Use polar_product_get when you have the ID.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `id` (`string`, required): Product ID (UUID). Example: d8f6a1c2-5b3e-4f7a-9c1d-2e3f4a5b6c7d.

Example input: `{"id":"<id>"}`

### `polar_products_list`

List Products · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `benefit_id` (`string`, optional): Only products granting this benefit ID. Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
- `is_archived` (`boolean`, optional): true for archived products only, false for active. Example: false.
- `is_recurring` (`boolean`, optional): true for subscription products, false for one-time purchases. Example: true.
- `limit` (`integer`, optional): Page size, up to 100. Defaults to 10. Example: 50.
- `page` (`integer`, optional): Page number, starting at 1. Defaults to 1. Example: 1.
- `query` (`string`, optional): Text to match against the product name. Example: Pro.
- `sorting` (`string`, optional): Sort criterion; prefix with - for descending, for example -created_at. Example: -created_at.
- `visibility` (`string`, optional): Product visibility. Example: public. One of: `draft`, `private`, `public`.

Example input: `{}`

### `polar_refunds_list`

List Refunds · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `customer_id` (`string`, optional): Only refunds of this customer ID. Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.
- `limit` (`integer`, optional): Page size, up to 100. Defaults to 10. Example: 50.
- `order_id` (`string`, optional): Only refunds of this order ID. Example: 1d2e3f4a-5b6c-7d8e-9f0a-1b2c3d4e5f6a.
- `page` (`integer`, optional): Page number, starting at 1. Defaults to 1. Example: 1.
- `sorting` (`string`, optional): Sort criterion; prefix with - for descending, for example -created_at. Example: -created_at.
- `subscription_id` (`string`, optional): Only refunds of this subscription ID. Example: 5a6b7c8d-9e0f-1a2b-3c4d-5e6f7a8b9c0d.
- `succeeded` (`boolean`, optional): true for succeeded refunds only. Example: true.

Example input: `{}`

### `polar_subscription_get`

Get Subscription · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `id` (`string`, required): Subscription ID (UUID). Example: 5a6b7c8d-9e0f-1a2b-3c4d-5e6f7a8b9c0d.

Example input: `{"id":"<id>"}`

### `polar_subscriptions_list`

List Subscriptions · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `active` (`boolean`, optional): true for active subscriptions, false for inactive. Example: true.
- `cancel_at_period_end` (`boolean`, optional): true for subscriptions set to cancel at period end. Example: false.
- `customer_id` (`string`, optional): Only subscriptions of this customer ID. Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.
- `external_customer_id` (`string`, optional): Only subscriptions of this external customer ID. Example: usr_1337.
- `limit` (`integer`, optional): Page size, up to 100. Defaults to 10. Example: 50.
- `page` (`integer`, optional): Page number, starting at 1. Defaults to 1. Example: 1.
- `product_id` (`string`, optional): Only subscriptions to this product ID. Example: d8f6a1c2-5b3e-4f7a-9c1d-2e3f4a5b6c7d.
- `sorting` (`string`, optional): Sort criterion; prefix with - for descending, for example -created_at. Example: -started_at.
- `status` (`string`, optional): Subscription status. Example: active. One of: `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, `unpaid`, `paused`.

Example input: `{}`

### `polar_checkout_create`

Create Checkout Session · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `products` (`array`, required): Product IDs offered at checkout; the first is selected by default. Example: ["d8f6a1c2-5b3e-4f7a-9c1d-2e3f4a5b6c7d"].
- `allow_discount_codes` (`boolean`, optional): Let the customer enter a discount code. Defaults to true. Example: true.
- `amount` (`integer`, optional): Amount in cents for a pay-what-you-want price. Example: 1500.
- `customer_email` (`string`, optional): Email to pre-fill. Example: jane@example.com.
- `customer_id` (`string`, optional): ID of an existing Polar customer to pre-fill. Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.
- `customer_metadata` (`object`, optional): Metadata copied to the customer created by the checkout. Example: {"plan_source": "website"}.
- `customer_name` (`string`, optional): Name to pre-fill. Example: Jane Doe.
- `discount_id` (`string`, optional): ID of a discount to apply. Example: 0b1c2d3e-4f5a-6b7c-8d9e-0f1a2b3c4d5e.
- `external_customer_id` (`string`, optional): Your ID for the customer; the order is linked to the matching or a new customer. Example: usr_1337.
- `metadata` (`object`, optional): 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_url` (`string`, optional): URL for a back button in the checkout. Example: https://example.com/pricing.
- `success_url` (`string`, optional): Redirect URL after payment; may include {CHECKOUT_ID}. Example: https://example.com/thanks?checkout_id={CHECKOUT_ID}
- `trial_interval` (`string`, optional): Unit of the free trial period. Example: day. One of: `day`, `week`, `month`, `year`.
- `trial_interval_count` (`integer`, optional): Number of trial_interval units, for example 14 days. Example: 14.

Example input: `{"products":["d8f6a1c2-5b3e-4f7a-9c1d-2e3f4a5b6c7d"]}`

### `polar_checkout_link_create`

Create Checkout Link · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `products` (`array`, required): Product IDs available on the link. Example: ["d8f6a1c2-5b3e-4f7a-9c1d-2e3f4a5b6c7d"].
- `allow_discount_codes` (`boolean`, optional): Let customers enter discount codes. Defaults to true. Example: true.
- `discount_id` (`string`, optional): ID of a discount to apply. Example: 0b1c2d3e-4f5a-6b7c-8d9e-0f1a2b3c4d5e.
- `label` (`string`, optional): Internal label for the link. Example: Pricing page - Pro.
- `metadata` (`object`, optional): 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_address` (`boolean`, optional): Require a full billing address. Example: false.
- `success_url` (`string`, optional): Redirect URL after payment. Example: https://example.com/thanks.
- `trial_interval` (`string`, optional): Unit of the free trial period. Example: day. One of: `day`, `week`, `month`, `year`.
- `trial_interval_count` (`integer`, optional): Number of trial_interval units, for example 14 days. Example: 14.

Example input: `{"products":["d8f6a1c2-5b3e-4f7a-9c1d-2e3f4a5b6c7d"]}`

### `polar_customer_create`

Create Customer · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `billing_address` (`object`, optional): 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"}.
- `email` (`string`, optional): Customer email address, unique in the organization. Required for individual customers. Example: jane@example.com.
- `external_id` (`string`, optional): The customer's ID in your system; unique and cannot be changed once set. Example: usr_1337.
- `locale` (`string`, optional): Customer locale as a language tag. Example: en.
- `metadata` (`object`, optional): Key-value metadata to store on the record (string keys up to 40 characters; string, number or boolean values). Example: {"crm_id": "A-77"}.
- `name` (`string`, optional): Customer name. Example: Jane Doe.
- `tax_id` (`string`, optional): Tax ID of the customer, for example an EU VAT number. Example: FR61954506077.
- `type` (`string`, optional): individual (default; email required) or team (a business with members). Example: individual. One of: `individual`, `team`.

Example input: `{}`

### `polar_customer_session_create`

Create Customer Portal Session · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `customer_id` (`string`, required): Polar customer ID (UUID) to create the session for. Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.
- `return_url` (`string`, optional): URL for a back button in the customer portal. Example: https://example.com/account.

Example input: `{"customer_id":"<customer_id>"}`

### `polar_customer_update`

Update Customer · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `id` (`string`, required): Polar customer ID (UUID). Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.
- `billing_address` (`object`, optional): 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"}.
- `email` (`string`, optional): Customer email address, unique in the organization. Required for individual customers. Example: jane@example.com.
- `external_id` (`string`, optional): The customer's ID in your system; unique and cannot be changed once set. Example: usr_1337.
- `locale` (`string`, optional): Customer locale as a language tag. Example: en.
- `metadata` (`object`, optional): Key-value metadata to store on the record (string keys up to 40 characters; string, number or boolean values). Example: {"crm_id": "A-77"}.
- `name` (`string`, optional): Customer name. Example: Jane Doe.
- `tax_id` (`string`, optional): Tax ID of the customer, for example an EU VAT number. Example: FR61954506077.

Example input: `{"id":"<id>"}`

### `polar_discount_create`

Create Discount · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `duration` (`string`, required): For subscriptions: apply once, forever or repeating (set duration_in_months). Example: once. One of: `once`, `forever`, `repeating`.
- `name` (`string`, required): Discount name shown to customers. Example: Black Friday.
- `type` (`string`, required): fixed for an amount off (set amount and currency) or percentage (set basis_points). Example: percentage. One of: `fixed`, `percentage`.
- `amount` (`integer`, optional): Amount off in cents for a fixed discount. Example: 500.
- `basis_points` (`integer`, optional): Percentage off in basis points for a percentage discount, for example 2500 for 25%. Example: 2500.
- `code` (`string`, optional): Code customers enter at checkout, 3 to 256 letters and digits. Example: BLACKFRIDAY.
- `currency` (`string`, optional): Lowercase currency of a fixed discount amount, for example usd. Example: usd.
- `duration_in_months` (`integer`, optional): Months to apply a repeating discount. Example: 3.
- `ends_at` (`string`, optional): Date-time after which the discount is no longer redeemable (ISO 8601). Example: 2026-12-01T00:00:00Z.
- `max_redemptions` (`integer`, optional): Maximum total redemptions. Example: 100.
- `metadata` (`object`, optional): Key-value metadata to store on the record (string keys up to 40 characters; string, number or boolean values). Example: {"crm_id": "A-77"}.
- `products` (`array`, optional): Product IDs the discount applies to; all products when empty. Example: ["d8f6a1c2-5b3e-4f7a-9c1d-2e3f4a5b6c7d"].
- `starts_at` (`string`, optional): Date-time from which the discount is redeemable (ISO 8601). Example: 2026-11-27T00:00:00Z.

Example input: `{"duration":"once","name":"<name>","type":"fixed"}`

### `polar_discount_update`

Update Discount · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `id` (`string`, required): Discount ID (UUID). Example: 0b1c2d3e-4f5a-6b7c-8d9e-0f1a2b3c4d5e.
- `code` (`string`, optional): Code customers enter at checkout. Example: BLACKFRIDAY.
- `ends_at` (`string`, optional): Date-time after which the discount is no longer redeemable (ISO 8601). Example: 2026-12-02T00:00:00Z.
- `max_redemptions` (`integer`, optional): Maximum total redemptions. Example: 200.
- `metadata` (`object`, optional): Key-value metadata to store on the record (string keys up to 40 characters; string, number or boolean values). Example: {"crm_id": "A-77"}.
- `name` (`string`, optional): Discount name shown to customers. Example: Black Friday.
- `products` (`array`, optional): Product IDs the discount applies to. Example: ["d8f6a1c2-5b3e-4f7a-9c1d-2e3f4a5b6c7d"].
- `starts_at` (`string`, optional): Date-time from which the discount is redeemable (ISO 8601). Example: 2026-11-27T00:00:00Z.

Example input: `{"id":"<id>"}`

### `polar_events_ingest`

Ingest Events · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `events` (`array`, required): 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}}].

Example input: `{"events":[{"name":"api_call","external_customer_id":"usr_1337","metadata":{"tokens":120}}]}`

### `polar_license_key_activate`

Activate License Key · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `key` (`string`, required): The license key. Example: POLAR-1A2B3C-4D5E6F-7A8B9C.
- `label` (`string`, required): Label for the activation, such as the device name. Example: Jane's MacBook.
- `organization_id` (`string`, required): Your Polar organization ID (UUID). Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
- `conditions` (`object`, optional): Conditions later validations must match. Example: {"major_version": 2}.
- `meta` (`object`, optional): Extra information to store on the activation. Example: {"os": "macOS"}.

Example input: `{"key":"<key>","label":"<label>","organization_id":"<organization_id>"}`

### `polar_license_key_update`

Update License Key · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `id` (`string`, required): License key ID (UUID). Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
- `expires_at` (`string`, optional): Expiry date-time (ISO 8601). Example: 2027-12-31T23:59:59Z.
- `limit_activations` (`integer`, optional): Maximum activations, 1 to 50. Example: 3.
- `limit_usage` (`integer`, optional): Maximum usage count. Example: 1000.
- `status` (`string`, optional): granted, revoked or disabled. Example: granted. One of: `granted`, `revoked`, `disabled`.
- `usage` (`integer`, optional): Current usage count. Example: 0.

Example input: `{"id":"<id>"}`

### `polar_license_key_validate`

Validate License Key · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `key` (`string`, required): The license key the customer entered. Example: POLAR-1A2B3C-4D5E6F-7A8B9C.
- `organization_id` (`string`, required): Your Polar organization ID (UUID). Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
- `activation_id` (`string`, optional): Activation ID to validate against. Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
- `benefit_id` (`string`, optional): Benefit ID the key must belong to. Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
- `conditions` (`object`, optional): Key-value conditions that must match the activation's conditions. Example: {"major_version": 2}.
- `customer_id` (`string`, optional): Customer ID the key must belong to. Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.
- `increment_usage` (`integer`, optional): Amount to add to the key's usage count. Example: 1.

Example input: `{"key":"<key>","organization_id":"<organization_id>"}`

### `polar_meter_create`

Create Meter · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `aggregation` (`object`, required): 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"}.
- `filter` (`object`, required): 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"}]}.
- `name` (`string`, required): Meter name shown on invoices and usage. Example: API calls.
- `custom_label` (`string`, optional): Label for a custom unit, for example request. Example: request.
- `metadata` (`object`, optional): Key-value metadata to store on the record (string keys up to 40 characters; string, number or boolean values). Example: {"crm_id": "A-77"}.
- `unit` (`string`, optional): Display unit: scalar, token or custom (set custom_label). Example: scalar. One of: `scalar`, `token`, `custom`.

Example input: `{"aggregation":{"func":"count"},"filter":{},"name":"<name>"}`

### `polar_order_invoice_generate`

Generate Order Invoice · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `id` (`string`, required): Order ID (UUID). Example: 1d2e3f4a-5b6c-7d8e-9f0a-1b2c3d4e5f6a.

Example input: `{"id":"<id>"}`

### `polar_order_update`

Update Order · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `id` (`string`, required): Order ID (UUID). Example: 1d2e3f4a-5b6c-7d8e-9f0a-1b2c3d4e5f6a.
- `billing_address` (`object`, optional): 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_name` (`string`, optional): Name to show on the invoice. Example: Acme Inc.

Example input: `{"id":"<id>"}`

### `polar_product_create`

Create Product · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `name` (`string`, required): Product name. Example: Pro plan.
- `prices` (`array`, required): 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"}].
- `description` (`string`, optional): Product description (Markdown). Example: Everything in Basic plus priority support.
- `metadata` (`object`, optional): 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_interval` (`string`, optional): Billing interval for a subscription product; leave empty for a one-time product. Example: month. One of: `day`, `week`, `month`, `year`.
- `recurring_interval_count` (`integer`, optional): Number of intervals between charges, for example 3 with month for quarterly. Defaults to 1. Example: 1.
- `trial_interval` (`string`, optional): Unit of the free trial period. Example: day. One of: `day`, `week`, `month`, `year`.
- `trial_interval_count` (`integer`, optional): Number of trial_interval units, for example 14 days. Example: 14.
- `visibility` (`string`, optional): draft, private (only via direct link) or public. Defaults to public. Example: public. One of: `draft`, `private`, `public`.

Example input: `{"name":"<name>","prices":[{"amount_type":"fixed","price_amount":1900,"price_currency":"usd"}]}`

### `polar_product_update`

Update Product · Write

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>"}.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `id` (`string`, required): Product ID (UUID). Example: d8f6a1c2-5b3e-4f7a-9c1d-2e3f4a5b6c7d.
- `description` (`string`, optional): Product description (Markdown). Example: Everything in Basic plus priority support.
- `is_archived` (`boolean`, optional): true to archive the product so it can no longer be bought. Example: false.
- `metadata` (`object`, optional): Key-value metadata to store on the record (string keys up to 40 characters; string, number or boolean values). Example: {"crm_id": "A-77"}.
- `name` (`string`, optional): Product name. Example: Pro plan.
- `prices` (`array`, optional): 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_interval` (`string`, optional): Unit of the free trial period. Example: day. One of: `day`, `week`, `month`, `year`.
- `trial_interval_count` (`integer`, optional): Number of trial_interval units, for example 14 days. Example: 14.
- `visibility` (`string`, optional): draft, private or public. Example: public. One of: `draft`, `private`, `public`.

Example input: `{"id":"<id>"}`

### `polar_refund_create`

Create Refund · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `amount` (`integer`, required): Amount to refund in cents, at least 1 and no more than the refundable amount. Example: 1900.
- `order_id` (`string`, required): ID of the order to refund. Example: 1d2e3f4a-5b6c-7d8e-9f0a-1b2c3d4e5f6a.
- `reason` (`string`, required): Reason for the refund. Example: customer_request. One of: `duplicate`, `fraudulent`, `customer_request`, `service_disruption`, `satisfaction_guarantee`, `dispute_prevention`, `tax_refund`, `vat_reverse_charge_correction`, `other`.
- `comment` (`string`, optional): Internal comment. Example: Refunded after support ticket 4411.
- `metadata` (`object`, optional): 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_benefits` (`boolean`, optional): true to also revoke the customer's benefits (full refunds of one-time purchases only). Example: false.

Example input: `{"amount":1900,"order_id":"<order_id>","reason":"duplicate"}`

### `polar_subscription_create`

Create Subscription · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `customer_id` (`string`, required): Polar customer ID (UUID). Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.
- `product_id` (`string`, required): ID of the free recurring product. Example: d8f6a1c2-5b3e-4f7a-9c1d-2e3f4a5b6c7d.
- `metadata` (`object`, optional): Key-value metadata to store on the record (string keys up to 40 characters; string, number or boolean values). Example: {"crm_id": "A-77"}.

Example input: `{"customer_id":"<customer_id>","product_id":"<product_id>"}`

### `polar_subscription_update`

Update Subscription · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `id` (`string`, required): Subscription ID (UUID). Example: 5a6b7c8d-9e0f-1a2b-3c4d-5e6f7a8b9c0d.
- `cancel_at_period_end` (`boolean`, optional): true to cancel when the current period ends, false to undo a scheduled cancellation. Example: true.
- `customer_cancellation_comment` (`string`, optional): The customer's feedback on why they cancel. Example: Moving to an annual plan elsewhere.
- `customer_cancellation_reason` (`string`, optional): Reason for cancelling. Example: too_expensive. One of: `customer_service`, `low_quality`, `missing_features`, `switched_service`, `too_complex`, `too_expensive`, `unused`, `other`.
- `discount_id` (`string`, optional): Discount ID to apply. Example: 0b1c2d3e-4f5a-6b7c-8d9e-0f1a2b3c4d5e.
- `metadata` (`object`, optional): 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_id` (`string`, optional): Product ID to switch the subscription to. Example: d8f6a1c2-5b3e-4f7a-9c1d-2e3f4a5b6c7d.
- `proration_behavior` (`string`, optional): 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: `invoice`, `prorate`, `next_period`, `reset`.
- `seats` (`integer`, optional): New number of seats (seat-based pricing only). Example: 5.

Example input: `{"id":"<id>"}`

### `polar_checkout_link_delete`

Delete Checkout Link · Destructive

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.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `id` (`string`, required): Checkout link ID (UUID). Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.

Example input: `{"id":"<id>"}`

### `polar_customer_delete`

Delete Customer · Destructive

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.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `id` (`string`, required): Polar customer ID (UUID). Example: 992fae2a-2a17-4b7a-8d9e-e287cf90131b.

Example input: `{"id":"<id>"}`

### `polar_discount_delete`

Delete Discount · Destructive

Delete a discount.
Returns 204 No Content.
Use polar_discount_delete to end a promotion permanently.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `id` (`string`, required): Discount ID (UUID). Example: 0b1c2d3e-4f5a-6b7c-8d9e-0f1a2b3c4d5e.

Example input: `{"id":"<id>"}`

### `polar_license_key_deactivate`

Deactivate License Key · Destructive

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.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `activation_id` (`string`, required): ID of the activation to remove. Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.
- `key` (`string`, required): The license key. Example: POLAR-1A2B3C-4D5E6F-7A8B9C.
- `organization_id` (`string`, required): Your Polar organization ID (UUID). Example: 8f2c4a9e-1b3d-4e5f-9a7b-6c8d0e1f2a3b.

Example input: `{"activation_id":"<activation_id>","key":"<key>","organization_id":"<organization_id>"}`

### `polar_subscription_revoke`

Revoke Subscription · Destructive

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.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `id` (`string`, required): Subscription ID (UUID). Example: 5a6b7c8d-9e0f-1a2b-3c4d-5e6f7a8b9c0d.

Example input: `{"id":"<id>"}`

## Related

Other Accounting & Finance connectors ([all 82](/agentkit/connectors/?category=accounting-finance)):

- [QuickBooks](/agentkit/connectors/quickbooks/): Scalekit connector, OAuth, 117 tools
- [Xero](/agentkit/connectors/xero/): Scalekit connector, OAuth, 94 tools
- [Stripe](/agentkit/connectors/stripe/): Scalekit connector, Access token, 178 tools


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
