对外接口文档(项目版)
  1. 充值接口
对外接口文档(项目版)
  • 对外接口
    • 充值接口
      • 京东/云闪付票券
        • 请求获取京东验证码
        • 校验验证码
      • 天猫
        • 根据手机号码查询用户信息查询
        • 根据手机号,获取验证码
      • 统一下单入口
        POST
    • 回调接口
      • 异步回调接口
    • 查询接口
      • 查询订单接口
      • 查询权益订单接口
      • 查询商户余额接口
    • 检查签名
      POST
  1. 充值接口

统一下单入口

POST
http://127.0.0.1/openApi/makeOrder
支持话费,加油卡,视频会员,天猫购物券,美团,提卡(卡密商品,注意区分不是权益码),奈雪,微信立减金,微信红包,沃尔玛,京东直充(不校验验证码),支付宝立减金

请求参数

Body 参数application/json
merchantId
string 
商户号
必需
sign
string 
md5加密校验值
必需
md5(merchantId + timeStamp + businessData + md5Key),32位小写。签名时businessData中参数按照首字母升序排列后再md5
timeStamp
string 
时间戳
必需
businessData
object 
业务参数
必需
notifyUrl
string 
回调地址
必需
extOrderId
string 
商户订单号
必需
productId
string 
商品id
必需
如果是话费产品,填HF
account
string 
充值账号(手机号,淘宝账号,第三方账号等)
必需
buyNumber
integer 
购买数量(注意这个是Integer,不能当作字符串)
必需
如果是话费产品,购买数量代表面值
remark1
string 
预留字段1
可选
(京东直充的验证码传在此处,支付宝立减金用户id也使用此字段)
extAccount
string 
扩展账号
可选
支付宝立减金充值账户,喜钻uid,支付宝直充姓名
projectId
string 
项目id
可选
如果是项目商户,需要传项目id
示例
{
    "timeStamp": 1703498273661,
    "businessData": {
        "account": "15950517685",
        "buyNumber": 1,
        "extAccount": "15950517685",
        "extOrderId": "${extOrderId}",
        "notifyUrl": "qwe",
        "productId": "XZ_122228_1_fc738d"
    },
    "merchantId": "PS-M00159f4f",
    "sign": "MD5(PS-M00159f4f1703498273661{\"account\":\"15950517685\",\"buyNumber\":1,\"extAccount\":\"15950517685\",\"extOrderId\":\"${extOrderId}\",\"notifyUrl\":\"qwe\",\"productId\":\"XZ_122228_1_fc738d\"}f4ShmXS7eB1bQpbD1wLcxcI3sv3fyADF)",
    "projectId": 1803631566617923600
}

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://127.0.0.1/openApi/makeOrder' \
--header 'Content-Type: application/json' \
--data-raw '{
    "timeStamp": 1703498273661,
    "businessData": {
        "account": "15950517685",
        "buyNumber": 1,
        "extAccount": "15950517685",
        "extOrderId": "${extOrderId}",
        "notifyUrl": "qwe",
        "productId": "XZ_122228_1_fc738d"
    },
    "merchantId": "PS-M00159f4f",
    "sign": "MD5(PS-M00159f4f1703498273661{\"account\":\"15950517685\",\"buyNumber\":1,\"extAccount\":\"15950517685\",\"extOrderId\":\"${extOrderId}\",\"notifyUrl\":\"qwe\",\"productId\":\"XZ_122228_1_fc738d\"}f4ShmXS7eB1bQpbD1wLcxcI3sv3fyADF)",
    "projectId": 1803631566617923600
}'

返回响应

🟢200成功
application/json
Body
code
integer 
当前操作是否成功 0代表成功 1 操作失败 100000订单已存在 200000账户不存在 200002账户信息校验失败 200003ip 不符 200004 账户已经被锁定
必需
data
object 
必需
ext
object 
必需
msg
string 
必需
orderInfo
object 
供应商订单号信息
必需
orderId
string 
供应商订单号,单笔下单
必需
orderIds
array[string]
供应商订单号的集合,后台批充
必需
示例
{
    "code": 0,
    "data": {},
    "ext": {},
    "msg": "string"
}
修改于 2025-04-16 07:43:05
上一页
根据手机号,获取验证码
下一页
异步回调接口
Built with