功能说明
根据收银设备 SN 和厂商编号获取对应的商户信息,包括商户编号、商户名称、员工信息及密钥等。请求地址
POST /v1/aggregate/merchant/get
请求参数
请求示例
响应参数
app_secret 的加密方式说明:- 加密算法:SM4-CTR
- 密钥派生:
HMAC-SHA256(app_key, "sm4ctr-key")[:16] - IV 派生:
HMAC-SHA256(app_key, "sm4ctr-iv")[:16]
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
POST /v1/aggregate/merchant/get
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
sn | string | 是 | 收银设备 SN |
vendor_code | string | 是 | 厂商编号 |
{
"sn": "SN123456789",
"vendor_code": "V001"
}
| 字段 | 类型 | 说明 |
|---|---|---|
merchant_code | string | 商户编号 |
merchant_name | string | 商户名称 |
staff_code | string | 员工编号 |
staff_name | string | 员工名称 |
app_key | string | app_key |
app_secret | string | app_secret,使用 SM4-CTR 加密后 Base64 编码返回,设备端用 app_key 解密 |
app_secret 的加密方式说明:HMAC-SHA256(app_key, "sm4ctr-key")[:16]HMAC-SHA256(app_key, "sm4ctr-iv")[:16]{
"merchant_code": "226801000000865319122",
"merchant_name": "示例商户",
"staff_code": "STAFF001",
"staff_name": "张三",
"app_key": "ak_example_key",
"app_secret": "Base64EncodedSM4CTREncryptedValue=="
}
