# Subscription items

> One price within a subscription, with a quantity. Add, change and remove items with proration.

Source: https://docs.borga.is/api/subscription-items

**The subscription item object**

- `id` (string): Prefixed `si_`.
- `object` (string): `subscription_item`
- `subscription` (string): - `price` (string) <Param name="quantity" type="integer">Seats or units for licensed prices.
- `credit_rollover` (boolean): Carry unused included units into the next period.
- `included_units` (integer | null): Overrides the price's included units.
- `metadata` (object): - `created_at` (timestamp) - `updated_at` (timestamp) Proration: `create_prorations` (default) records the difference for the remainder of the period and adds it to the next invoice; `always_invoice` bills it immediately; `none` skips it. ## Create a subscription item `POST /v1/subscription_items` **Body** - `subscription` (string) <Param name="price" type="string" required>Must match the subscription's interval and currency.
- `quantity` (integer, default 1): <Param name="proration_behavior" type="enum" default="create_prorations">`create_prorations`, `always_invoice` or `none`.
- `credit_rollover` (boolean): - `included_units` (integer) - `metadata` (object) ```bash curl https://api.borga.is/v1/subscription_items \ -H "Authorization: Bearer sk_test_…" \ -H "Content-Type: application/json" \ -d '{ "subscription": "sub_9Qw1Er3Ty5Ui7Op9As1Df3Gh", "price": "price_7Kl9Mn1Op3Qr5St7Uv9Wx1Yz", "quantity": 1 }' ``` ## Retrieve a subscription item `GET /v1/subscription_items/:id` ## Update a subscription item `POST /v1/subscription_items/:id` **Body** - `quantity` (integer) - `proration_behavior` (enum) - `credit_rollover` (boolean) - `included_units` (integer) - `metadata` (object) ## Remove a subscription item `DELETE /v1/subscription_items/:id` **Query parameters** <Param name="proration_behavior" type="enum" default="create_prorations">Credit for the unused remainder of the period.

Returns `{ "deleted": true, "id": "si_…" }`. A subscription must keep at least one recurring item.
