# Polar

> Run your Polar store from your workflows: create and find customers, send checkout links, start, change and cancel subscriptions, create discounts, record usage, and report on sales.

App · Payments & Billing · 15 actions. Web page: https://docs.lodol.com/docs/integrations/polar

## Actions

### Cancel subscription

Cancel a subscription at the end of its billing period or right away. Canceling one that's already canceled succeeds.

**Inputs**

- Subscription (`subscription`, text, required): Pick one, or use a subscription ID from an earlier step, such as Find customer's active subscriptions.
- When (`when`, text): Default: at the end of the billing period, so they keep what they paid for. One of: `end_of_period` (At the end of the billing period), `immediately` (Right away).
- Reason (`reason`, text): Why they're leaving, for Polar's churn reports. One of: `too_expensive` (Too expensive), `missing_features` (Missing features), `switched_service` (Switched to another service), `unused` (Not using it), `customer_service` (Customer service), `low_quality` (Quality), `too_complex` (Too complicated), `other`.
- Customer's comment (`comment`, text): What the customer said. They can see it in their Polar account.

**Outputs**

- `amount` (number): What each billing period costs, in cents.
- `cancel_at_period_end` (true/false): Whether it ends when this period does.
- `canceled_at` (text): When it was canceled.
- `currency` (text): Currency code, e.g. usd.
- `current_period_end` (text): When it renews (or ends).
- `current_period_start` (text): When the current billing period started.
- `customer` (object)
- `customer_cancellation_reason` (text): Why it was canceled.
- `customer_id` (text): The customer's Polar ID.
- `discount_id` (text): The discount on it, if any.
- `ends_at` (text): When it will end.
- `id` (text): The subscription's Polar ID.
- `metadata` (object): Extra details.
- `product` (object)
- `product_id` (text): The plan's Polar ID.
- `recurring_interval` (text): day, week, month or year.
- `started_at` (text): When it started.
- `status` (text): active, trialing, past_due, paused, canceled, ...
- `trial_end` (text): When the free trial ends.

**Example output**

```json
{
  "amount": 0,
  "cancel_at_period_end": true,
  "canceled_at": null,
  "checkout_id": null,
  "created_at": "2026-09-27T16:42:49.000000Z",
  "currency": "usd",
  "current_period_end": "2026-10-27T16:42:49.000000Z",
  "current_period_start": "2026-09-27T16:42:49.000000Z",
  "customer": {
    "avatar_url": null,
    "billing_address": null,
    "billing_name": "Ada Lovelace",
    "created_at": "2026-09-27T16:42:49.000000Z",
    "default_payment_method_id": null,
    "deleted_at": null,
    "email": "ada@example.com",
    "email_verified": false,
    "external_id": "usr_1337",
    "first_user_event_at": null,
    "id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b",
    "locale": null,
    "metadata": {
      "plan_source": "website"
    },
    "modified_at": "2026-09-27T16:42:49.000000Z",
    "name": "Ada Lovelace",
    "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
    "tax_id": null,
    "type": "individual"
  },
  "customer_cancellation_comment": null,
  "customer_cancellation_reason": null,
  "customer_id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b",
  "discount": null,
  "discount_id": null,
  "ended_at": null,
  "ends_at": null,
  "id": "e5149aae-e521-42b9-b24c-abb3d71eea2e",
  "metadata": {},
  "modified_at": "2026-09-27T16:42:49.000000Z",
  "product": {
    "id": "d8dd2de1-21b7-4a41-8bc3-ce909c0cfe23",
    "name": "Free"
  },
  "product_id": "d8dd2de1-21b7-4a41-8bc3-ce909c0cfe23",
  "recurring_interval": "month",
  "recurring_interval_count": 1,
  "started_at": "2026-09-27T16:42:49.000000Z",
  "status": "active",
  "trial_end": null,
  "trial_start": null
}
```

### Create checkout link

Get a link to a checkout page to send someone, with their details filled in. It works for 24 hours.

**Inputs**

- Products (`products`, list, required): What they can buy. With several, they choose one.
- Customer (`customer`, text): Who's buying: pick a customer, or enter an email or the ID your system uses for them. New people are fine.
- Discount (`discount`, text): Pick a discount, or use a discount ID from an earlier step.
- After payment, go to (`success_url`, text): A page on your site to send them to once they've paid. Default: Polar's confirmation page.
- Extra details (`metadata`, object): Kept on the order or subscription it creates.

**Outputs**

