Remove a price from a plan
const url = 'http://localhost:8080/v1/plans/example/prices/example';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url http://localhost:8080/v1/plans/example/prices/example \ --header 'Authorization: Bearer <token>'On a plan no subscription has used, the price is gone at once. On a
used plan it takes no part from each subscriber’s next billing
period; the current period keeps it. A subscriber who first joins the
plan in a period after the removal does not pay it (see
PriceWrite). The removal
ends every customer override of the price, each when the removal
takes effect for its customer, and the answer names them
(ended_overrides). Adding the price back later keeps its id but not
the overrides.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Responses
Section titled “Responses”The removed price, when the removal applies, and the overrides it ended
The answer to a price write: the price, and when the write applies.
now: no subscription has used the plan, so it applies at once.
next_period: each subscriber pays the new content from their next
billing period; the current period keeps the prices it started with.
A subscriber who first joins the plan in a period after the write
gets it from the join: a subscription that starts after it (after a
trial, from the trial’s end), an immediate plan change onto the
plan, or an item added on it. Each is priced from that moment by the
plan’s prices then, so a subscription that starts later on the day
of the write bills a price added that day and not one removed that
day. A subscription that was on the plan earlier in the period and
joins it again keeps the prices of its first join until its next
period. On a test clock, the write takes effect just after the
clock’s time: a subscriber who joins at that same clock time gets
the earlier prices.
object
The labels an event must carry for this price to take it, for
example {"model": "claude-opus-4.5", "token_type": "input"}.
{} takes every event of the meter. Of the prices whose labels
an event carries, the one with the most labels takes it.
object
As on PriceShape.
Price per unit in cents, as a decimal string.
Empty ([]) unless mode is graduated.
object
The tier’s upper bound in whole units: the tier prices the quantity above the previous tier’s bound, up to this one. null on the last tier, which has no upper bound. Only the last tier is null, and it must be.
Price per unit in cents in this tier, as a decimal string.
Price of one package in cents, as a decimal string.
When the content shown was saved.
True on the answer to a removal.
On a removal, the customer overrides of the price it ended. Each ends when the removal takes effect for its customer.
object
Example
{ "id": "hc_prc_1a2b3c4d5e6f7890abcdef12", "mode": "per_unit", "effective": "now"}not_found: no such plan, or no such price on it (a removed price included).
object
object
One of invalid_request_error, authentication_error,
rate_limit_error or api_error. Every error the API
answers has this shape, including an unknown path (404,
code route_not_found) and a method the path does not take
(405, code method_not_allowed, with an Allow header).
The few exceptions are listed in docs/api-surface.md.
The request field the error is about. Sent only when the error
names one. A request body may hold only the fields its
operation lists, spelled and cased as listed: any other
field, or one the server sets (such as id), is refused
with 422 and param naming it. An operation with no request body lists no fields: send
no body, {} or null. The Stripe and Postmark webhooks and
the LiteLLM callback take their sender’s body as it comes.
Example
{ "error": { "type": "invalid_request_error" }}