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

# 定价币种方案

> 了解 Waffo 支持的三种定价币种策略：全球统一定价、各国分别定价、区域定价，以及如何正确传参。

商户在接入 Waffo 时，需要根据业务模式选择合适的定价币种策略。Waffo 支持三种定价方式。

## 三种定价策略

### 全球统一定价

**场景**：SaaS 产品、数字内容等，全球统一用一种货币定价（通常为 USD）。

**传参方式**：

* `orderCurrency`: 商户结算币种（如 `"USD"`）
* `orderAmount`: 统一价格（如 `"9.99"`）
* `userCurrency`: 不传，Waffo 自动转换为用户本地币种

**优势**：定价管理简单，只需维护一套价格体系，汇率由 Waffo 处理。

**注意**：用户在收银台看到的本地币种金额会因汇率波动而变化。

```json theme={null}
{
  "orderCurrency": "USD",
  "orderAmount": "9.99",
  "orderDescription": "Pro Plan - Monthly"
}
```

### 各国分别定价

**场景**：电商、游戏等，每个国家有独立的本地币种定价。

**传参方式**：

* `orderCurrency`: 用户所在国的本地币种（如印尼 `"IDR"`、菲律宾 `"PHP"`）
* `orderAmount`: 该国的本地价格
* `userCurrency`: 不传（因为 `orderCurrency` 就是本地币种，属于同币种下单）

**优势**：用户看到的金额固定，无汇率波动，体验更好。

**注意**：需维护各国价格表，且需注意不同币种的小数位规则。详见[币种与金额](/docs/zh/developer-docs/core-concepts/currency)。

印尼（IDR，0 小数位）：

```json theme={null}
{
  "orderCurrency": "IDR",
  "orderAmount": "149000",
  "orderDescription": "商品描述"
}
```

菲律宾（PHP，2 小数位）：

```json theme={null}
{
  "orderCurrency": "PHP",
  "orderAmount": "499.00",
  "orderDescription": "商品描述"
}
```

### 区域定价

**场景**：按区域分组定价（如东南亚、拉美、欧洲），每个区域使用统一的定价币种。

**传参方式**：

* `orderCurrency`: 区域内的定价币种（如东南亚用 `"USD"`，欧洲用 `"EUR"`）
* `orderAmount`: 区域统一价格
* `userCurrency`: 不传，Waffo 自动转换

**优势**：平衡定价复杂度和本地化体验，减少需要维护的价格数量。

**注意**：区域内不同国家的用户看到的本地金额仍会因汇率波动。

```json theme={null}
{
  "orderCurrency": "EUR",
  "orderAmount": "8.99",
  "orderDescription": "Pro Plan - Monthly (Europe)"
}
```

## 传参对比

| 策略     | orderCurrency | userCurrency | orderAmount | 用户看到的金额         |
| ------ | ------------- | ------------ | ----------- | --------------- |
| 全球统一定价 | 统一币种（如 USD）   | 不传（自动转换）     | 统一价格        | 本地币种等值金额（随汇率变化） |
| 各国分别定价 | 本地币种          | 不传           | 本地价格        | 固定金额            |
| 区域定价   | 区域币种          | 不传（自动转换）     | 区域价格        | 本地币种等值金额（随汇率变化） |

## 金额格式和小数位

金额必须使用 **String 类型**（不能用 Number/float/double），且不同币种的小数位规则不同（传错返回 `A0003`）。完整的格式规范、小数位规则与币种列表见 [币种与金额](/docs/zh/developer-docs/core-concepts/currency)。