- `amount` (number): Price before discounts and tax, in cents.
- `currency` (text): Currency code, e.g. usd.
- `customer_email` (text): The customer's email, if known.
- `customer_id` (text): The customer's Polar ID, if known.
- `discount_id` (text): The discount applied.
- `expires_at` (text): When the link stops working.
- `id` (text): The checkout's Polar ID.
- `metadata` (object): Extra details.
- `net_amount` (number): Price after discounts, before tax, in cents.
- `product_id` (text): The product selected.
- `status` (text): open, confirmed, succeeded, failed or expired.
- `url` (text): The checkout page to send the customer to.

**Example output**

```json
{
  "amount": 1900,
  "created_at": "2026-09-27T16:42:49.000000Z",
  "currency": "usd",
  "customer_email": "ada@example.com",
  "customer_id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b",
  "customer_name": "Ada Lovelace",
  "discount_amount": 380,
  "discount_id": "7c1d5a2e-3b4f-4c6d-8e9f-0a1b2c3d4e5f",
  "expires_at": "2026-09-28T16:42:49.000000Z",
  "id": "5f6c0f1d-8f7a-4b1e-9a4d-3d9d2f0b7c21",
  "metadata": {},
  "modified_at": "2026-09-27T16:42:49.000000Z",
  "net_amount": 1520,
  "product_id": "d8dd2de1-21b7-4a41-8bc3-ce909c0cfe23",
  "status": "open",
  "success_url": "https://example.com/thanks",
  "tax_amount": null,
  "total_amount": 1520,
  "url": "https://buy.polar.sh/polar_c_5f6c0f1d8f7a4b1e"
}
```

### Create customer

Add a customer to Polar, before they buy anything.

**Inputs**

- Email (`email`, text, required): Their email address. Each customer's is unique.
- Name (`name`, text): Their name.
- Your ID for them (`external_id`, text): The ID your own system uses for this person, so later steps can find them by it. Polar doesn't allow changing it once set.
- Extra details (`metadata`, object): Anything else to keep on the customer, as names and values.

**Outputs**

- `created_at` (text): When they became a customer.
- `deleted_at` (text): When they were deleted, if they were.
- `email` (text): Email address.
- `email_verified` (true/false): Whether they've confirmed their email.
- `external_id` (text): The ID your system uses for them.
- `id` (text): The customer's Polar ID.
- `metadata` (object): Extra details.
- `name` (text): Name.

**Example output**

```json
{
  "avatar_url": null,
  "billing_address": null,
  "billing_name": "Ada Lovelace",
  "created_at": "2026-09-27T16:42:49.000000Z",
  "default_payment_method_id": null,
  "deleted_at": null,
  "email": "ada@example.com",
  "email_verified": false,
  "external_id": "usr_1337",
  "first_user_event_at": null,
  "id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b",
  "locale": null,
  "metadata": {
    "plan_source": "website"
  },
  "modified_at": "2026-09-27T16:42:49.000000Z",
  "name": "Ada Lovelace",
  "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
  "tax_id": null,
  "type": "individual"
}
```

### Create discount

Make a discount: a code customers type at checkout, or one you apply with Create checkout link or Update subscription.

**Inputs**

- Name (`name`, text, required): Shown to the customer when it's applied.
- Percent off (`percent_off`, number): For example 20. Fill in this or Amount off. From 0.01 to 100.
- Amount off (`amount_off`, number): For example 5.00. Fill in this or Percent off. At least 0.01.
- Currency (`currency`, text): The amount off's currency. Default: your Polar account's. One of: `aed` (AED · UAE dirham), `all` (ALL · Albanian lek), `amd` (AMD · Armenian dram), `aoa` (AOA · Angolan kwanza), `ars` (ARS · Argentine peso), `aud` (AUD · Australian dollar), `awg` (AWG · Aruban florin), `azn` (AZN · Azerbaijani manat), `bam` (BAM · Bosnia-Herzegovina convertible mark), `bbd` (BBD · Barbadian dollar), and 116 more.
- Code (`code`, text): What customers type at checkout, letters and numbers. Leave empty for a discount only your workflows apply.
- Applies to (`duration`, text): For subscriptions. Default: the first payment only. One of: `once` (First payment only), `forever` (Every payment), `repeating` (For a number of months).
- Months (`months`, number): How many months, for 'For a number of months'. From 1 to 999.
- Products (`products`, list): Only for these products. Leave empty for all.
- Starts (`starts_at`, date and time): When it can first be used. Default: now.
- Ends (`ends_at`, date and time): When it stops working. Default: never.
- Uses (`max_redemptions`, number): How many times it can be used in all. Default: no limit. At least 1.

