> For the complete documentation index, see [llms.txt](https://doc.upibee.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.upibee.com/shang-hu-jie-ru-shuo-ming.md).

# 商户接入说明

商户后台登录与 API 接入指南

### 一、登录商户后台

1. 联系运营人员获取以下信息（仅供测试使用）：
   * 商户后台链接
   * 登录账号
   * 登录密码
2. 登录后，点击右上角 **「API接口设置」** 进入接口配置页面。

![](https://4140496967-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGyAeswchHcLABonmhl23%2Fuploads%2F2h7tQXdv5sSby1ojSlrl%2Fimage.png?alt=media\&token=a4e6c5b6-b973-4ed4-965e-9c798f6d05d6)

***

### 二、API接口设置

1. 点击 重新生成 按钮。
2. 输入 **谷歌验证码**。
3. 点击 **「提交」** 后生效。

<figure><img src="https://4140496967-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGyAeswchHcLABonmhl23%2Fuploads%2FYzQzwIvxB23O0VG6mjmx%2Fimage_2026-03-11_14-38-59.png?alt=media&amp;token=49f770e1-2872-47a2-b30e-e0712ba9e4ba" alt=""><figcaption></figcaption></figure>

***

### 三、接口调用说明

#### 请求头设置

在请求 Header 中加入以下字段：

```
Authorization: Bearer {商户ID}
```

**示例：**

```
Authorization: Bearer 854498852339712
```

***

### 四、回调说明

1. 回调失败将自动重试 **3 次**。
2. 回调请求方式：`POST`
3. 回调内容为 **AES 加密的 JSON 字符串**。

#### 示例：渠道代收回调

```json
{
  "sourceNo": "商户订单号",
  "data": "加密后的代收订单详情(具体参数参考 get 返回值)"
}
```

#### 示例：解密后的代收订单详情

```json
{
  "creditOrderSimpleInfo": {
    "id": 1,
    "merchantSourceNo": "text",
    "amount": 1,
    "actualAmount": 1,
    "processCode": 0,
    "createdTime": 1,
    "updatedTime": 1,
    "closedTime": 1,
    "cashierLink": "text",
    "upiLink": "text",
    "callbackCode": 0,
    "payerDetail": {
        "accountCode": 1,
        "realName": "text",
        "accountNo": "text",
        "bankName": "text",
        "ifsc": "text"
    },
    "payeeDetail": {
        "accountCode": 1,
        "realName": "text",
        "accountNo": "text",
        "bankName": "text",
        "ifsc": "text"
    },
    "voucherDetail": {
        "utr": "text",
        "note": "text",
    }
  }
}
```

***

### 五、AES 加密说明

| 参数项  | 说明          |
| ---- | ----------- |
| 运算模式 | ECB         |
| 填充模式 | PKCS7       |
| 秘钥长度 | 256 bits    |
| 秘钥   | 同 AccessKey |
| 字符编码 | UTF-8       |
| 输出格式 | Base64      |

#### 🔑 示例

| 项目   | 值                                  |
| ---- | ---------------------------------- |
| 原始值  | `Test`                             |
| 秘钥   | `ecb797f9e9feab0a92ab283978d33711` |
| 加密结果 | `M2SwiX1fxQ5aJ34scDi0zA==`         |

👉 可使用在线工具测试：[**AES 加密工具**](https://www.toolhelper.cn/SymmetricEncryption/AES)

***

### 六、环境说明

#### 环境地址

| 环境   | Endpoint                      |
| ---- | ----------------------------- |
| 测试环境 | `https://api-beta.upibee.com` |
| 生产环境 | `联系运营人员获取`                    |

#### ⚠️ 上线前须完成以下事项

1. 联系运营人员获取 **生产环境商户后台链接**；
2. **重新申请并配置 AccessKey**；
3. 设置并验证 API设置；

> 以上配置完成并通过测试后，方可切换至生产环境进行业务操作。
