Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.borga.is/llms.txt

Use this file to discover all available pages before exploring further.

A product represents an item or service you offer — for example, “Pro Plan” or “Storage Add-on”. Products are linked to one or more prices, which define the amount, currency, and billing interval. Use POST /v1/products to create a product, then attach prices before using it in a subscription or payment.
Deactivating a product by setting active: false does not cancel existing subscriptions that use it. Active subscriptions continue until they are explicitly canceled.

Create a product

POST /v1/products Creates a new product object.

Request parameters

name
string
required
Display name for the product. Shown in the dashboard and on invoices.
description
string
An optional description of the product. Useful for internal reference.
metadata
object
Set of key-value pairs you can attach to the product. Values must be strings.
curl --request POST \
  --url https://api.borga.is/v1/products \
  --header "Authorization: Bearer sk_live_..." \
  --header "X-Merchant-Id: mer_xxx" \
  --header "Content-Type: application/json" \
  --data '{
    "name": "Pro Plan",
    "description": "Full access to all features with priority support.",
    "metadata": {
      "tier": "pro"
    }
  }'

Response fields

id
string
required
Unique identifier for the product (e.g. prod_xxx).
name
string
required
Display name of the product.
description
string
Product description.
active
boolean
required
Whether the product is currently available. Defaults to true.
metadata
object
Key-value pairs attached to the product.
created_at
string
required
ISO 8601 timestamp of when the product was created.
{
  "id": "prod_01hx9z3k2mfq7nbvd4cw8ej5rt",
  "name": "Pro Plan",
  "description": "Full access to all features with priority support.",
  "active": true,
  "metadata": {
    "tier": "pro"
  },
  "created_at": "2026-04-29T10:15:00Z"
}

List products

GET /v1/products Returns a paginated list of products, ordered by creation date descending.

Query parameters

starting_after
string
Cursor for pagination. Pass the id of the last product from the previous page to retrieve the next page.
limit
number
Maximum number of products to return per page.
curl --request GET \
  --url "https://api.borga.is/v1/products?limit=20" \
  --header "Authorization: Bearer sk_live_..." \
  --header "X-Merchant-Id: mer_xxx"

Response fields

data
object[]
required
Array of product objects.
has_more
boolean
required
Whether more products exist beyond this page.
{
  "data": [
    {
      "id": "prod_01hx9z3k2mfq7nbvd4cw8ej5rt",
      "name": "Pro Plan",
      "description": "Full access to all features with priority support.",
      "active": true,
      "metadata": {
        "tier": "pro"
      },
      "created_at": "2026-04-29T10:15:00Z"
    }
  ],
  "has_more": false
}

Retrieve a product

GET /v1/products/{id} Retrieves the details of an existing product.

Path parameters

id
string
required
The ID of the product to retrieve.
curl --request GET \
  --url https://api.borga.is/v1/products/prod_01hx9z3k2mfq7nbvd4cw8ej5rt \
  --header "Authorization: Bearer sk_live_..." \
  --header "X-Merchant-Id: mer_xxx"

Response fields

id
string
required
Unique product identifier.
name
string
required
Display name of the product.
description
string
Product description.
active
boolean
required
Whether the product is currently active.
metadata
object
Key-value pairs attached to the product.
created_at
string
required
ISO 8601 timestamp of when the product was created.
{
  "id": "prod_01hx9z3k2mfq7nbvd4cw8ej5rt",
  "name": "Pro Plan",
  "description": "Full access to all features with priority support.",
  "active": true,
  "metadata": {
    "tier": "pro"
  },
  "created_at": "2026-04-29T10:15:00Z"
}

Update a product

PATCH /v1/products/{id} Updates an existing product. Only the fields you provide are changed.

Path parameters

id
string
required
The ID of the product to update.

Request parameters

name
string
Updated display name.
description
string
Updated description.
active
boolean
Set to false to deactivate the product. Deactivating does not affect existing subscriptions.
metadata
object
Updated metadata. Replaces the existing metadata object entirely.
curl --request PATCH \
  --url https://api.borga.is/v1/products/prod_01hx9z3k2mfq7nbvd4cw8ej5rt \
  --header "Authorization: Bearer sk_live_..." \
  --header "X-Merchant-Id: mer_xxx" \
  --header "Content-Type: application/json" \
  --data '{
    "active": false,
    "metadata": {
      "tier": "pro",
      "deprecated": "true"
    }
  }'

Response fields

Returns the updated product object. See retrieve a product for the full field reference.
{
  "id": "prod_01hx9z3k2mfq7nbvd4cw8ej5rt",
  "name": "Pro Plan",
  "description": "Full access to all features with priority support.",
  "active": false,
  "metadata": {
    "tier": "pro",
    "deprecated": "true"
  },
  "created_at": "2026-04-29T10:15:00Z"
}