**Outputs**

- `amounts` (object): Amount off per currency, in cents.
- `basis_points` (number): Percent off × 100 (2000 is 20%).
- `code` (text): The code customers type at checkout.
- `duration` (text): once, forever or repeating.
- `duration_in_months` (number): How many months it lasts.
- `ends_at` (text): When it stops working.
- `id` (text): The discount's Polar ID.
- `max_redemptions` (number): How many times it can be used.
- `name` (text): Name shown to customers.
- `redemptions_count` (number): How many times it has been used.
- `starts_at` (text): When it can first be used.
- `type` (text): percentage or fixed.

**Example output**

```json
{
  "basis_points": 2000,
  "code": "LAUNCH20",
  "created_at": "2026-09-27T16:42:49.000000Z",
  "duration": "repeating",
  "duration_in_months": 3,
  "ends_at": "2026-10-04T23:59:59.000000Z",
  "id": "7c1d5a2e-3b4f-4c6d-8e9f-0a1b2c3d4e5f",
  "max_redemptions": 100,
  "max_redemptions_per_customer": null,
  "metadata": {},
  "modified_at": null,
  "name": "Launch week",
  "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
  "products": [],
  "redemptions_count": 0,
  "starts_at": null,
  "type": "percentage"
}
```

### Create product

Add something to sell: a one-time purchase or a subscription plan, paid or free.

**Inputs**

- Name (`name`, text, required): What it's called, 3 to 64 characters.
- Billing (`billing`, text, required): How customers pay for it. One of: `one_time` (One-time purchase), `month` (Monthly subscription), `year` (Yearly subscription), `week` (Weekly subscription).
- Price (`price`, number): For example 19.99. Leave empty to make it free. At least 0.
- Currency (`currency`, text): Default: your Polar account's currency. One of: `aed` (AED · UAE dirham), `all` (ALL · Albanian lek), `amd` (AMD · Armenian dram), `aoa` (AOA · Angolan kwanza), `ars` (ARS · Argentine peso), `aud` (AUD · Australian dollar), `awg` (AWG · Aruban florin), `azn` (AZN · Azerbaijani manat), `bam` (BAM · Bosnia-Herzegovina convertible mark), `bbd` (BBD · Barbadian dollar), and 116 more.
- Description (`description`, text): What customers see at checkout.
- Free trial (days) (`free_trial_days`, number): For subscriptions: how many days they try it free. From 1 to 1000.

**Outputs**

- `created_at` (text): When it was created.
- `description` (text): Description.
- `id` (text): The product's Polar ID.
- `is_archived` (true/false): Whether it's no longer for sale.
- `is_recurring` (true/false): Whether it's a subscription.
- `metadata` (object): Extra details.
- `name` (text): Name.
- `prices` (list): Its prices.
- `recurring_interval` (text): day, week, month or year; empty if one-time.
- `trial_interval_count` (number): Length of the free trial.
- `visibility` (text): public, private or draft.

**Example output**

```json
{
  "attached_custom_fields": [],
  "benefits": [],
  "created_at": "2026-09-27T16:42:49.000000Z",
  "description": "Everything in Free, plus priority support.",
  "id": "d8dd2de1-21b7-4a41-8bc3-ce909c0cfe23",
  "is_archived": false,
  "is_deletable": true,
  "is_recurring": true,
  "medias": [],
  "metadata": {},
  "modified_at": "2026-09-27T16:42:49.000000Z",
  "name": "Pro",
  "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
  "prices": [
    {
      "amount_type": "fixed",
      "created_at": "2026-09-27T16:42:49.000000Z",
      "id": "a4f3f5b8-2b36-4f0e-9d3e-1c1b1b8b6a11",
      "is_archived": false,
      "modified_at": "2026-09-27T16:42:49.000000Z",
      "price_amount": 1900,
      "price_currency": "usd",
      "product_id": "d8dd2de1-21b7-4a41-8bc3-ce909c0cfe23",
      "source": "catalog",
      "tax_behavior": null
    }
  ],
  "recurring_interval": "month",
  "recurring_interval_count": 1,
  "trial_interval": null,
  "trial_interval_count": null,
  "visibility": "public"
}
```

### Delete customer

Delete a customer: their subscriptions end right away and their benefits are revoked. Their past orders stay.

**Inputs**

- Customer (`customer`, text, required): Pick a customer, or enter their email, the ID your system uses for them, or their Polar customer ID.
- Erase personal data (`erase_personal_data`, true/false): Also scrub their name, email and address, for a GDPR request.

