Skip to main content
POST
Update Price
Fully overwrites the price; the request body is the same as creation. Updating an active price creates a new version and returns the new version ID; existing subscriptions stay bound to the old version and are not affected. Changing status, product, or currency is not supported. Plan name, plan description, and finite-term settings not exposed in price_plan keep their current values. When billing_dimension is empty, the current dimension, payment timing, and usage threshold are kept; when only billing_dimension is changed, payment timing is derived from the new dimension. Trial period units support day / week / month; when has_trial is set to false, trial_type and trial_amount are reset while the trial period unit and length are kept.

Authorizations

Authorization
string
header
required

Bearer API Key authentication. Format: Authorization: Bearer {your_api_key}

Headers

Request-Id
string
default:008e3967-a1b5-48bb-be14-d5bff5092e61
required

The unique identifier of the request

Path Parameters

price_id
string
required

Price ID

Body

application/json

Update price request (full overwrite: the request body is the same as creation; the currency is taken from the price itself and cannot be changed; plan name, plan description and finite-term settings (is_infinite / billing_cycle_count) in price_plan that are not exposed by the contract keep their current values)

price_id
string
required

Price ID

name
string
required

Price name

billing_type
string
required

Billing type: one_time - one-off / recurring - recurring

description
string
required

Price description

price_type
string
required

Price type, one of the following: flat_price | package_price | tiers_price

price_val
string

One-time payment price, required when billing_type is one_time

has_trial
boolean

Whether trial period is enabled. When set to false, trial_type and trial_amount are reset to defaults; the unit and length of trial_period are kept

trial_period
object

Trial period configuration; required when has_trial is true. trial_period_unit currently only supports day and defaults to day when omitted; may be omitted when has_trial is false, in which case the existing trial length is kept

price_plan
object

Price plan, required when billing_type is recurring

usage_amount
string

Package usage amount (included quantity), required when price_type is package_price

usage_unit
string

Usage unit, required when price_type is package_price

features
object[]

Price features

model_type
string

Secondary price model type (deprecated)

billing_threshold
string

Billing amount threshold (deprecated, use usage_threshold instead)

trial_type
integer<int32>

Trial type: 0 - Free trial | 1 - Paid trial

trial_amount
string

Trial amount, required when trial_type is 1 - Paid trial

payment_timing
string

Payment timing: prepaid / postpaid. When billing_dimension is also empty, the current value is kept; when billing_dimension is explicitly provided and this field is empty, it is derived from the new dimension (quantity→prepaid, usage→postpaid)

billing_dimension
string

Billing dimension: quantity / usage; empty keeps the current dimension

usage_threshold
string

Usage threshold; empty keeps the current value (clearing it via this API is not supported)

once_trial
boolean

Whether each customer can use the trial period only once. Omitted keeps the current value; only takes effect when has_trial is true

Response

200 - application/json

OK

Update price response

code
string

error code

message
string

error message

data
object

Update price response