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
| Property | Type | Required | Description |
|---|---|---|---|
amount | money | required | The amount and currency. One Offer has one amount per market: test a sibling Offer instead. Never randomized. |
unit | string | required | What one unit is, such as a seat, a call, or a month. |
meter | Meter | The Meter that counts usage, for usage pricing. | |
from | string | Lineage: the slot it compiles from, as Hypothesis#<slot>@v<version>. | |
status | string | required | One of draft, fixed or retired, set by its Offer. |
Object
{
"$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, inversepricedAt.
Lifecycle
| State | Meaning | Moves 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 |
fixed | Its Offer is published, so it never changes; a new price is a new Offer. | retired on Offer.withdrawn when the Offer holds this Price |
retired | Its 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.
| Property | Stripe field | Source of truth |
|---|---|---|
amount | unit_amount | db.sb |
meter | recurring.meter | db.sb |
Example
A currency-conversion API prices each conversion at amount: on the conversion Meter, with the first 1,000 each month at zero. A sibling Offer tests amount: in a second Market.