Create a price
curl -X POST "https://api.summerbase.com/v1/prices" \ -H "Authorization: Bearer sb_..." \ -H "Content-Type: application/json" \ -d '{ "name": "Growth monthly", "plan_id": "backend:growth" }'const response = await fetch("https://api.summerbase.com/v1/prices", { method: "POST", headers: { Authorization: "Bearer sb_...", "Content-Type": "application/json", }, body: JSON.stringify({ "name": "Growth monthly", "plan_id": "backend:growth" }),})const data = await response.json()Creates a price. Your source owns it, and is the only one that may rename it, archive it or change its terms.
Its terms are what your catalog lists it at, for reading: a subscription item on it is valued by the item’s own terms, which may differ.
A price has to exist before a subscription item names it: send it with
PATCH /v1/prices/{id}, under your own id, first.
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Relationships to include in the response instead of fetching separately. A dotted path expands what an expanded record can expand in turn — at most 4 deep, 10 paths a request, and never back to a record already on the path.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Whether the price has stopped being offered. Existing subscriptions keep it — what somebody paid for last year does not stop being true when you withdraw the price.
The currency it is listed in, by its ISO 4217 code.
The unit it bills in. None for a price charged once.
How many intervals between charges.
What the price is called in the source it lives in, when it has a name of its own there — a Stripe price’s nickname. Most have none, and are told apart by their terms.
What to do about the parts of this write that cannot be applied as sent, or that would merge two records together.
warn applies everything it can and reports the rest in warnings, so
one unusable property never costs you a subscription’s amounts. error
applies none of it unless all of it applies: the write is rolled back
and every warning comes back as an error instead.
Send error from a form, where somebody is waiting to be told what to
fix, and where folding two customers together is a thing to confirm
rather than to discover afterwards. Leave it alone in an ingest client,
which wants the revenue to land either way.
The plan the price is on — a Summerbase id, or a source identity such as
the product it is a price of, stripe:prod_123. It has to exist: create
it first, with PATCH /v1/plans/{id}.
How an item’s unit amount is arrived at on this price.
Properties to record in your source.
Property keys and the values to set. Only the keys named here change; null clears one.
object
object
What to do with the value. Defaults to setting it.
What this value is. Given here, it is not inferred; omitted, the key’s existing definition decides, and a new key takes the type its first value looks like.
The value, as a string. Parsed into the key’s type — which type states
outright, or which the key’s existing definition decides. Null clears the
key.
What one unit is listed at per interval: for a metered price, one unit
of usage. None for a tiered one, whose units cost what their tier says.
Excludes tax.
Example
{ "name": "Growth monthly", "plan_id": "backend:growth"}Response
Section titled “Response”Returns the price object, with response_metadata about this request.
object
About this request rather than about the record. Absent when there is nothing to say.
object
Parts of this write that were skipped — a property whose value did not fit its type — and things it did that were worth saying, like merging two customers. The rest of the write landed. Absent when there is nothing to report.
Send on_warning: "error" to have these refuse the write instead,
and come back as error.errors with the same codes.
object
What kind of thing was skipped, for a client to branch on.
The input it came from, like properties.seats.
What was skipped and why, in a sentence.
Example
{ "archived": false, "created_at": "2025-09-08T14:12:30Z", "currency_code": "USD", "id": "0198f1a4-2e5f-7b80-a1c2-3d4e5f6a7b8c", "identities": [ "stripe:price_1PqR8sT2uV4wX6yZ" ], "interval": "month", "interval_count": 1, "name": "Growth monthly", "object": "price", "owner_source_id": "0198f1a3-0b7c-7e25-9f41-6a2d8c3e5b19", "plan_id": "0198f1a4-1d2e-7a40-9b31-5c6d7e8f9a0b", "pricing_model": "fixed", "properties": { "tier": "mid" }, "properties_by_source": { "backend": { "tier": "mid" } }, "unit_amount": "50.00"}