闲管家虚拟货源标准接口
  1. 订单接口
闲管家虚拟货源标准接口
  • 接入说明
  • 基础接口
    • 查询平台信息
      POST
    • 查询商户信息
      POST
  • 商品接口
    • 查询商品列表
      POST
    • 查询商品详情
      POST
    • 查询商品订阅列表
      POST
    • 订阅商品变更通知
      POST
    • 取消商品变更通知
      POST
  • 订单接口
    • 创建直充订单
      POST
    • 创建卡密订单
      POST
    • 查询订单详情
      POST
  • 回调接口
    • 商品回调通知
      POST
    • 订单回调通知
      POST
  1. 订单接口

创建卡密订单

云端 Mock
https://m1.apifoxmock.com/m1/5001206-0-default
云端 Mock
https://m1.apifoxmock.com/m1/5001206-0-default
POST
/goofish/order/purchase/create

请求参数

Query 参数
mch_id
string 
必需
货源平台商户ID(AppKey)
默认值:
{{mch_id}}
timestamp
integer 
必需
当前时间戳(单位秒,5分钟内有效)
默认值:
{{timestamp}}
sign
string 
必需
签名MD5值(参考签名说明)
默认值:
{{sign}}
Body 参数application/json
order_no
string 
管家订单号
必需
示例值:
1929063817978999932
goods_no
string 
商品编码
必需
示例值:
12344532
buy_quantity
integer <int32>
购买数量
必需
示例值:
1
max_amount
integer <int64>
最大金额(分)
可选
注意:该金额为订单总价,也是商家可接受最大成本金额,用于防止商家亏损。如该字段未传入时则不要校验安全价
示例值:
1000
notify_url
string 
回调地址
必需
针对需要异步处理的订单
示例值:
https://open.goofish.pro/api/open/callback/virtual/order/notify/{token}
biz_order_no
string 
业务订单号
必需
示例值:
1929063817978999932
示例
{
  "order_no": "1929063817978999932",
  "goods_no": "12344532",
  "buy_quantity": 1,
  "max_amount": 1000,
  "notify_url": "https://open.goofish.pro/api/open/callback/virtual/order/notify/{token}",
  "biz_order_no": "1929063817978999932"
}

返回响应

🟢200成功
application/json
Body
code
integer <int32>
必需
默认值:
0
msg
string 
必需
默认值:
OK
data
object 
必需
order_no
string 
商家订单号
必需
示例值:
1929063817978999932
out_order_no
string 
平台订单号
必需
示例值:
1929248209196566229
order_status
enum<integer> <int32>
订单状态
必需
10:处理中
20:已成功
30:已失败
注意:订单状态为处理中,表示异步处理,后续通过回调地址通知结果
枚举值:
102030
示例值:
20
order_amount
integer <int64>
订单金额(分)
必需
示例值:
1000
order_time
integer <int32>
下单时间
必需
示例值:
1725349041
end_time
integer <int32>
完结时间
可选
订单状态为已成功或已失败时,必须返回完结时间
示例值:
1723870189
card_items
array [object {2}] 
卡密列表
可选
仅用于卡密订单,如果是无卡号或者无法区分卡号和密码的,请使用card_pwd字段返回
remark
string 
订单备注
可选
如下单失败原因
示例值:
该运营商地区不支持充值
示例
{
  "code": 0,
  "msg": "OK",
  "data": {
    "order_no": "1929063817978999932",
    "out_order_no": "1929248209196566229",
    "order_status": 10,
    "order_amount": 1000,
    "order_time": 1725349041,
    "end_time": 1723870189,
    "card_items": [
      {
        "card_no": "12347812478@qq.com",
        "card_pwd": "jah12ni12ie8n111kji"
      }
    ],
    "remark": "该运营商地区不支持充值"
  }
}
🟢200失败
上一页
创建直充订单
下一页
查询订单详情
Built with