Skip to main content
POST
Error

Autorizações

Authorization
string
header
obrigatório

A staff session token, uk_st_…. Minted by sign-up, sign-in or the two-factor exchange.

Cabeçalhos

X-Organization-Id
string

The organization the caller is acting on — the org_… code that appears in the panel URL. It identifies; the membership JOIN is what authorizes, so a forged code reads nothing. Absent, the session's default organization answers.

Parâmetros de caminho

id
string<uuid>
obrigatório

The price being superseded. It must still be live.

Parâmetros de consulta

environment
enum<string>
padrão:live

Which environment to act in. A view parameter, valid only on the staff surface — a machine credential never chooses its environment, it is resolved from the key.

Opções disponíveis:
live,
test

Corpo

application/json

A price on the way in — what both creating and repricing send. Every field is stated: there is no PATCH on a price, so no request carrying this is editing one, and "leave that field as it was" has no meaning here.

kind
enum<string>
obrigatório
Opções disponíveis:
recurring,
one_time
currency
string
obrigatório

ISO 4217, uppercase. Required — an amount with no currency is not a price, and 1000 is R$10.00 in BRL and ¥1000 in JPY.

Exemplo:

"BRL"

amount_minor
integer<int64>
obrigatório

An integer in the currency's minor unit: 14900 is R$149.00. Never a decimal, and never divided by 100 on the way in — the currency's exponent is 0 for JPY and CLP and 3 for KWD.

Intervalo obrigatório: x >= 0
tax_behavior
enum<string>
obrigatório

Whether amount_minor already contains the tax. Required, with no third "undecided" value: we calculate no tax — that is the payment provider's job — but whether the number includes it is an input only the person who typed the number knows, and the moment it matters is the moment somebody is charged.

Opções disponíveis:
inclusive,
exclusive
interval_unit
enum<string>

Required on a recurring price and refused on a one_time one, rather than ignored: a lifetime deal carrying a monthly interval is how it ends up in a renewal job's query.

Opções disponíveis:
day,
week,
month,
year
interval_count
integer

How many intervals between charges. Required on recurring, refused on one_time.

Intervalo obrigatório: x >= 1

Resposta

Both rows: the new offer, and the one it superseded. The archived price comes back so a screen showing it does not have to re-read the catalogue to learn it is gone.

price
object

One plan's amount in one currency. A plan has many prices, one per currency: selling in BRL and USD is a price per currency, a number you chose, never a conversion at display time.

A price is immutable. Repricing means creating a new price and archiving the old one, because a subscription refers to the price it was sold at and editing the amount would silently change what somebody agreed to pay.

archived_price
object

One plan's amount in one currency. A plan has many prices, one per currency: selling in BRL and USD is a price per currency, a number you chose, never a conversion at display time.

A price is immutable. Repricing means creating a new price and archiving the old one, because a subscription refers to the price it was sold at and editing the amount would silently change what somebody agreed to pay.