Skip to content

Create a price

POST
/v1/prices
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"
}'

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.

expand[]
Array<string>
<= 10 items
Allowed values: owner_source plan

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.

Media typeapplication/json
object
archived

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.

boolean
currency_code

The currency it is listed in, by its ISO 4217 code.

string
>= 3 characters <= 3 characters
interval

The unit it bills in. None for a price charged once.

string
Allowed values: day week month year
interval_count

How many intervals between charges.

integer
>= 1
name

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.

string
>= 1 characters <= 255 characters
on_warning

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.

string
Allowed values: warn error
plan_id
required

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}.

string
>= 1 characters <= 320 characters
pricing_model

How an item’s unit amount is arrived at on this price.

string
Allowed values: fixed tiered metered
properties

Properties to record in your source.

Property keys and the values to set. Only the keys named here change; null clears one.

object
key
additional properties
Any of:
string
unit_amount

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.

string format: decimal

Example

{
"name": "Growth monthly",
"plan_id": "backend:growth"
}

Returns the price object, with response_metadata about this request.

Media typeapplication/json
object
response_metadata

About this request rather than about the record. Absent when there is nothing to say.

object
warnings

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.

Array<object>
object
code
required

What kind of thing was skipped, for a client to branch on.

string
field

The input it came from, like properties.seats.

string
message
required

What was skipped and why, in a sentence.

string

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"
}