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

# 获取法币→法币支付方式

> 获取法币到法币全球支付通道的支付方式，分别返回付款币种和收款币种的支付方式列表。

使用 **GET** `/v2/base/fiat/payments` 接口获取法币到法币全球支付通道可用的支付方式。通过查询参数提供付款方（入金）和收款方（出金）的国家及币种。响应返回两份独立的支付方式列表——一份用于付款端，一份用于收款端——每项都包含对应的手续费和处理类型。利用这些数据，可以在跨境支付的两端展示正确的支付通道。

## 请求

```text theme={null}
GET /v2/base/fiat/payments
```

### 请求头

| 请求头 | 值 | 必填 |
| - | - | - |
| `X-BH-TOKEN` | 通过 `GET /v2/token/generate` 获取的令牌 | ✓ |

### 查询参数

**onRampCountry** `string` *required*

付款方国家名称（例如 `"Mexico"`）。

**onRampFiat** `string` *required*

付款方法币的 ISO 4217 代码（例如 `"MXN"`）。

**offRampCountry** `string` *required*

收款方国家名称（例如 `"Argentina"`）。

**offRampFiat** `string` *required*

收款方法币的 ISO 4217 代码（例如 `"ARS"`）。

## 响应字段

**code** `number`

HTTP 风格的状态码。`200` 表示成功。

**msg** `string`

可读的状态信息，例如 `"SUCCESS"`。

**data** `object`

包含回显的支付通道及其两端支付方式的对象。

**data**

**onRampCountry** `string`

从请求中回显的付款方国家。

**onRampFiat** `string`

从请求中回显的付款方法币代码。

**offRampCountry** `string`

从请求中回显的收款方国家。

**offRampFiat** `string`

从请求中回显的收款方法币代码。

**paymentListFrom** `array`

可用于以付款方币种收取资金的支付方式。

**paymentListFrom\[]**

**paymentId** `number`

支付方式模板的唯一标识符。

**fiatFee** `string`

以付款方法币计价的手续费金额（例如 `"2"`）。

**paymentType** `number`

处理类型：`0` 表示人工，`1` 表示自动。

**paymentListTo** `array`

可用于以收款方币种发放资金的支付方式。

**paymentListTo\[]**

**paymentId** `number`

支付方式模板的唯一标识符。

**fiatFee** `string`

以收款方法币计价的手续费金额（例如 `"2"`）。

**paymentType** `number`

处理类型：`0` 表示人工，`1` 表示自动。

## 示例

```bash cURL theme={null}
curl --request GET \
  --url 'https://api.velafi.com/v2/base/fiat/payments?onRampCountry=Mexico&onRampFiat=MXN&offRampCountry=Argentina&offRampFiat=ARS' \
  --header 'X-BH-TOKEN: YOUR_TOKEN'
```

### 响应

```json theme={null}
{
  "code": 200,
  "msg": "SUCCESS",
  "data": {
    "onRampCountry": "Mexico",
    "onRampFiat": "MXN",
    "offRampCountry": "Argentina",
    "offRampFiat": "ARS",
    "paymentListFrom": [
      {
        "paymentId": 1,
        "fiatFee": "2",
        "paymentType": 1
      },
      {
        "paymentId": 2,
        "fiatFee": "1.50",
        "paymentType": 0
      }
    ],
    "paymentListTo": [
      {
        "paymentId": 1,
        "fiatFee": "2",
        "paymentType": 1
      },
      {
        "paymentId": 3,
        "fiatFee": "1.75",
        "paymentType": 0
      }
    ]
  }
}
```

> [!NOTE]
>
> 由于付款通道和收款通道相互独立运行，`paymentListFrom` 和 `paymentListTo` 可能包含不同的支付方式和手续费。请向用户同时展示两份列表，并在创建支付订单前分别为每一端收集所选的 `paymentId`。


## Related topics

- [获取法币→加密货币支付方式](https://docs.velafi.com/cn/api-reference/basic-configuration/get-fiat-crypto-payment-methods.md)
- [获取加密货币→法币支付方式](https://docs.velafi.com/cn/api-reference/basic-configuration/get-crypto-fiat-payment-methods.md)
- [获取法币→加密货币交易对](https://docs.velafi.com/cn/api-reference/basic-configuration/get-fiat-crypto-pairs.md)
- [获取法币列表](https://docs.velafi.com/cn/api-reference/basic-configuration/get-list-of-fiat-currencies.md)
- [支付方式](https://docs.velafi.com/cn/docs/payment-methods.md)


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