Skip to Content
Docs
Prices

Update a price

PATCH/prices/{price_id}

A new unit_amount or tax_behavior adds a version, which applies to sessions created from then on. Open sessions, orders and invoices keep the version they have. Set active to false to archive the price. Prices are archived, never deleted.

Headers

AuthorizationstringRequired
HTTP Basic auth: your API key as the password, with an empty username. See Authentication.

Path parameters

price_idstringRequired

The price's ID (prc_).

Parameters

unit_amountinteger

Adds a version.

tax_behaviorstring

exclusive adds tax to the amount, and inclusive includes it.

One of exclusive or inclusive.

activeboolean
metadataobject

Your key-value pairs. Up to 50 keys of 40 characters, with string values of up to 500 characters.

Returns

The updated price.

idstring
resourcestring
productstring
referencestring or null
typestring

recurring for a price with a schedule.

One of one_time or recurring.

scheduleobject or null
Show 2 child attributesHide child attributes
Option 1object

How often a recurring price bills.

Show 2 child attributesHide child attributes
intervalstringRequired

One of day, week, month or year.

interval_countinteger

Default: 1

Option 2null
subscription_optionsobject or null
Show 2 child attributesHide child attributes
enginestring
connectionstring or null
currencystring

Three-letter ISO currency code, in lowercase.

Show 8 more attributesShow fewer attributes
unit_amountinteger
tax_behaviorstring

exclusive adds tax to the amount, and inclusive includes it.

One of exclusive or inclusive.

versioninteger
current_versioninteger

The latest version. Differs from version when you ask for an earlier one.

activeboolean
metadataobject

Your key-value pairs. Up to 50 keys of 40 characters, with string values of up to 500 characters.

createdstring
test_modeboolean

Errors

400
The request is invalid.
401
The API key is missing or wrong.
403
The key's permissions don't allow this route.
404
No such object in this workspace and environment.
Was this page helpful?