Skip to content

Price

A Price is the amount, currency, unit, and tiers of an Offer, embedded in it; zero is a Price.

A new Price is tested on a sibling Offer, never split within one.

Properties

PropertyTypeRequiredDescription
amountmoneyrequiredThe amount and currency. One Offer has one amount per market: test a sibling Offer instead. Never randomized.
unitstringrequiredWhat one unit is, such as a seat, a call, or a month.
meterMeterThe Meter that counts usage, for usage pricing.
fromstringLineage: the slot it compiles from, as Hypothesis#<slot>@v<version>.
statusstringrequiredOne of draft, fixed or retired, set by its Offer.

Object

JSON
{
  "$id": "https://api.sb/ledgerlark.com/prices/price_1",
  "$type": "Price",
  "amount": {
    "amount": 400,
    "currency": "USD"
  },
  "unit": "seat",
  "meter": "meter_1",
  "from": "Hypothesis#approach@v1",
  "status": "draft"
}

Relationships

  • A Price is a price of one Offer: every Offer embeds one Price: amount, currency, unit and tiers; zero is a Price. priceOf, inverse pricedAt.

Lifecycle

Price lifecycle: draft, fixed, retired (ends)draft → fixed: on Offer.publishedfixed → retired: on Offer.withdrawndraftfixedretired
StateMeaningMoves to
draft (first)Its Offer is a draft, so its amount, unit and tiers can still change.fixed on Offer.published when the Offer holds this Price
fixedIts Offer is published, so it never changes; a new price is a new Offer.retired on Offer.withdrawn when the Offer holds this Price
retiredIts Offer is withdrawn; every Order and Subscription made at it keeps it.None: it ends here.

Stripe

Price (price). The source of truth is db.sb, and Stripe holds a copy written from it.

PropertyStripe fieldSource of truth
amountunit_amountdb.sb
meterrecurring.meterdb.sb

Example

A currency-conversion API prices each conversion at amount: 0.001 on the conversion Meter, with the first 1,000 each month at zero. A sibling Offer tests amount: 0.0008 in a second Market.