跳转到主要内容
POST
创建定价方案

授权

Authorization
string
header
必填

Bearer API Key 鉴权。格式:Authorization: Bearer {your_api_key}

请求头

Request-Id
string
默认值:008e3967-a1b5-48bb-be14-d5bff5092e61
必填

请求的唯一标识符

请求体

application/json

创建定价方案请求

name
string
必填

定价方案名称

product_id
string
必填

关联商品 ID

product_version_id
string
必填

商品版本 ID

billing_type
string
必填

计费类型:one_time-一次性 / recurring-周期性

description
string
必填

定价描述

price_type
string
必填

定价类型,取值之一:flat_price | package_price | based_on_usage

price_val
string

一次性支付价格,当 billing_type 为 one_time 时必填

has_trial
boolean

是否启用试用期

trial_period
object

试用期配置

price_plan
object

定价计划,当 billing_type 为 recurring 时必填

usage_amount
string

用量,当 price_type 为 based_on_usage 或 package_price 时必填

usage_unit
string

用量单位,当 price_type 为 based_on_usage 或 package_price 时必填

features
object[]

定价权益列表

model_type
string

定价模型类型,取值之一:per_unit | tiers_price,当 price_type 为 based_on_usage 时必填

billing_threshold
string

扣费阈值,当 model_type 为 per_unit 时必填

trial_type
integer<int32>

试用类型:0-免费试用 | 1-付费试用

trial_amount
string

试用价格,当 trial_type 为 1(付费试用)时必填

status
string

状态:

  • draft:草稿
  • active:已激活
  • frozen:已冻结

响应

200 - application/json

OK

创建定价方案响应

code
string

error code

message
string

error message

data
object

创建定价方案响应