POST QuickPay/JSAPIPay

微信公共号/微信小程序/支付宝服务窗创建订单接口,返回cloudpay_param,用于后续发起支付调用。

请求信息

请求URI参数

请求数据参数

付款信息

JSAPIPayInfo
名称说明类型扩展说明
store_no

门店编码.

字符串

必填

字符长度: 必须在 1 和 32 之间

paytype

支付类型 11:微信 21:支付宝 默认是微信

PayType

operator

操作员,默认为"WEB"

字符串

字符长度: 必须在 1 和 16 之间

appid

商户微信公共号/小程序AppID,支付宝服务窗不需要传入

字符串

必填

openid

商户微信公共号/小程序OpenID/支付宝唯一用户号(2088开头的16位纯数字)

字符串

必填

amount

本次交易金额,以分为单位,不超过10位纯数字字符串

整数

必填

数值范围: 必须在 1 和 9999999999 之间

order_no

商户单据号,必须在此商户系统内唯一,推荐 机构号+门店号+订单编号

字符串

必填

字符长度: 必须在 1 和 32 之间

iteminfo

商品信息描述

字符串

notify_url

支付后回调地址,可以为空,如果不为空,直接结果将以POST的方式传递到此页面,需要反馈"OK"或者"SUCCESS",若无反馈,系统会20秒一次推送10次直到收到反馈,若10次后未反馈则24小时内每30分钟推送一次直至收到反馈。

字符串

goods_tag

订单优惠标记,代金券或立减优惠功能的参数,配合代金券上订单优惠标记,可以控制订单是否适用指定的代金券

字符串

share_pay

是否分账支付

布尔

attach

附加信息,在查询时会原样返回

字符串

字符长度: 必须在 0 和 127 之间

itemlist

商品清单列表

Collection of ItemInfo

请求数据格式

application/json, text/json

例子:
{
  "store_no": "sample string 1",
  "paytype": 10,
  "operator": "sample string 3",
  "appid": "sample string 4",
  "openid": "sample string 5",
  "amount": 6,
  "order_no": "sample string 7",
  "iteminfo": "sample string 8",
  "notify_url": "sample string 9",
  "goods_tag": "sample string 10",
  "share_pay": true,
  "attach": "sample string 12",
  "itemlist": [
    {
      "item_id": "sample string 1",
      "item_no": "sample string 2",
      "item_name": "sample string 3",
      "quantity": 4,
      "price": 5,
      "promotion_type": 6
    },
    {
      "item_id": "sample string 1",
      "item_no": "sample string 2",
      "item_name": "sample string 3",
      "quantity": 4,
      "price": 5,
      "promotion_type": 6
    }
  ]
}

响应数据

资源说明

ResultInfoOfPayResultInfo
名称说明类型扩展说明
code

ResultCode

msg

字符串

data

PayResultInfo

响应数据格式

application/json, text/json

例子:
{
  "code": "SUCCESS",
  "msg": "sample string 1",
  "data": {
    "transaction_status": "CREATE",
    "error": "sample string 1",
    "store_no": "sample string 2",
    "paytype": "WECHATPAY_NATIVE",
    "operator": "sample string 3",
    "bank_type": "sample string 4",
    "total_amount": 5,
    "cash_amount": 6,
    "settlement_amount": 7,
    "coupon_amount": 8,
    "order_no": "sample string 9",
    "transaction_no": "sample string 10",
    "cloudpay_param": "sample string 11",
    "transaction_time": "sample string 12",
    "message": "sample string 13",
    "buyer": "sample string 14",
    "attach": "sample string 15",
    "iteminfo": "sample string 16",
    "coupon_detail_list": [
      {
        "coupon_id": "sample string 1",
        "coupon_template": "sample string 2",
        "coupon_name": "sample string 3",
        "coupon_type": "sample string 4",
        "memo": "sample string 5",
        "amount": 6,
        "amount_merchant": 7,
        "amount_office": 8,
        "amount_other": 9,
        "amount_pay": 10
      },
      {
        "coupon_id": "sample string 1",
        "coupon_template": "sample string 2",
        "coupon_name": "sample string 3",
        "coupon_type": "sample string 4",
        "memo": "sample string 5",
        "amount": 6,
        "amount_merchant": 7,
        "amount_office": 8,
        "amount_other": 9,
        "amount_pay": 10
      }
    ]
  }
}