---
title: "Create a pricing plan"
method: POST
path: "/v1/pricing-plans"
tags: ["Pricing Plans"]
---

# Create a pricing plan

`POST /v1/pricing-plans`

Create a new pricing plan for a usage type.

> **Requires a secret key (`sk_*`) with the `ADMIN` role.** Public keys and lower-role secret keys will receive `403 Forbidden`.

Each `unitType` can only have one active pricing plan. If you need to
change prices, update the existing plan or deactivate it first.

**Example unit types:**
- `api_call` - Per API request
- `token` - Per token processed
- `compute_second` - Per second of compute
- `gb_storage` - Per GB stored

## Request body

- object — Request body for creating a new pricing plan.
  - `name` string, required — Human-readable name for the plan (required)
  - `unitType` string, required — The usage type to price. Must be unique per business. Examples: "api_call", "token", "compute_second", "gb_storage"
  - `unitPriceUsd` number, required — Default (FLAT) price per unit in USD. Required even for tiered plans as a fallback.
  - `unitPrice` number — Native-currency price per unit. Required when `currency` is non-USD/USDC. The billing engine uses this as the source of truth and converts to USD via FxRate at charge time.
  - `currency` 'USD' | 'USDC' | 'EUR' | 'GBP' | 'JPY' | 'CAD' | 'AUD' | 'CHF' | 'SGD' | 'HKD' | 'ILS' | 'NZD' | 'SEK' | 'NOK' | 'DKK' | 'MXN' | 'BRL' | 'INR' | 'ZAR' | 'PLN' — Billing currency for the plan (default: USD). Non-USD plans require `unitPrice`.
  - `isActive` boolean — Whether to activate the plan immediately (default: true)
  - `pricingModel` 'FLAT' | 'TIERED' | 'VOLUME' | 'PACKAGE' | 'PER_SEAT' — How quantity maps to charge amount (default: FLAT)
  - `creditsPerUnit` number — Credits consumed per unit of usage. When set, usage is deducted from the customer's credit wallet instead of charging USD.
  - `productCategoryId` string — Optional product category id. When `Business.strictProducts` is true, either this or `productCategoryKey` is required.
  - `productCategoryKey` string — Optional product category slug (e.g. 'core_api'). Resolved server-side to the matching id. Mutually exclusive with `productCategoryId`.
  - `tiers` object[] — Tier definitions. Must be omitted/empty for FLAT and PER_SEAT. Required for TIERED/VOLUME/PACKAGE. Tiers must be contiguous (tier N.max == tier N+1.min) and the first tier must start at 0.
    - `minQuantity` number, required
    - `maxQuantity` number, nullable
    - `unitPriceUsd` number, required
    - `flatFeeUsd` number, nullable
    - `unitPrice` number, nullable
    - `flatFee` number, nullable
    - `packageSize` integer, nullable

## Response `201`

Pricing plan created

- object — Pricing plan created
  - `id` string, required — Unique identifier for the pricing plan
  - `businessId` string — Business this plan belongs to
  - `name` string, required — Human-readable name for the plan
  - `unitType` string, required — The usage type this plan prices (e.g., "api_call", "token", "compute_second", "gb_storage")
  - `unitPriceUsd` string, required — Default (FLAT) price per unit in USD. For TIERED/VOLUME/PACKAGE plans, consult `tiers`. For PER_SEAT plans, this is the price per seat per billing period.
  - `unitPrice` string, nullable — Native-currency price per unit. Populated only for non-USD plans (e.g. EUR, ILS). When set, this is the source of truth: the billing engine reads it directly and converts to USD via FxRate at charge time.
  - `currency` 'USD' | 'USDC' | 'EUR' | 'GBP' | 'JPY' | 'CAD' | 'AUD' | 'CHF' | 'SGD' | 'HKD' | 'ILS' | 'NZD' | 'SEK' | 'NOK' | 'DKK' | 'MXN' | 'BRL' | 'INR' | 'ZAR' | 'PLN' — Billing currency for the plan. Defaults to USD. For non-USD currencies, supply `unitPrice` (and tier `unitPrice`/`flatFee`); the billing engine uses those as the source of truth and converts to USD via FxRate at charge time.
  - `pricingModel` 'FLAT' | 'TIERED' | 'VOLUME' | 'PACKAGE' | 'PER_SEAT', required — How quantity maps to charge amount: - `FLAT`: quantity × unitPrice (default) - `TIERED`: graduated, first N at price A, next M at price B, etc. - `VOLUME`: total quantity determines a single rate applied to all units - `PACKAGE`: charge per package of N units (rounds up partial packages) - `PER_SEAT`: per-seat/user licensing. quantity is the seat count, charged at unitPrice per seat per billing period (no tiers)
  - `tiers` object[], required — Tier definitions. Empty for FLAT and PER_SEAT plans; required for TIERED/VOLUME/PACKAGE.
    - `id` string — Tier ID (present on existing tiers)
    - `minQuantity` string, required — Tier starts at this quantity (inclusive). First tier must be 0.
    - `maxQuantity` string, nullable — Tier ends at this quantity (exclusive). Null on the final unbounded tier.
    - `unitPriceUsd` string, required — Price per unit in this tier (USD)
    - `flatFeeUsd` string, nullable — Optional flat fee added when this tier is reached
    - `unitPrice` string, nullable — Native-currency price per unit. Populated only for non-USD plans (e.g. EUR, ILS). When set, this is the source of truth and the legacy unitPriceUsd is ignored by the billing engine.
    - `flatFee` string, nullable — Native-currency flat fee. Populated only for non-USD plans (mirror of flatFeeUsd).
    - `packageSize` integer, nullable — For PACKAGE model: number of units in one billable package
  - `creditsPerUnit` string, nullable — Credits consumed per unit of usage. When set, usage is deducted from the customer's credit wallet instead of charging USD.
  - `productCategoryId` string, nullable — Optional product category tag used by 'strict products' mode to roll up reporting by service line. Null when the plan is untagged. When `Business.strictProducts` is true, this must be populated via the category id or key.
  - `isActive` boolean, required — Whether this plan is active. Only active plans are used for new charges.
  - `createdAt` string, date-time — When the plan was created
  - `updatedAt` string, date-time — When the plan was last updated

## Other responses

- `400` — Invalid tier configuration
- `401` — Unauthorized
- `409` — Pricing plan for unit type already exists

---

[API](https://skmtc.net/usedrip/apis/drip-api.md) · [All operations](https://skmtc.net/usedrip/apis/drip-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/usedrip/drip-api/revisions/2cb1567969ca/schema)
