> ## Documentation Index
> Fetch the complete documentation index at: https://docs.subotiz.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 定价

## 事件列表

| **事件名称** | **事件类型** | **触发时机** | **通知数据结构** |
| - | - | - | - |
| 定价新建通知 | v2.price.created | 定价方案创建成功时 | [Price](#事件对象) |
| 定价更新通知 | v2.price.updated | 定价方案信息或状态更新成功时 | [Price](#事件对象) |
| 定价删除通知 | v2.price.deleted | 定价方案删除成功时 | [Price](#事件对象) |

> [!NOTE]
>
> 通知数据仅包含定价方案的标识与状态信息。如需定价详情，请使用 `price_id` 调用 [获取定价方案](https://docs.subotiz.com/zh/api/v1-price-get-price.md) 接口查询。

## 事件对象

| **属性** | **类型** | **描述** | **示例** |
| - | - | - | - |
| merchant\_id | string | 商户 ID | 100010 |
| price\_id | string | Subotiz 定价方案 ID | 583564652533787501 |
| merchant\_price\_id | string | 商户侧定价方案 ID | price\_basic\_monthly |
| price\_version\_id | string | 定价方案版本 ID | 583564652533787502 |
| product\_id | string | 所属商品 ID | 583564652533787306 |
| status | string | 定价方案状态： `draft` - 草稿 `active` - 已激活 `frozen` - 已冻结 | active |
| source | string | 操作来源 | openapi |
| operated\_at | string | 操作时间（RFC3339） | 2026-11-19T08:00:00Z |

> [!TIP]
>
> Webhook 可能因重试等原因乱序到达。请以 `operated_at` 判断事件先后，避免旧事件覆盖新状态。

## 示例

```json v2.price.created theme={null}
{
  "id": "583564652533787601",
  "type": "v2.price.created",
  "created": "2026-11-19T08:00:00Z",
  "data": {
    "merchant_id": "100010",
    "price_id": "583564652533787501",
    "merchant_price_id": "price_basic_monthly",
    "price_version_id": "583564652533787502",
    "product_id": "583564652533787306",
    "status": "draft",
    "source": "openapi",
    "operated_at": "2026-11-19T08:00:00Z"
  }
}
```

```json v2.price.updated theme={null}
{
  "id": "583564652533787602",
  "type": "v2.price.updated",
  "created": "2026-11-19T09:00:00Z",
  "data": {
    "merchant_id": "100010",
    "price_id": "583564652533787501",
    "merchant_price_id": "price_basic_monthly",
    "price_version_id": "583564652533787503",
    "product_id": "583564652533787306",
    "status": "active",
    "source": "openapi",
    "operated_at": "2026-11-19T09:00:00Z"
  }
}
```

```json v2.price.deleted theme={null}
{
  "id": "583564652533787603",
  "type": "v2.price.deleted",
  "created": "2026-11-19T10:00:00Z",
  "data": {
    "merchant_id": "100010",
    "price_id": "583564652533787501",
    "merchant_price_id": "price_basic_monthly",
    "price_version_id": "583564652533787503",
    "product_id": "583564652533787306",
    "status": "frozen",
    "source": "openapi",
    "operated_at": "2026-11-19T10:00:00Z"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.