**Outputs**

- `customer_id` (text): The deleted customer's Polar ID.
- `deleted` (true/false): Always true.
- `email` (text): Their email.
- `personal_data_erased` (true/false): Whether their personal data was erased.

**Example output**

```json
{
  "customer_id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b",
  "deleted": true,
  "email": "ada@example.com",
  "personal_data_erased": false
}
```

### Find customer

Look up a customer by email or your ID for them, with their active subscriptions and benefits. Says so when there's no match, so a workflow can create them.

**Inputs**

- Customer (`customer`, text, required): Pick a customer, or enter their email, the ID your system uses for them, or their Polar customer ID.

**Outputs**

- `customer` (object)
- `found` (true/false): Whether a customer matched.

**Example output**

```json
{
  "customer": {
    "active_meters": [],
    "active_subscriptions": [
      {
        "amount": 0,
        "cancel_at_period_end": false,
        "canceled_at": null,
        "checkout_id": null,
        "created_at": "2026-09-27T16:42:49.000000Z",
        "currency": "usd",
        "current_period_end": "2026-10-27T16:42:49.000000Z",
        "current_period_start": "2026-09-27T16:42:49.000000Z",
        "customer_cancellation_comment": null,
        "customer_cancellation_reason": null,
        "discount_id": null,
        "ended_at": null,
        "ends_at": null,
        "id": "e5149aae-e521-42b9-b24c-abb3d71eea2e",
        "metadata": {},
        "modified_at": "2026-09-27T16:42:49.000000Z",
        "product_id": "d8dd2de1-21b7-4a41-8bc3-ce909c0cfe23",
        "recurring_interval": "month",
        "recurring_interval_count": 1,
        "started_at": "2026-09-27T16:42:49.000000Z",
        "status": "active",
        "trial_end": null,
        "trial_start": null
      }
    ],
    "avatar_url": null,
    "billing_address": null,
    "billing_name": "Ada Lovelace",
    "created_at": "2026-09-27T16:42:49.000000Z",
    "default_payment_method_id": null,
    "deleted_at": null,
    "email": "ada@example.com",
    "email_verified": false,
    "external_id": "usr_1337",
    "first_user_event_at": null,
    "granted_benefits": [],
    "id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b",
    "locale": null,
    "metadata": {
      "plan_source": "website"
    },
    "modified_at": "2026-09-27T16:42:49.000000Z",
    "name": "Ada Lovelace",
    "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
    "tax_id": null,
    "type": "individual"
  },
  "found": true
}
```

### Find orders

List purchases and subscription payments by customer, product, status or date.

**Inputs**

- Customer (`customer`, text): Only this customer's. Pick one, or enter their email or the ID your system uses for them. Leave empty for everyone.
- Product (`product`, text): Only this product's. Leave empty for all.
- Status (`statuses`, text): Leave empty for any status. One or more of: `paid`, `refunded`, `partially_refunded` (Partly refunded), `pending` (Payment pending), `draft`, `void`.
- Placed after (`created_after`, date and time): Only orders placed after this.
- Placed before (`created_before`, date and time): Only orders placed before this.
- Limit (`limit`, number): How many to return, newest first, up to 100. Default 25. From 1 to 100.

**Outputs**

- `count` (number): How many orders are in this answer.
- `orders` (list): The orders, newest first.
- `total` (number): How many orders match in all.

**Example output**

```json
{
  "count": 1,
  "orders": [
    {
      "billing_reason": "subscription_create",
      "created_at": "2026-09-27T16:42:49.000000Z",
      "currency": "usd",
      "customer": {
        "avatar_url": null,
        "billing_address": null,
        "billing_name": "Ada Lovelace",
        "created_at": "2026-09-27T16:42:49.000000Z",
        "default_payment_method_id": null,
        "deleted_at": null,
        "email": "ada@example.com",
        "email_verified": false,
        "external_id": "usr_1337",
        "first_user_event_at": null,
        "id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b",
        "locale": null,
        "metadata": {
          "plan_source": "website"
        },
        "modified_at": "2026-09-27T16:42:49.000000Z",
        "name": "Ada Lovelace",
        "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
        "tax_id": null,
        "type": "individual"
      },
      "customer_id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b",
      "discount_amount": 0,
      "discount_id": null,
      "id": "b0f1c2d3-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
      "invoice_number": "POLAR-0001",
      "metadata": {},
      "modified_at": "2026-09-27T16:42:49.000000Z",
      "net_amount": 1900,
      "paid": true,
      "product": {
        "id": "d8dd2de1-21b7-4a41-8bc3-ce909c0cfe23",
        "name": "Pro"
      },
      "product_id": "d8dd2de1-21b7-4a41-8bc3-ce909c0cfe23",
      "refunded_amount": 0,
      "status": "paid",
      "subscription_id": "e5149aae-e521-42b9-b24c-abb3d71eea2e",
      "subtotal_amount": 1900,
      "tax_amount": 0,
      "total_amount": 1900
    }
  ],
  "total": 1
}
```

