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

# 一次性产品端点

> 创建和管理单次购买产品

一次性产品代表单次购买的数字商品。每个产品支持多币种定价、不可变版本控制和独立的测试/生产环境。

## 产品状态值

| 状态         | 说明                  |
| ---------- | ------------------- |
| `active`   | 产品已上线，可通过收银台购买      |
| `inactive` | 产品已从收银台中隐藏，现有订单不受影响 |

## 典型工作流程

```mermaid theme={"system"}
sequenceDiagram
    participant M as Merchant
    participant T as Test Environment
    participant P as Production

    M->>T: Create Product (test)
    T-->>M: testStatus=active, prodStatus=inactive
    M->>T: Update Product (iterate)
    T-->>M: New version created (v2, v3...)
    M->>T: Publish Product
    T->>P: Copy test version to production
    P-->>M: prodStatus=active, testStatus=active
    M->>P: Update Product (X-Environment: prod)
    P-->>M: New production version
    M->>P: Update Status (inactive)
    P-->>M: Product hidden from checkout
```

## 端点

<CardGroup cols={2}>
  <Card title="创建产品" icon="plus" href="/api-reference/endpoints/onetime-products/create-product">
    创建支持多币种定价的一次性购买产品。
  </Card>

  <Card title="更新产品" icon="pen-to-square" href="/api-reference/endpoints/onetime-products/update-product">
    更新产品内容。如有内容变更，自动创建新的不可变版本。
  </Card>

  <Card title="发布产品" icon="rocket" href="/api-reference/endpoints/onetime-products/publish-product">
    将产品从测试环境发布到生产环境。
  </Card>

  <Card title="更新状态" icon="toggle-on" href="/api-reference/endpoints/onetime-products/update-status">
    激活或停用产品的收银台可见性。
  </Card>
</CardGroup>
