GET| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| appid | String | 是 | 应用ID(渠道ID) |
| order_num | String | 是 | 订单号,由我方生成的唯一订单编号 |
| app_user_id | String | 是 | 用户在渠道侧的唯一标识 |
| task_id | String | 是 | 任务ID |
| user_order_id | String | 是 | 用户订单ID(接单记录ID) |
| event | String | 是 | 事件描述,URL 编码传输,接收方需先 URL decode |
| type | Integer | 是 | 类型,当前固定为 1 |
| price | String | 是 | 结算价格(单位:元),计算方式见附录 |
| money | String | 是 | 用户奖励金额(单位:元),计算方式见附录 |
| profit | String | 是 | 平台利润(单位:元),price - money |
| timestamp | Long | 是 | 时间戳,Unix 毫秒数 |
| sign | String | 是 | MD5 签名,用于参数校验 |
GET /api/order/receive?appid=8&order_num=DD2026062200001&app_user_id=ch_uid_12345&task_id=10086&user_order_id=9527&event=%E4%BB%BB%E5%8A%A110086%E5%AE%A1%E6%A0%B8%E9%80%9A%E8%BF%87&type=1&price=9.5&money=8.55&profit=0.95×tamp=1750588800000&sign=a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6event URL decode 后为:任务10086审核通过price=9.5 表示结算金额 9.5 元(stripTrailingZeros 去掉了末尾零,实际传输时 9.50 → 9.5)money=8.55 表示用户应得奖励 8.55 元profit=0.95 表示平台利润 0.95 元(9.5 - 8.55)event 参数的特殊处理:URL 中 event 是 URL 编码的( %E4%BB%BB...),但签名计算使用的是 URL decode 后的原始值(任务10086审核通过)。接收方校验签名时必须先对 event 做 URL decode。
sign 外所有非 null 的参数键值对。event 使用 URL decode 后的原始值。("appid", "8")
("order_num", "DD2026062200001")
("app_user_id", "ch_uid_12345")
("task_id", "10086")
("user_order_id", "9527")
("event", "任务10086审核通过")
("type", 1)
("price", "9.5")
("money", "8.55")
("profit", "0.95")
("timestamp", 1750588800000)String.compareTo),排序结果:("app_user_id", "ch_uid_12345")
("appid", "8")
("event", "任务10086审核通过")
("money", "8.55")
("order_num", "DD2026062200001")
("price", "9.5")
("profit", "0.95")
("task_id", "10086")
("timestamp", 1750588800000)
("type", 1)
("user_order_id", "9527")ch_uid_123458任务10086审核通过8.55DD20260622000019.50.9510086175058880000019527拼接说明: ch_uid_12345+8+任务10086审核通过+8.55+DD2026062200001+9.5+0.95+10086+1750588800000+1+9527
secretKey(双方约定的密钥):ch_uid_123458任务10086审核通过8.55DD20260622000019.50.9510086175058880000019527{your_secret_key}sign 值。event 参数做 URL decodesign 参数对比,一致则通过校验{
"status": 0,
"message": "success"
}| 字段 | 类型 | 说明 |
|---|---|---|
| status | Integer | 0 表示接收成功,非0 表示接收失败 |
| message | String | 状态描述;成功时为 "success",失败时为具体错误原因 |
{"status":0,"message":"success"}{"status":1,"message":"签名校验失败"}{"status":2,"message":"订单号重复"}timestamp 在合理时间窗口内(建议 ±5 分钟)order_num 是否已处理过,防止重复接收price = money + profit(允许浮点误差){"status":0,"message":"success"}| 重试次数 | 间隔时间 |
|---|---|
| 第1次失败 | 1 分钟后重试 |
| 第2次失败 | 5 分钟后重试 |
| 第3次失败 | 10 分钟后重试 |
| 超过3次 | 不再重试,标记推送失败 |
幂等性要求:同一个 order_num可能被多次推送,接收方必须保证重复推送不重复创建订单。