> ## Documentation Index
> Fetch the complete documentation index at: https://polar.sh/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Set up your catalog

> Create a plan with a base fee, metered usage and included credits.

> [!NOTE]
>
> **Why now?** With usage flowing, you can price against real numbers. A product holds both what customers pay (prices) and what they get (benefits). See [Products & prices](https://polar.sh/docs/concepts/products.md).

In this step you'll create a **Pro** plan: \$20 a month, including 100,000 tokens, with usage beyond that billed per token.

The examples use the sandbox client from the [quickstart overview](https://polar.sh/docs/quickstart/overview.md#prerequisites), on API version `2026-10`.

## Create the credits benefit

A [Meter Credits benefit](https://polar.sh/docs/features/usage-based-billing/credits.md) adds units to a customer's meter balance at the start of every billing cycle. Usage draws the balance down before anything is billed.

> [tab] Dashboard
>
> * Open **Products → Benefits**
> * Click **Create Benefit**
> * Set the type to **Meter Credits**
> * Enter the **Description** "100,000 AI tokens per month"
> * Pick the **AI tokens** meter and set **Number of credited units** to 100,000
> * Leave **Rollover unused credits** unchecked
> * Click **Create**

> [tab] CLI
>
> ```bash theme={null}
> export BENEFIT_ID=$(polar benefits create --type meter_credit \
>   --description "100,000 AI tokens per month" \
>   --properties '{"meter_id": "'"$METER_ID"'", "units": 100000, "rollover": false}' | jq -r .id)
> ```
>
> See [`polar benefits`](https://polar.sh/docs/integrate/cli/reference/benefits).

> [tab] Prompt
>
> ```text Prompt theme={null}
> In my Polar sandbox, create a Meter Credits benefit that grants 100,000 units of the AI tokens meter per month, without rollover.
> ```
>
> Uses the `benefits_create` operation of the [Polar MCP server](https://polar.sh/docs/integrate/mcp.md).

From your code:

```typescript TypeScript theme={null}
const credits = await polar.benefits.create({
  type: "meter_credit",
  description: "100,000 AI tokens per month",
  properties: {
    meter_id: meter.id,
    units: 100_000,
    rollover: false,
  },
});
```

```python Python theme={null}
credits = polar.benefits.create(
    type="meter_credit",
    description="100,000 AI tokens per month",
    properties={
        "meter_id": meter.id,
        "units": 100_000,
        "rollover": False,
    },
)
```

```bash cURL theme={null}
export BENEFIT_ID=$(curl -s -X POST https://sandbox-api.polar.sh/v1/benefits/ \
  -H "Authorization: Bearer $POLAR_ACCESS_TOKEN" \
  -H "Polar-Version: 2026-10" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "meter_credit",
    "description": "100,000 AI tokens per month",
    "properties": {
      "meter_id": "'"$METER_ID"'",
      "units": 100000,
      "rollover": false
    }
  }' | jq -r .id)
```

## Create the product

Create a monthly product with two prices: a fixed base fee and a metered price on the **AI tokens** meter, then attach the credits benefit.

> [tab] Dashboard
>
> * Open **Products**
> * Click **New Product**
> * Set **Name** to "Pro"
> * Under **Pricing**, choose **Recurring subscription** and set **Every** 1 month
> * Pick **Fixed price** and enter \$20
> * Click **Add metered price**, select the **AI tokens** meter and set **Amount per unit** to \$0.00002
> * Under **Automated Benefits**, select the credits benefit
> * Click **Create Product**

> [tab] CLI
>
> ```bash theme={null}
> export PRODUCT_ID=$(polar products create --name "Pro" --recurring-interval month \
>   --prices '[
>     { "amount_type": "fixed", "price_amount": 2000 },
>     { "amount_type": "metered_unit", "meter_id": "'"$METER_ID"'", "unit_amount": "0.002" }
>   ]' | jq -r .id)
>
> polar products update_benefits $PRODUCT_ID --data '{ "benefits": ["'"$BENEFIT_ID"'"] }'
> ```
>
> See [`polar products`](https://polar.sh/docs/integrate/cli/reference/products).

> [tab] Prompt
>
> ```text Prompt theme={null}
> In my Polar sandbox, create a monthly product called Pro for $20, with a metered price of $0.00002 per unit on the AI tokens meter, and attach the 100,000 AI tokens credits benefit.
> ```
>
> Uses the `products_create` and `products_update_benefits` operations of the [Polar MCP server](https://polar.sh/docs/integrate/mcp.md).

From your code. Amounts are in cents:

```typescript TypeScript theme={null}
const product = await polar.products.create({
  name: "Pro",
  recurring_interval: "month",
  prices: [
    { amount_type: "fixed", price_amount: 2000 },
    { amount_type: "metered_unit", meter_id: meter.id, unit_amount: "0.002" },
  ],
});

await polar.products.updateBenefits(product.id, {
  benefits: [credits.id],
});
```

```python Python theme={null}
product = polar.products.create(
    name="Pro",
    recurring_interval="month",
    prices=[
        {"amount_type": "fixed", "price_amount": 2000},
        {"amount_type": "metered_unit", "meter_id": meter.id, "unit_amount": "0.002"},
    ],
)

polar.products.update_benefits(product.id, benefits=[credits.id])
```

```bash cURL theme={null}
export PRODUCT_ID=$(curl -s -X POST https://sandbox-api.polar.sh/v1/products/ \
  -H "Authorization: Bearer $POLAR_ACCESS_TOKEN" \
  -H "Polar-Version: 2026-10" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Pro",
    "recurring_interval": "month",
    "prices": [
      { "amount_type": "fixed", "price_amount": 2000 },
      { "amount_type": "metered_unit", "meter_id": "'"$METER_ID"'", "unit_amount": "0.002" }
    ]
  }' | jq -r .id)

curl -X POST "https://sandbox-api.polar.sh/v1/products/$PRODUCT_ID/benefits" \
  -H "Authorization: Bearer $POLAR_ACCESS_TOKEN" \
  -H "Polar-Version: 2026-10" \
  -H "Content-Type: application/json" \
  -d '{ "benefits": ["'"$BENEFIT_ID"'"] }'
```

Customers now pay $20 a month. The first 100,000 tokens each month are covered by credits, and every token after that costs $0.00002.

> [!TIP]
>
> To protect customers from surprise bills, set a `cap_amount` on the metered price. To never bill for usage at all, leave out the metered price and sell credits only. See [Usage-based pricing](https://polar.sh/docs/features/usage-based-billing/billing.md).

## Verify it works

**Pro** has a \$20 monthly price, a metered price on **AI tokens**, and the credits benefit.

> [tab] Dashboard
>
> * Open **Products**
> * Select **Pro**
> * Check the prices and the benefit under **Automated Benefits**

> [tab] CLI
>
> ```bash theme={null}
> polar products get $PRODUCT_ID
> ```

> [tab] Prompt
>
> ```text Prompt theme={null}
> Show the Pro product in my Polar sandbox with its prices and benefits.
> ```
>
> Uses the `products_get` operation of the [Polar MCP server](https://polar.sh/docs/integrate/mcp.md).

## Learn more

| Resource | Description |
| - | - |
| [Products](https://polar.sh/docs/features/products.md) | Billing cycles, currencies, trials and archiving |
| [Usage-based pricing](https://polar.sh/docs/features/usage-based-billing/billing.md) | Unit, volume and graduated rates, caps and meter cycles |
| [Credits](https://polar.sh/docs/features/usage-based-billing/credits.md) | Credits-only spending and manual grants |
| [Benefits](https://polar.sh/docs/concepts/benefits.md) | License keys, feature flags, file downloads and more |

> [card] [Next: Integrate checkout & customers](https://polar.sh/docs/quickstart/checkout.md)
>
> Link customers to your users and let them buy Pro.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.