# Prices

> How much a product costs and how often it is billed. Prices are immutable apart from activation and metadata.

Source: https://docs.borga.is/api/prices

**The price object**

- `id` (string): Prefixed `price_`.
- `product` (string): - `active` (boolean) - `currency` (string) <Param name="type" type="enum">`one_time` or `recurring`.
- `unit_amount` (integer | null): Per unit, in the smallest currency unit. `null` for tiered prices.
- `recurring` (object | null): `interval` (`day`, `week`, `month`, `year`), `interval_count`, `usage_type` (`licensed` or `metered`), `aggregate_usage`.
- `tiers` (array | null): Tier objects with `up_to` (number or `null` for the last tier), `unit_amount`, `flat_amount`.
- `tiers_mode` (enum | null): `graduated` or `volume`.
- `meter` (string | null): Meter for metered prices.
- `included_units` (integer | null): Free units per period for metered prices.
- `accounting_code` (string | null): Revenue account code copied to invoice lines.
- `metadata` (object): - `created_at` (timestamp) - `updated_at` (timestamp) ## Create a price `POST /v1/prices` **Body** - `product` (string) <Param name="type" type="enum" required>`one_time` or `recurring`.
- `currency` (string, default ISK): <Param name="unit_amount" type="integer">Per unit. Omit when using tiers.
- `recurring` (object): Required for recurring prices: `{ interval, interval_count?, usage_type?, aggregate_usage? }`. `interval` is `day`, `week`, `month` or `year`.
- `tiers_mode` (enum): `graduated` prices each band separately; `volume` prices everything at the reached band.
- `tiers` (array): `[{ up_to, unit_amount?, flat_amount? }]`, ordered, last tier with `up_to: null`.
- `meter` (string): Required when `recurring.usage_type` is `metered`.
- `included_units` (integer): Free units per period before tiers apply.
- `accounting_code` (string): Copied to invoice lines for this price.
- `metadata` (object):  ```ts Fixed const product = await borga.products.create({ name: "Pro plan", description: "Everything in Starter plus priority support", }); const monthly = await borga.prices.create({ product: product.id, type: "recurring", currency: "ISK", unit_amount: 4990, // 4.990 kr. per seat per month recurring: { interval: "month", interval_count: 1 }, }); const yearly = await borga.prices.create({ product: product.id, type: "recurring", currency: "ISK", unit_amount: 49900, recurring: { interval: "year" }, }); ``` ```ts Metered const price = await borga.prices.create({ product: "prod_4Gh6Ij8Kl0Mn2Op4Qr6St8Uv", type: "recurring", currency: "ISK", recurring: { interval: "month", usage_type: "metered" }, meter: "mtr_1Zx3Cv5Bn7Mq9We1Rt3Yu5Io", included_units: 10_000, // first 10k requests are free tiers_mode: "graduated", tiers: [ { up_to: 100_000, unit_amount: 2 }, // 2 kr. per request { up_to: null, unit_amount: 1 }, // 1 kr. above 100k ], }); ```  ```json title="Response" { "id": "price_2Ab4Cd6Ef8Gh0Ij2Kl4Mn6Op", "product": "prod_4Gh6Ij8Kl0Mn2Op4Qr6St8Uv", "active": true, "currency": "ISK", "type": "recurring", "unit_amount": 4990, "recurring": { "interval": "month", "interval_count": 1, "usage_type": "licensed" }, "tiers": null, "tiers_mode": null, "meter": null, "included_units": null, "accounting_code": null, "metadata": {}, "created_at": "2026-09-07T10:00:00.000Z", "updated_at": "2026-09-07T10:00:00.000Z" } ``` Errors: [`missing_meter`](/errors/missing_meter), [`resource_not_found`](/errors/resource_not_found) for `product` or `meter`. ## Retrieve a price `GET /v1/prices/:id` ## Update a price `PATCH /v1/prices/:id` Amounts and intervals cannot change; create a new price and move subscriptions to it. **Body** <Param name="active" type="boolean">Deactivate to stop new subscriptions using it.
- `accounting_code` (string): Empty string clears it.
- `metadata` (object)

## List prices

`GET /v1/prices`

**Query parameters**

- `product` (string)
- `limit` (integer)
- `starting_after` (string)
