测试服务地址 https://xxx.a.com 请使用此地址拼接请求地址,例如订单查询 https://xxx.a.com/api/v1/openapi/card/query
服务地址请咨询商务获取
customerId为商户ID,商户密钥为双方通信加密使用,所有请求无需传递原文密钥,请咨询商务获取
所有接口请使用post application/json请求
接口地址未经授权,禁止告诉任何非合作公司或个人
异步回掉http code == 200 是正确接受,最大尝试通知3次,请务必支持幂等!
参数不符合约定内容,可能返回http 500 错误
/api/v1/openapi/recharge/submit
| 参数名 | 必选 | 类型 | 说明 |
|---|---|---|---|
| customerId | 是 | int | 商户ID |
| orderNo | 是 | string | 商户订单6-32位 |
| productCode | 是 | int | 商品编号 |
| money | 是 | int | 充值金额 |
| account | 是 | string | 充值帐户 |
| notifyURL | 是 | string | 异步通知地址 |
| buyUserId | 否 | string | 充值下单用户标识id: (话费必传,如果涉及话费业务,请联系商务确认)如果可以获取到对应充值下单用户的真实用户标识id,可直接进行传参; 若获取不到该充值下单用户的用户标识id,建议采用固定值+随机数 例如:abcd-0123456789,长度16-64位,不参与签名。 |
| sign | 是 | string | 签名 |
customerId&orderNo&productCode&money&account¬ifyURL&商户密钥 md5加密后转小写
xxxxxxxxxx失败返回{"message": "订单号已存在","status": "F008"}下单成功返回{"customerId": 20000,"message": "提交成功","orderNo": "111111111231121123","status": "Ok","sysOrderNo": "20210924100956925200001622465"}
| 参数名 | 类型 | 说明 |
|---|---|---|
| customerId | int | 商户ID |
| message | string | 提示信息 |
| orderNo | string | 商户订单号 |
| status | string | 状态 |
| sysOrderNo | string | 系统订单 |
| 值 | 类型 |
|---|---|
| Ok | 提交成功 |
| F000 | 系统维护中,设置失败 |
| F001 | 充值账户异常,设置失败 |
| F002 | 请求实体数据格式校验不通过,设置失败 |
| F003 | 商户不存在,设置失败 |
| F004 | 商户状态异常,设置失败 |
| F005 | 签名验证失败,设置失败 |
| F006 | 产品编码异常,设置失败 |
| F007 | 暂无库存,设置失败 |
| F008 | 订单号已存在,查询后再处理,不可直接失败 |
| F999 | 未知异常,设置失败 |
/api/v1/openapi/recharge/query
| 参数名 | 必选 | 类型 | 说明 |
|---|---|---|---|
| customerId | 是 | string | 商户ID |
| orderNo | 是 | string | 商户订单号 |
| sign | 是 | string | 签名 |
customerId&orderNo&商户密钥 md5加密后转小写
xxxxxxxxxx充值失败{"customerId": 20000,"message": "充值失败","status": "Fail"}充值成功{"status": "Ok","message": "充值成功","customerId": 20000,"userOrderNo": "111111111231121123","sysOrderNo": "20210924100956925200001622465","productCode": 1,"account": "18656151580","money": 20,"actualMoney": 20,"cardNo": "","voucher": "1111","completeTime": "2021-09-24 00:00:00"}
| 参数名 | 类型 | 说明 |
|---|---|---|
| status | string | 状态 |
| message | string | 提示 |
| customerId | int | 商户ID |
| userOrderNo | string | 商户订单 |
| sysOrderNo | string | 系统订单 |
| productCode | int | 商品编号 |
| account | string | 充值帐户 |
| money | int | 下单金额 |
| actualMoney | int | 实际到账 |
| cardNo | string | 使用充值卡 |
| voucher | string | 充值凭证,可能是短信或流水号 |
| completeTime | string | 完成时间 |
| price | bigdecimal | 扣费金额 |
| 值 | 说明 |
|---|---|
| Ok | 充值成功 |
| Fail | 充值失败,设置失败 |
| Wait | 充值中 |
| F000 | 系统维护中,等待恢复后查询 |
| F002 | 订单号不存在,设置失败 |
| F003 | 商户不存在,请勿直接失败 |
| F005 | 签名验证失败,请勿直接失败 |
customerId&userOrderNo&productCode&money&actualMoney&status&密钥 md5 后转小写
与查询订单返回结果一致
/api/v1/openapi/user/balance
| 参数名 | 必选 | 类型 | 说明 |
|---|---|---|---|
| customerId | 是 | int | 商户ID |
| timestamp | 是 | string | 请求时间(yyyyMMddHHmmss) |
| sign | 是 | string | 签名 |
customerId×tamp&商户密钥 md5 后转小写
xxxxxxxxxx{ "customerId": 20000, "balance": 1.0000, "status": "Ok"}| 参数名 | 类型 | 说明 |
|---|---|---|
| customerId | int | 商户ID |
| balance | bigDecimal | 余额 |
| status | string | 状态 |
| 值 | 说明 |
|---|---|
| Ok | 查询成功 |
| F001 | 商户不存在 |
| F002 | 签名异常 |