| 属性名 | 类型 | 描述 |
|---|---|---|
| id | string | 定价方案ID |
| price_name | string | 定价方案名称 |
| price_alias | string | 定价方案别名 |
| product_id | string | 关联商品ID |
| merchant_id | string | 商户ID |
| currency | string | 币种 |
| billing_type | string | 计费类型:one_time-一次性、recurring-周期性 |
| price_val | string | 一次性付费价格,billing_type为one_time时必填 |
| description | string | 定价描述 |
| price_plan | PricePlan | 定价计划 |
| biz_status | string | 状态: draft: 草稿 active: 已激活 frozen: 已冻结 |
| has_trial | boolean | 是否启用试用期: 0: 否 1: 是 |
| trial_period | TrialPeriod | 试用期配置 |
| created_at | string | 创建时间 |
| price_type | string | 定价模型 |
| usage_amount | string | 资源包用量 |
| usage_unit | string | 资源包用量单位 |
| model_type | string | 定价模型二级类型 |
| billing_threshold | string | 扣费金额阈值 |
| trial_type | int | 试用类型 0: 免费试用 1: 付费试用 |
| trial_amount | string | 试用价格 |
| metadata | map[string]string | 一组可附加到对象上的键值对,允许您以结构化格式存储附加信息。 |
PricePlan
| 属性名 | 类型 | 描述 |
|---|---|---|
| id | string | 定价计划ID,系统生成的唯一标识 |
| name | string | 计划名称,显示给用户的名称 |
| billing_cycle_unit | string | 计费周期单位,如:day、week、month、year等 |
| billing_cycle_count | int | 计费周期数量,如:1个月、3个月等 |
| is_infinite | boolean | 是否无限期,true表示永久有效 |
| base_price_val | string | 基础价格,计划的基础定价 |
| plan_description | string | 计划描述,详细的计划说明信息 |
| price_plan_tiers | PriceTier[] | 分级定价明细,不同周期的具体价格 |
PriceTier
| 属性名 | 类型 | 描述 |
|---|---|---|
| billing_cycle_index | int | 计费周期索引,表示第几个周期 |
| price_val | string | 价格值,该周期的具体价格 |
| discount_type | string | 优惠类型,如:percentage、fixed等 |
| discount_value | string | 优惠值,具体的优惠金额或比例 |
TrialPeriod
| 属性名 | 类型 | 描述 |
|---|---|---|
| trial_period_unit | string | 试用期单位,必填,如:day、week、month等 |
| trial_period_count | int | 试用期数量,必填,如:7天、1个月等 |