### Find subscriptions

List subscriptions by customer, plan or status, such as everyone set to cancel at the end of their billing period.

**Inputs**

- Customer (`customer`, text): Only this customer's. Pick one, or enter their email or the ID your system uses for them. Leave empty for everyone.
- Plan (`product`, text): Only this plan's. Leave empty for all.
- Status (`statuses`, text): Leave empty for any status. One or more of: `active`, `trialing` (On a free trial), `past_due` (Payment overdue), `paused`, `canceled`, `unpaid`, `incomplete` (Awaiting first payment), `incomplete_expired` (First payment never made).
- Only ones set to cancel (`canceling_only`, true/false): Only subscriptions ending with their current billing period.
- Started after (`started_after`, date and time): Only subscriptions that started after this.
- Started before (`started_before`, date and time): Only subscriptions that started before this.
- Limit (`limit`, number): How many to return, newest first, up to 100. Default 25. From 1 to 100.

**Outputs**

- `count` (number): How many subscriptions are in this answer.
- `subscriptions` (list): The subscriptions, newest first.
- `total` (number): How many subscriptions match in all.

**Example output**

```json
{
  "count": 1,
  "subscriptions": [
    {
      "amount": 0,
      "cancel_at_period_end": false,
      "canceled_at": null,
      "checkout_id": null,
      "created_at": "2026-09-27T16:42:49.000000Z",
      "currency": "usd",
      "current_period_end": "2026-10-27T16:42:49.000000Z",
      "current_period_start": "2026-09-27T16:42:49.000000Z",
      "customer": {
        "avatar_url": null,
        "billing_address": null,
        "billing_name": "Ada Lovelace",
        "created_at": "2026-09-27T16:42:49.000000Z",
        "default_payment_method_id": null,
        "deleted_at": null,
        "email": "ada@example.com",
        "email_verified": false,
        "external_id": "usr_1337",
        "first_user_event_at": null,
        "id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b",
        "locale": null,
        "metadata": {
          "plan_source": "website"
        },
        "modified_at": "2026-09-27T16:42:49.000000Z",
        "name": "Ada Lovelace",
        "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
        "tax_id": null,
        "type": "individual"
      },
      "customer_cancellation_comment": null,
      "customer_cancellation_reason": null,
      "customer_id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b",
      "discount": null,
      "discount_id": null,
      "ended_at": null,
      "ends_at": null,
      "id": "e5149aae-e521-42b9-b24c-abb3d71eea2e",
      "metadata": {},
      "modified_at": "2026-09-27T16:42:49.000000Z",
      "product": {
        "id": "d8dd2de1-21b7-4a41-8bc3-ce909c0cfe23",
        "name": "Free"
      },
      "product_id": "d8dd2de1-21b7-4a41-8bc3-ce909c0cfe23",
      "recurring_interval": "month",
      "recurring_interval_count": 1,
      "started_at": "2026-09-27T16:42:49.000000Z",
      "status": "active",
      "trial_end": null,
      "trial_start": null
    }
  ],
  "total": 1
}
```

### Get sales metrics

Revenue, orders, subscriptions and checkouts over a date range, in total and per day, week or month. Money is in cents.

**Inputs**

- From (`start_date`, date): Default: 30 days ago.
- To (`end_date`, date): Default: today.
- Group by (`interval`, text): Default: day. One of: `day`, `week`, `month`, `year`, `hour`.
- Metrics (`metrics`, text): Leave empty for all of them. One or more of: `revenue`, `net_revenue` (Net revenue (after fees)), `orders`, `average_order_value` (Average order value), `monthly_recurring_revenue` (Monthly recurring revenue (MRR)), `active_subscriptions` (Active subscriptions), `new_subscriptions` (New subscriptions), `canceled_subscriptions` (Canceled subscriptions), `churn_rate` (Churn rate), `checkouts` (Checkouts started), `checkouts_conversion` (Checkout conversion), `cumulative_revenue` (All-time revenue).
- Product (`product`, text): Only this product's. Leave empty for all.

