欢迎接入侠客支付接口。本页仅提供接入概览,便于快速对接;完整参数与联调请登录商家中心查看。
| # | 必要前提 | 说明 |
|---|---|---|
| 1 | 完成商家入驻并审核通过 | 注册账号后提交资料,审核通过后方可使用开放接口。立即注册 |
| 2 | 获取 API Key / Secret | 登录商家中心 →「独立 API」查看 api_key 与 api_secret。进入商家中心 |
| 3 | 准备业务回调地址 | 准备可公网访问的 notify_url,用于接收支付成功通知(HTTPS 推荐)。 |
常用能力概览(金额单位为分):
| 能力 | 方法 | 路径 | 说明 |
|---|---|---|---|
| 创建支付 | POST |
/api/merchant/open/pay |
传入金额、通道、回调地址等,返回支付跳转/二维码信息 |
| 查询订单 | GET |
/api/merchant/open/order/:trade_no |
按平台订单号查询支付状态 |
鉴权方式(简要)
X-Api-Key: <api_key>X-Timestamp + X-Sign(HMAC-SHA256,内容为 api_key + timestamp)创建支付示例字段
{
"amount": 100,
"client_type": "h5",
"subject": "商品订单",
"channel_code": "alipay",
"notify_url": "https://your.domain/notify"
}
client_type 常用:h5(手机)/ qrcode(PC 扫码)。通道可选 alipay、wechat 等已开通渠道。
支付成功后,系统会向你提交的 notify_url 推送 JSON。请在业务侧验签并处理幂等,避免重复入账。
trade_no、amount、status、channel_code、paid_at、signapi_secret 做 HMAC-SHA256