Prices

Prices represent fixed monetary amounts in a specific currency that you can attach to products or use independently in order line items. Unlike inline pricing on products, standalone prices let you reuse the same price definition across multiple contexts—different order configurations, A/B pricing tests, or multi-currency catalogs. Each price is immutable in its amount: once created, the currency and value cannot change. Update the label or description, or create a new price when your pricing changes.

The price object

A price object captures a specific monetary amount in a single currency, with optional metadata for display and organization. Prices can be associated with a product or exist independently. The amount is set at creation and cannot be modified afterward—this immutability ensures that historical orders always reference the exact price that was charged.

Properties

  • Name
    about
    Type
    string
    Description

    Detailed description of what this price represents. Use for internal notes, pricing justification, or customer-facing explanations. Max 500 characters.

  • Name
    archived_at
    Type
    timestamp|null
    Description

    When this price was archived. null for active prices. Archived prices remain on existing orders but cannot be used for new ones.

  • Name
    created_at
    Type
    timestamp
    Description

    When this price was first created. Set automatically and never changes.

  • Name
    id
    Type
    string
    Description

    Unique identifier for this price, prefixed with pr_. Generated automatically during creation.

  • Name
    label
    Type
    string
    Description

    Short display name for the price. Shown in dashboards, invoices, and checkout. Max 100 characters. Examples: Monthly, Enterprise Annual, One-time setup.

  • amountobjectThe monetary amount for this price.Click or tap to expand
    • Name
      currency
      Type
      string
      Description
      Three-letter currency code (e.g., usd, ghs, kes). Set at creation and cannot be changed.
    • Name
      value
      Type
      integer
      Description
      Amount in the smallest currency unit (e.g., cents for USD, pesewas for GHS). Set at creation and cannot be changed.
  • Name
    product_id
    Type
    string|null
    Description

    The product this price belongs to, if any. Once set, the product association cannot be changed to a different product. A price without a product can later be associated with one via update.

  • Name
    updated_at
    Type
    timestamp|null
    Description

    Last time this price was modified. null if never updated after creation.


POST/prices/create

Create a price

Create a new price with a specific currency and amount. The amount and currency are immutable after creation—if your pricing changes, create a new price and archive the old one. You can optionally associate the price with an existing product and add a label or description for display purposes.

If you provide a product_id, the product must exist and belong to your application. The amount.value must be greater than zero, specified in the smallest currency unit (cents for USD, pesewas for GHS).

Request attributes

  • Name
    about
    Type
    string
    Description

    Description of the price. Max 500 characters.

  • amountobjectThe monetary amount for this price.Click or tap to expand
    • Name
      currency
      Type
      string
      Description
      Three-letter currency code (e.g., usd, ghs, kes).
    • Name
      value
      Type
      integer
      Description
      Amount in smallest currency unit. Must be greater than 0.
  • Name
    label
    Type
    string
    Description

    Short display name. Max 100 characters.

  • Name
    product_id
    Type
    string
    Description

    Associate the price with an existing product. The product must exist.

Request

POST
/prices/create
curl https://api.zebo.dev/prices/create \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": {
      "currency": "usd",
      "value": 2999
    },
    "label": "Monthly",
    "about": "Standard monthly subscription price",
    "product_id": "prod_abc123xyz789"
  }'

Response

{
  "price": {
    "id": "pr_k8m2x9v4n7p1",
    "about": "Standard monthly subscription price",
    "amount": {
      "currency": "usd",
      "value": 2999
    },
    "archived_at": null,
    "created_at": "2026-02-13T02:00:00Z",
    "label": "Monthly",
    "product_id": "prod_abc123xyz789",
    "updated_at": null
  }
}

POST/prices/lookup

Lookup a price

Retrieve the details of an existing price by its ID. Returns the full price object including its amount, currency, product association, and timestamps.

Request attributes

  • Name
    price_id
    Type
    string
    Description

    The ID of the price to retrieve.

Request

POST
/prices/lookup
curl https://api.zebo.dev/prices/lookup \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "price_id": "pr_k8m2x9v4n7p1"
  }'

Response

{
  "price": {
    "id": "pr_k8m2x9v4n7p1",
    "about": "Standard monthly subscription price",
    "amount": {
      "currency": "usd",
      "value": 2999
    },
    "archived_at": null,
    "created_at": "2026-02-13T02:00:00Z",
    "label": "Monthly",
    "product_id": "prod_abc123xyz789",
    "updated_at": null
  }
}

POST/prices/update

Update a price

Update the mutable fields of an existing price. You can change the label, description, and product association—but the amount and currency are immutable. If you need a different amount, create a new price.

Product association has a one-way constraint: a price without a product can be associated with one, but once set, the product_id cannot be changed to a different product. The referenced product must exist and belong to your application.

Request attributes

  • Name
    about
    Type
    string
    Description

    Updated description. Max 500 characters.

  • Name
    label
    Type
    string
    Description

    Updated display name. Max 100 characters.

  • Name
    price_id
    Type
    string
    Description

    The ID of the price to update.

  • Name
    product_id
    Type
    string
    Description

    Associate the price with a product. Cannot be changed once set.

Request

POST
/prices/update
curl https://api.zebo.dev/prices/update \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "price_id": "pr_k8m2x9v4n7p1",
    "label": "Monthly (discounted)",
    "about": "Promotional monthly rate for early adopters"
  }'

Response

{
  "price": {
    "id": "pr_k8m2x9v4n7p1",
    "about": "Promotional monthly rate for early adopters",
    "amount": {
      "currency": "usd",
      "value": 2999
    },
    "archived_at": null,
    "created_at": "2026-02-13T02:00:00Z",
    "label": "Monthly (discounted)",
    "product_id": "prod_abc123xyz789",
    "updated_at": "2026-02-13T03:00:00Z"
  }
}

Was this page helpful?