**Outputs**

- `end_date` (text): Last day covered.
- `interval` (text): How the periods are grouped.
- `periods` (list): The same metrics for each day, week, month or year.
- `start_date` (text): First day covered.
- `totals` (object): Each metric over the whole range. Money is in cents.

**Example output**

```json
{
  "end_date": "2026-09-27",
  "interval": "day",
  "periods": [
    {
      "active_subscriptions": 30,
      "average_order_value": 1900,
      "canceled_subscriptions": 0,
      "checkouts": 3,
      "checkouts_conversion": 0.6667,
      "churn_rate": 0,
      "cumulative_revenue": 342000,
      "monthly_recurring_revenue": 57000,
      "net_revenue": 3534,
      "new_subscriptions": 1,
      "orders": 2,
      "revenue": 3800,
      "timestamp": "2026-09-27T00:00:00Z"
    }
  ],
  "start_date": "2026-08-29",
  "totals": {
    "active_subscriptions": 30,
    "average_order_value": 1900,
    "canceled_subscriptions": 1,
    "checkouts": 48,
    "checkouts_conversion": 0.125,
    "churn_rate": 0.03,
    "cumulative_revenue": 342000,
    "monthly_recurring_revenue": 57000,
    "net_revenue": 53010,
    "new_subscriptions": 6,
    "orders": 30,
    "revenue": 57000
  }
}
```

### Record usage

Record something a customer used, for usage-based billing. Your Polar meters count these events.

**Inputs**

- Customer (`customer`, text, required): Pick a customer, or enter their email, their Polar ID, or the ID your system uses for them (which works even before they're a Polar customer).
- Event (`event_name`, text, required): The name your Polar meters count, e.g. api_call.
- Details (`details`, object): Values your meters add up, e.g. tokens: 1200.
- When (`occurred_at`, date and time): When it happened. Default: now.
- Event ID (`event_id`, text): Your own unique ID for this event. If a step runs twice, Polar records it once.

**Outputs**

- `customer` (text): Who it was recorded for.
- `duplicate` (true/false): True when this event ID was already recorded.
- `event_name` (text): The event's name.
- `occurred_at` (text): When it happened, if given.
- `recorded` (true/false): Whether Polar recorded it.

**Example output**

```json
{
  "customer": "usr_1337",
  "duplicate": false,
  "event_name": "api_call",
  "occurred_at": null,
  "recorded": true
}
```

### Start free subscription

Put a customer on a free plan. For a paid plan, send them a link from Create checkout link instead.

**Inputs**

- Customer (`customer`, text, required): Pick a customer, or enter their email, the ID your system uses for them, or their Polar customer ID.
- Free plan (`product`, text, required): Pick a free plan, or use a product ID from an earlier step.

**Outputs**

- `amount` (number): What each billing period costs, in cents.
- `cancel_at_period_end` (true/false): Whether it ends when this period does.
- `canceled_at` (text): When it was canceled.
- `currency` (text): Currency code, e.g. usd.
- `current_period_end` (text): When it renews (or ends).
- `current_period_start` (text): When the current billing period started.
- `customer` (object)
- `customer_cancellation_reason` (text): Why it was canceled.
- `customer_id` (text): The customer's Polar ID.
- `discount_id` (text): The discount on it, if any.
- `ends_at` (text): When it will end.
- `id` (text): The subscription's Polar ID.
- `metadata` (object): Extra details.
- `product` (object)
- `product_id` (text): The plan's Polar ID.
- `recurring_interval` (text): day, week, month or year.
- `started_at` (text): When it started.
- `status` (text): active, trialing, past_due, paused, canceled, ...
- `trial_end` (text): When the free trial ends.

**Example output**

```json
{
  "amount": 0,
  "cancel_at_period_end": false,
  "canceled_at": null,
  "checkout_id": null,
  "created_at": "2026-09-27T16:42:49.000000Z",
  "currency": "usd",
  "current_period_end": "2026-10-27T16:42:49.000000Z",
  "current_period_start": "2026-09-27T16:42:49.000000Z",
  "customer": {
    "avatar_url": null,
    "billing_address": null,
    "billing_name": "Ada Lovelace",
    "created_at": "2026-09-27T16:42:49.000000Z",
    "default_payment_method_id": null,
    "deleted_at": null,
    "email": "ada@example.com",
    "email_verified": false,
    "external_id": "usr_1337",
    "first_user_event_at": null,
    "id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b",
    "locale": null,
    "metadata": {
      "plan_source": "website"
    },
    "modified_at": "2026-09-27T16:42:49.000000Z",
    "name": "Ada Lovelace",
    "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
    "tax_id": null,
    "type": "individual"
  },
  "customer_cancellation_comment": null,
  "customer_cancellation_reason": null,
  "customer_id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b",
  "discount": null,
  "discount_id": null,
  "ended_at": null,
  "ends_at": null,
  "id": "e5149aae-e521-42b9-b24c-abb3d71eea2e",
  "metadata": {},
  "modified_at": "2026-09-27T16:42:49.000000Z",
  "product": {
    "id": "d8dd2de1-21b7-4a41-8bc3-ce909c0cfe23",
    "name": "Free"
  },
  "product_id": "d8dd2de1-21b7-4a41-8bc3-ce909c0cfe23",
  "recurring_interval": "month",
  "recurring_interval_count": 1,
  "started_at": "2026-09-27T16:42:49.000000Z",
  "status": "active",
  "trial_end": null,
  "trial_start": null
}
```

### Update customer

Change a customer's email, name or details. Only what you fill in changes.

**Inputs**

- Customer (`customer`, text, required): Pick a customer, or enter their email, the ID your system uses for them, or their Polar customer ID.
- New email (`email`, text): Their new email address.
- Name (`name`, text): Their name.
- Your ID for them (`external_id`, text): The ID your own system uses for this person, so later steps can find them by it. Polar doesn't allow changing it once set.
- Extra details (`metadata`, object): Details to add or change. Ones you leave out are kept.

**Outputs**

- `created_at` (text): When they became a customer.
- `deleted_at` (text): When they were deleted, if they were.
- `email` (text): Email address.
- `email_verified` (true/false): Whether they've confirmed their email.
- `external_id` (text): The ID your system uses for them.
- `id` (text): The customer's Polar ID.
- `metadata` (object): Extra details.
- `name` (text): Name.

**Example output**

```json
{
  "avatar_url": null,
  "billing_address": null,
  "billing_name": "Ada Lovelace",
  "created_at": "2026-09-27T16:42:49.000000Z",
  "default_payment_method_id": null,
  "deleted_at": null,
  "email": "ada@example.com",
  "email_verified": false,
  "external_id": "usr_1337",
  "first_user_event_at": null,
  "id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b",
  "locale": null,
  "metadata": {
    "plan_source": "website"
  },
  "modified_at": "2026-09-27T16:42:49.000000Z",
  "name": "Ada Lovelace",
  "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
  "tax_id": null,
  "type": "individual"
}
```

### Update product

Rename a product, change its price, or stop selling it. Only what you fill in changes.

**Inputs**

- Product (`product`, text, required): Pick a product, or use a product ID from an earlier step.
- New name (`name`, text): 3 to 64 characters.
- New description (`description`, text): What customers see at checkout.
- New price (`price`, number): For example 24.99, or 0 for free. New purchases pay it; prices in other currencies are kept. At least 0.
- Currency (`currency`, text): The new price's currency. Default: its current one. One of: `aed` (AED · UAE dirham), `all` (ALL · Albanian lek), `amd` (AMD · Armenian dram), `aoa` (AOA · Angolan kwanza), `ars` (ARS · Argentine peso), `aud` (AUD · Australian dollar), `awg` (AWG · Aruban florin), `azn` (AZN · Azerbaijani manat), `bam` (BAM · Bosnia-Herzegovina convertible mark), `bbd` (BBD · Barbadian dollar), and 116 more.
- Availability (`availability`, text): Archive it to stop selling it. Existing subscriptions carry on. One of: `available` (For sale), `archived` (Archived (no longer for sale)).

**Outputs**

- `created_at` (text): When it was created.
- `description` (text): Description.
- `id` (text): The product's Polar ID.
- `is_archived` (true/false): Whether it's no longer for sale.
- `is_recurring` (true/false): Whether it's a subscription.
- `metadata` (object): Extra details.
- `name` (text): Name.
- `prices` (list): Its prices.
- `recurring_interval` (text): day, week, month or year; empty if one-time.
- `trial_interval_count` (number): Length of the free trial.
- `visibility` (text): public, private or draft.

**Example output**

```json
{
  "attached_custom_fields": [],
  "benefits": [],
  "created_at": "2026-09-27T16:42:49.000000Z",
  "description": "Everything in Free, plus priority support.",
  "id": "d8dd2de1-21b7-4a41-8bc3-ce909c0cfe23",
  "is_archived": false,
  "is_deletable": true,
  "is_recurring": true,
  "medias": [],
  "metadata": {},
  "modified_at": "2026-09-27T16:42:49.000000Z",
  "name": "Pro",
  "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
  "prices": [
    {
      "amount_type": "fixed",
      "created_at": "2026-09-27T16:42:49.000000Z",
      "id": "a4f3f5b8-2b36-4f0e-9d3e-1c1b1b8b6a11",
      "is_archived": false,
      "modified_at": "2026-09-27T16:42:49.000000Z",
      "price_amount": 1900,
      "price_currency": "usd",
      "product_id": "d8dd2de1-21b7-4a41-8bc3-ce909c0cfe23",
      "source": "catalog",
      "tax_behavior": null
    }
  ],
  "recurring_interval": "month",
  "recurring_interval_count": 1,
  "trial_interval": null,
  "trial_interval_count": null,
  "visibility": "public"
}
```

### Update subscription

Switch a subscription to another plan, apply or remove a discount, or undo a scheduled cancellation.

**Inputs**

- Subscription (`subscription`, text, required): Pick one, or use a subscription ID from an earlier step, such as Find customer's active subscriptions.
- Switch to plan (`product`, text): The plan to move them to.
- Billing for the switch (`proration`, text): Default: your Polar setting. One of: `invoice` (Charge or credit the difference now), `prorate` (Add the difference to the next bill), `next_period` (Switch at the next renewal).
- Apply discount (`discount`, text): Applies from their next payment.
- Remove discount (`remove_discount`, true/false): Take off the discount it has, from the next payment.
- Undo scheduled cancellation (`resume`, true/false): Keep it renewing if it was set to cancel at the end of its billing period.

**Outputs**

- `amount` (number): What each billing period costs, in cents.
- `cancel_at_period_end` (true/false): Whether it ends when this period does.
- `canceled_at` (text): When it was canceled.
- `currency` (text): Currency code, e.g. usd.
- `current_period_end` (text): When it renews (or ends).
- `current_period_start` (text): When the current billing period started.
- `customer` (object)
- `customer_cancellation_reason` (text): Why it was canceled.
- `customer_id` (text): The customer's Polar ID.
- `discount_id` (text): The discount on it, if any.
- `ends_at` (text): When it will end.
- `id` (text): The subscription's Polar ID.
- `metadata` (object): Extra details.
- `product` (object)
- `product_id` (text): The plan's Polar ID.
- `recurring_interval` (text): day, week, month or year.
- `started_at` (text): When it started.
- `status` (text): active, trialing, past_due, paused, canceled, ...
- `trial_end` (text): When the free trial ends.

**Example output**

```json
{
  "amount": 0,
  "cancel_at_period_end": false,
  "canceled_at": null,
  "checkout_id": null,
  "created_at": "2026-09-27T16:42:49.000000Z",
  "currency": "usd",
  "current_period_end": "2026-10-27T16:42:49.000000Z",
  "current_period_start": "2026-09-27T16:42:49.000000Z",
  "customer": {
    "avatar_url": null,
    "billing_address": null,
    "billing_name": "Ada Lovelace",
    "created_at": "2026-09-27T16:42:49.000000Z",
    "default_payment_method_id": null,
    "deleted_at": null,
    "email": "ada@example.com",
    "email_verified": false,
    "external_id": "usr_1337",
    "first_user_event_at": null,
    "id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b",
    "locale": null,
    "metadata": {
      "plan_source": "website"
    },
    "modified_at": "2026-09-27T16:42:49.000000Z",
    "name": "Ada Lovelace",
    "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
    "tax_id": null,
    "type": "individual"
  },
  "customer_cancellation_comment": null,
  "customer_cancellation_reason": null,
  "customer_id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b",
  "discount": null,
  "discount_id": null,
  "ended_at": null,
  "ends_at": null,
  "id": "e5149aae-e521-42b9-b24c-abb3d71eea2e",
  "metadata": {},
  "modified_at": "2026-09-27T16:42:49.000000Z",
  "product": {
    "id": "d8dd2de1-21b7-4a41-8bc3-ce909c0cfe23",
    "name": "Free"
  },
  "product_id": "d8dd2de1-21b7-4a41-8bc3-ce909c0cfe23",
  "recurring_interval": "month",
  "recurring_interval_count": 1,
  "started_at": "2026-09-27T16:42:49.000000Z",
  "status": "active",
  "trial_end": null,
  "trial_start": null
}
```
