交易请求报文

JSON:

  1. {
  2. "request_type": "barcode_pay_request",
  3. "isspid": "39493002",
  4. "pos_id": "1511300001",
  5. "store_id": "1511300001",
  6. "pos_seq": "1511300000002",
  7. "user_id": "user01",
  8. "system_id": "8888",
  9. "device_ip": "127.0.0.1",
  10. "latitude": "+37.12",
  11. "longitude": "-121.213",
  12. "memo": "订单备注",
  13. "barcode_pay_request": {
  14. "barcode_info": "1234567890123456",
  15. "pay_type": "502",
  16. "tx_amt": "1000",
  17. "goods_detail": [
  18. {
  19. "goods_id": "apple-01",
  20. "payment_goods_id": "20010001",
  21. "goods_name": "ipad",
  22. "quantity": 1,
  23. "price": 200000,
  24. "goods_category": "34543238",
  25. "body": "特价手机",
  26. "show_url": "http://www.alipay.com/xxx.jpg"
  27. },
  28. {
  29. "goods_id": "apple-02",
  30. "payment_goods_id": "20010002",
  31. "goods_name": "ipad2",
  32. "quantity": 1,
  33. "price": 200000,
  34. "goods_category": "34543239",
  35. "body": "特价手机2",
  36. "show_url": "http://www.alipay.com/xxx2.jpg"
  37. }
  38. ],
  39. "extend_params": {
  40. "hb_fq_num": "3",
  41. "hb_fq_seller_percent": "100",
  42. "split_flag": "R",
  43. "plan_split_date": "20230418",
  44. "split_info": {
  45. "keep_amt": "800",
  46. "split_list": [
  47. {
  48. "merchant_id": "10000000000001",
  49. "div_amt": "150"
  50. },
  51. {
  52. "merchant_id": "10000000000002",
  53. "div_amt": "50"
  54. }
  55. ]
  56. }
  57. },
  58. "use_coupon": "1"
  59. },
  60. "sign": "EB0F3B9404AAFC27C520C1D64A69C169"
  61. }

XML:

  1. <?xml version="1.0" encoding="GBK"?>
  2. <business_trans>
  3. <request_type>barcode_pay_request</request_type>
  4. <isspid>39493002</isspid>
  5. <pos_id>1511300001</pos_id>
  6. <store_id>1511300001</store_id>
  7. <pos_seq>1511300000002</pos_seq>
  8. <user_id>user01</user_id>
  9. <system_id>8888</system_id>
  10. <device_ip>127.0.0.1</device_ip>
  11. <latitude>+37.12</latitude>
  12. <longitude>-121.213</longitude>
  13. <memo>订单备注</memo>
  14. <barcode_pay_request>
  15. <barcode_info>1234567890123456</barcode_info>
  16. <pay_type>502</pay_type>
  17. <tx_amt>10</tx_amt>
  18. <goods_detail><![CDATA[商品信息(JSON)]]></goods_detail>
  19. <extend_params><![CDATA[扩展参数(JSON)]]></extend_params>
  20. <use_coupon>1</use_coupon>
  21. </barcode_pay_request>
  22. </business_trans>

交易请求报文说明

节点名称中文名称类型说明是否必填
sign报文签名String(32)请求报文格式为JSON时必填
计算签名方式请看2.1章节
可空
request_type请求类型String(32)固定值:barcode_pay_request必填
isspid商户号String(8)翼码商户号,由翼码提供必填
pos_id终端号String(20)商户自定义终端号必填
store_id门店号String(20)商户自定义门店号必填
pos_seq支付请求流水号String(32)同一个翼码商户号下唯一,不可重复使用,且大于12位必填
user_id操作员标识String(20)操作员号可空
system_id系统平台号String(4)由翼码提供必填
device_ip设备IPString(15)发起交易的门店或设备公网IP(仅支持IPv4)
根据央行要求必须传真实公网IP
否则商家会被风控!!!
可空
latitude纬度String(9)发起交易的门店的经纬度信息
纬度格式:+表示北纬,-表示南纬;纬度整数位不超过2位,小数位不超过6位。
经纬度需同时传入
根据银联要求,银联二维码交易时,经纬度信息必填。
若为空将根据ip地址转换,不精确的情况可能会触发风控
可空
longitude经度String(9)发起交易的门店的经纬度信息
经度格式:+表示东经,-表示西经;经度整数位不超过3位,小数位不超过5位。
经纬度需同时传入
根据银联要求,银联二维码交易时,经纬度信息必填。
若为空将根据ip地址转换,不精确的情况可能会触发风控
可空
memo订单备注String(128)可空
barcode_pay_request
->barcode_info
条码支付动态码String(64)条码支付动态码必填
barcode_pay_request
->pay_type
支付类型String(3)502:支付宝
503:微信支付
512:银联二维码
516:数字人民币
519:会员余额支付
传空则根据付款码规则自动识别类型
可空
barcode_pay_request
->tx_amt
交易金额Number(9)支付金额,单位为分,不支持小数点必填
barcode_pay_request
->goods_detail
商品信息JSONArray订单包含的商品信息列表,详细参数见下表
使用XML格式报文时,建议使用CDATA标签包裹内容
可空
barcode_pay_request
->extend_params
扩展参数JSON用于扩展一些特殊的支付参数字段,详细参数见下表
使用XML格式报文时,建议使用CDATA标签包裹内容
可空
barcode_pay_request
->use_coupon
是否使用优惠券String(1)0:不使用优惠
1:可使用优惠
传空默认为1
具体应用:
a.微信可使用优惠时,翼码传送已配置的订单优惠标记(goods_tag)给微信
b.支付宝不可使用优惠时,翼码将不参与优惠计算的金额(undiscountable_amount)取订单金额传送给支付宝
可空

自定义门店号(store_id)和自定义终端号(pos_id)需经过4.1终端绑定交易接口绑定成功过的值才可以调用,绑定一次即可不需要重复绑定。

goods_detail 商品信息 (JSONArray)

JSON节点类型说明是否必填范例
goods_idString(32)商品的编号必填apple-01
payment_goods_idString(32)支付平台商品编号可空20010001
goods_nameString(256)商品名称必填ipad
quantityNumber(9)商品数量必填1
priceNumber(8)商品单价,单位为分必填200000
goods_categoryString(24)商品类目
仅支付宝、银联二维码时生效
可空34543238
bodyString(1000)商品描述信息
仅支付宝时生效
可空特价手机
show_urlString(400)商品的展示地址
仅支付宝时生效
可空http://www.alipay.com/xxx.jpg
addn_infoString(100)附加信息
仅银联二维码时生效
可空商品图片 http://www.95516.com/xxx.jpg

goods_detail 样例:

  1. [
  2. {
  3. "goods_id" : "apple-01",
  4. "payment_goods_id" : "20010001",
  5. "goods_name" : "ipad",
  6. "quantity" : 1,
  7. "price" : 200000,
  8. "goods_category" : "34543238",
  9. "body" : "特价手机",
  10. "show_url" : "http://www.alipay.com/xxx.jpg",
  11. "addn_info" : "商品图片 http://www.95516.com/xxx.jpg"
  12. },
  13. {
  14. "goods_id" : "apple-02",
  15. "payment_goods_id" : "20010002",
  16. "goods_name" : "ipad2",
  17. "quantity" : 1,
  18. "price" : 200000,
  19. "goods_category" : "34543239",
  20. "body" : "特价手机2",
  21. "show_url" : "http://www.alipay.com/xxx2.jpg",
  22. "addn_info" : "商品图片 http://www.95516.com/xxx.jpg"
  23. }
  24. ]

extend_params 扩展参数 (JSON)

JSON节点类型说明是否必填范例
hb_fq_numString花呗分期数,仅支持传入3、6、12,其他期数暂不支持
仅支付宝时生效
hb_fq_num与hb_fq_seller_percent必须同时传入且使用花呗分期商品明细必传
可空3
hb_fq_seller_percentString花呗卖家承担收费比例,商家承担手续费传入100,用户承担手续费传入0,仅支持传入100、0两种,其他比例暂不支持
仅支付宝时生效
hb_fq_num与hb_fq_seller_percent必须同时传入且使用花呗分期商品明细必传
可空100
split_flagString分账标识
N:不分账
R:实时分账
D:延时分账
不传该节点时,将按控制台配置处理
该节点与分账功能相关具体联系业务确认开通功能
可空R
plan_split_dateString预分账日期,格式:yyyymmdd
仅延时分账类型(split_flag=D)时支持传入
可空20230418
split_infoJSON分账信息
仅支持请求实时分账split_flag=R
该节点与分账功能相关具体联系业务确认开通功能
可空 

分账业务相关的特别说明:
1. split_flag=N 不分账时,split_info不允许传入;
2. split_flag=R 实时分账时,split_info必传,其中keep_amt与div_amt叠加必须全额分完整笔订单;
3. split_flag=D 延时分账时,split_info不允许传入,在后续流程中调用延迟交易确认接口完成分账,或使用翼码分账系统界面进行分账。

split_info 分账信息

JSON节点类型说明是否必填范例
is_clean_splitStringN:不使用净值分账
Y:使用净值分账
不传默认为N,即不使用净值分账
净值分账目前仅对部分通道开放,使用此能力前请先与技术支持确认
净值分账仅在交易手续费内扣时才起作用
当使用净值分账时,分账信息和分账明细必须要传分账比例,且分账方自留比例(keep_percentage)与所有分账比例(div_percentage)之和必须要为100%
可空Y
keep_amtString分账方自留金额,单位为分,可传0表示不自留
不使用净值分账(is_clean_split=N)时,该节点必填,分账方自留比例(keep_percentage)节点无效
可空1000
keep_percentageString分账方自留比例,单位为%,最多支持小数点后两位,可传0表示不自留
使用净值分账(is_clean_split=Y)时,该节点必填,分账方自留金额(keep_amt)节点无效
可空50.26
split_listArray分账明细必填 
split_list 分账明细
JSON节点类型说明是否必填范例
merchant_idString分账接收方的分账商户号必填10000000000001
div_amtString分账金额,单位为分,必须大于0
不使用净值分账(is_clean_split=N)时,该节点必填,分账比例(div_percentage)节点无效
可空1000
div_percentageString分账比例,单位为%,最多支持小数点后两位,必须大于0
使用净值分账(is_clean_split=Y)时,该节点必填,分账金额(div_amt)节点无效
可空23.55

若业务涉及100%分账给接收方,请于业务对接人联系申请使用净值分账功能。

extend_params 样例:

  1. {
  2. "hb_fq_num": "3",
  3. "hb_fq_seller_percent": "100",
  4. "split_flag": "R",
  5. "plan_split_date": "20230418",
  6. "split_info": {
  7. "keep_amt": "800",
  8. "split_list": [
  9. {
  10. "merchant_id": "10000000000001",
  11. "div_amt": "150"
  12. },
  13. {
  14. "merchant_id": "10000000000002",
  15. "div_amt": "50"
  16. }
  17. ]
  18. }
  19. }

交易返回报文

JSON:

  1. {
  2. "response_type": "barcode_pay_response",
  3. "isspid": "39493002",
  4. "pos_id": "8888888888",
  5. "pos_seq": "2018121400000001",
  6. "trans_time": "20181214135756",
  7. "pay_type": "502",
  8. "extend": "<![CDATA[]]>",
  9. "sys_seq": "5d170b6b78a0cb13",
  10. "buss_discount_amt": 0,
  11. "platform_discount_amt": 0,
  12. "discount_amt": 0,
  13. "mdiscount_amt": 0,
  14. "coupon_amt": 0,
  15. "mcard_amt": 0,
  16. "mcoupon_amt": 0,
  17. "point_amt": 0,
  18. "memo": "订单备注",
  19. "alipay_res_info": {
  20. "trade_no": "2018121422001429700548119225",
  21. "out_trade_no": "0001056562600000122014",
  22. "atu_trade_no": "2018121422001429700548119225",
  23. "atu_out_trade_no": "0001056562600000122014",
  24. "buy_user_id": "",
  25. "buy_logon_id": "",
  26. "gmt_payment": "20181214135757",
  27. "total_fee": "1",
  28. "receipt_amount": "1",
  29. "invoice_amount": "1",
  30. "buyer_pay_amount": "1",
  31. "charge_amount": "0",
  32. "fee_allowance_info": "{\"receivable_fee_amt\":\"2\",\"actual_fee_amt\":\"1\",\"allowance_fee_amt\":\"1\"}",
  33. "fund_bill_list": [
  34. {
  35. "amount": "1",
  36. "fund_channel": "ALIPAYACCOUNT"
  37. },
  38. {
  39. "amount": "1",
  40. "fund_channel": "COUPON"
  41. }
  42. ],
  43. "voucher_detail_list": [
  44. {
  45. "amount": "1000",
  46. "id": "2015102600073002039000002D5O",
  47. "memo": "学生专用优惠",
  48. "merchant_contribute": "900",
  49. "name": "XX超市5折优惠",
  50. "other_contribute": "100",
  51. "type": "ALIPAY_FIX_VOUCHER",
  52. "discount_goods_detail": [
  53. {
  54. "goods_id": "STANDARD1026181538",
  55. "goods_name": "雪碧",
  56. "discount_amount": "10000",
  57. "voucher_id": "2015102600073002039000002D5O"
  58. }
  59. ]
  60. },
  61. {
  62. "amount": "1000",
  63. "id": "2015102600073002039000002D5O",
  64. "memo": "学生专用优惠",
  65. "merchant_contribute": "900",
  66. "name": "XX超市5折优惠",
  67. "other_contribute": "100",
  68. "type": "ALIPAY_FIX_VOUCHER",
  69. "discount_goods_detail": [
  70. {
  71. "goods_id": "STANDARD1026181538",
  72. "goods_name": "雪碧",
  73. "discount_amount": "10000",
  74. "voucher_id": "2015102600073002039000002D5O"
  75. }
  76. ]
  77. }
  78. ],
  79. "detail_error_code": "10000",
  80. "detail_error_desc": "Success"
  81. },
  82. "wxpay_res_info": {
  83. "buyer_pay_amount": 1,
  84. "trade_no": "4200000196201812146252898537",
  85. "out_trade_no": "2018121400000002",
  86. "atu_trade_no": "4200000196201812146252898537",
  87. "atu_out_trade_no": "2018121400000002",
  88. "app_id": "wx5acb63e448b4fc22",
  89. "mch_id": "1241109502",
  90. "open_id": "oVTJstwEIdlt3ExaSCxF_cfdRADE",
  91. "is_subscribe": "N",
  92. "sub_openid": "oXI_E5KN-FJi1Hf65mWeiBF8fUlU",
  93. "sub_is_subscribe": "",
  94. "trade_type": "MICROPAY",
  95. "bank_type": "CFT",
  96. "total_fee": "1",
  97. "coupon_fee": "",
  98. "charge_amount": "0",
  99. "fee_allowance_info": "{\"receivable_fee_amt\":\"2\",\"actual_fee_amt\":\"1\",\"allowance_fee_amt\":\"1\"}",
  100. "gmt_payment": "20181214141132",
  101. "detail_error_code": "SUCCESS",
  102. "detail_error_desc": "OK",
  103. "settlement_total_fee": "1",
  104. "promotion_detail": {
  105. "promotion_detail": [
  106. {
  107. "promotion_id": "109519",
  108. "name": "单品惠-6",
  109. "scope": "SINGLE",
  110. "type": "DISCOUNT",
  111. "amount": 5,
  112. "activity_id": "931386",
  113. "wxpay_contribute": 0,
  114. "merchant_contribute": 0,
  115. "other_contribute": 5,
  116. "goods_detail": [
  117. {
  118. "goods_id": "a_goods1",
  119. "goods_remark": "商品备注",
  120. "quantity": 7,
  121. "price": 1,
  122. "discount_amount": 4
  123. },
  124. {
  125. "goods_id": "a_goods2",
  126. "goods_remark": "商品备注",
  127. "quantity": 1,
  128. "price": 2,
  129. "discount_amount": 1
  130. }
  131. ]
  132. }
  133. ]
  134. }
  135. },
  136. "upay_res_info": {
  137. "trade_no": "20180504050741694554",
  138. "out_trade_no": "1805040000021",
  139. "atu_trade_no": "20180504050741694554",
  140. "atu_out_trade_no": "1805040000021",
  141. "buyer_pay_amount": "1",
  142. "total_fee": "1",
  143. "charge_amount": "0",
  144. "fee_allowance_info": "{\"receivable_fee_amt\":\"2\",\"actual_fee_amt\":\"1\",\"allowance_fee_amt\":\"1\"}"
  145. },
  146. "ecny_res_info": {
  147. "trade_no": "20180504050741694554",
  148. "out_trade_no": "1805040000021",
  149. "buyer_pay_amount": "1"
  150. "total_fee": "1",
  151. "receipt_fee": "1",
  152. "charge_amount": "0",
  153. "gmt_payment": "20210205113225",
  154. "detail_error_code": "",
  155. "detail_error_desc": ""
  156. },
  157. "balpay_res_info": {
  158. "trade_no": "20180504050741694554",
  159. "out_trade_no": "1805040000021",
  160. "total_fee": "25",
  161. "charge_amount": "0",
  162. "gmt_payment": "20230530105300",
  163. "member_id": "1542"
  164. },
  165. "result": {
  166. "id": "0000",
  167. "comment": "交易成功"
  168. },
  169. "sign": "C557C5D68AA5D803B2E6FF54AA28E5DF"
  170. }

XML:

  1. <?xml version="1.0" encoding="GBK"?>
  2. <business_trans>
  3. <response_type>barcode_pay_response</response_type>
  4. <isspid>39493002</isspid>
  5. <pos_id>123456789</pos_id>
  6. <pos_seq>000000000001</pos_seq>
  7. <sys_seq>000000000244</sys_seq>
  8. <trans_time>20090405010104</trans_time>
  9. <pay_type>502</pay_type>
  10. <extend><![CDATA[扩展字段(json格式)]]></extend>
  11. <buss_discount_amt>2</buss_discount_amt>
  12. <platform_discount_amt>2</platform_discount_amt>
  13. <discount_amt>0</discount_amt>
  14. <mdiscount_amt>0</mdiscount_amt>
  15. <coupon_amt>0</coupon_amt>
  16. <mcard_amt>0</mcard_amt>
  17. <mcoupon_amt>0</mcoupon_amt>
  18. <point_amt>0</point_amt>
  19. <memo>订单备注</memo>
  20. <alipay_res_info>
  21. <trade_no>2018111522001429701012895360</trade_no>
  22. <out_trade_no>1811150000001</out_trade_no>
  23. <atu_trade_no>2018111522001429701012895360</atu_trade_no>
  24. <atu_out_trade_no>1811150000001</atu_out_trade_no>
  25. <buy_user_id>2088123456789012</buy_user_id>
  26. <buy_logon_id>502***@qq.com</buy_logon_id>
  27. <total_fee>1</total_fee>
  28. <receipt_amount>1</receipt_amount>
  29. <invoice_amount>1</invoice_amount>
  30. <buyer_pay_amount>1</buyer_pay_amount>
  31. <charge_amount>0</charge_amount>
  32. <fee_allowance_info>[{手续费补贴信息(JOSN)}]</fee_allowance_info>
  33. <fund_bill_list></fund_bill_list>
  34. <gmt_payment>20181115085738</gmt_payment>
  35. <detail_error_code></detail_error_code>
  36. <detail_error_desc></detail_error_desc>
  37. <voucher_detail_list>[{单品优惠信息(JOSN)}]</voucher_detail_list>
  38. </alipay_res_info>
  39. <wxpay_res_info>
  40. <trade_no>4001172001201604144821605495</trade_no>
  41. <out_trade_no>1811150000002</out_trade_no>
  42. <atu_trade_no>4001172001201604144821605495</atu_trade_no>
  43. <atu_out_trade_no>1811150000002</atu_out_trade_no>
  44. <app_id>wx5acb63e448b4fc22</app_id>
  45. <mch_id>1241109502</mch_id>
  46. <open_id>oVTJstwEIdlt3ExaSCxF_cfdRADE</open_id>
  47. <is_subscribe>N</is_subscribe>
  48. <sub_openid>oXI_E5KN-FJi1Hf65mWeiBF8fUlU</sub_openid>
  49. <sub_is_subscribe>N</sub_is_subscribe>
  50. <trade_type>MICROPAY</trade_type>
  51. <bank_type>CCB_DEBIT</bank_type>
  52. <total_fee>1</total_fee>
  53. <coupon_fee>0</coupon_fee>
  54. <charge_amount>0</charge_amount>
  55. <fee_allowance_info>[{手续费补贴信息(JOSN)}]</fee_allowance_info>
  56. <gmt_payment>20181115090351</gmt_payment>
  57. <detail_error_code>SUCCESS</detail_error_code>
  58. <detail_error_desc>OK</detail_error_desc>
  59. <promotion_detail>[{单品优惠信息(JOSN)}]</promotion_detail>
  60. <buyer_pay_amount>1</buyer_pay_amount>
  61. <settlement_total_fee>1</settlement_total_fee>
  62. </wxpay_res_info>
  63. <upay_res_info>
  64. <trade_no>20180504050741694554</trade_no>
  65. <out_trade_no>1805040000021</out_trade_no>
  66. <atu_trade_no>20180504050741694554</atu_trade_no>
  67. <atu_out_trade_no>1805040000021</atu_out_trade_no>
  68. <buyer_pay_amount>1</buyer_pay_amount>
  69. <total_fee>1</total_fee>
  70. <charge_amount>0</charge_amount>
  71. <fee_allowance_info>[{手续费补贴信息(JOSN)}]</fee_allowance_info>
  72. </upay_res_info>
  73. <ecny_res_info>
  74. <trade_no>20180504050741694554</trade_no>
  75. <out_trade_no>1805040000021</out_trade_no>
  76. <buyer_pay_amount>1</buyer_pay_amount>
  77. <total_fee>1</total_fee>
  78. <receipt_fee>1</receipt_fee>
  79. <charge_amount>0</charge_amount>
  80. <gmt_payment>20210205113225</gmt_payment>
  81. <detail_error_code></detail_error_code>
  82. <detail_error_desc></detail_error_desc>
  83. </ecny_res_info>
  84. <balpay_res_info>
  85. <trade_no>20180504050741694554</trade_no>
  86. <out_trade_no>1805040000021</out_trade_no>
  87. <total_fee>25</total_fee>
  88. <charge_amount>0</charge_amount>
  89. <gmt_payment>20230530105300</gmt_payment>
  90. <member_id>1542</member_id>
  91. </balpay_res_info>
  92. <result>
  93. <id>0000</id>
  94. <comment>成功</comment>
  95. </result>
  96. </business_trans>

交易返回报文说明

标准接口会因业务升级需要而新增节点,请在解析返回报文时避免新增未知节点产生的程序出错!

节点名称中文名称类型说明是否必填
sign报文签名String(32)返回报文格式为JSON时必填
计算签名方式请看2.1章节
可选
response_type返回类型String(32)固定值:barcode_pay_response必填
isspid商户号String(8)翼码商户号,由翼码提供必填
pos_id终端号String(20)商户自定义终端号必填
pos_seq支付请求流水号String(32)支付请求流水号,和请求报文相同必填
sys_seq随机串号String(16)随机生成串号,仅用于日志跟踪用,不保存必填
trans_time接口返回时间String(14)接口返回时间,格式:yyyyMMddHHmmss必填
pay_type支付类型String(3)502:支付宝
503:微信支付
512:银联二维码
516:数字人民币
519:会员余额支付
可空
extend扩展信息String扩展信息字段内容为json格式
预留字段后续业务扩展使用
可空
buss_discount_amt商家优惠金额String(16)商家优惠金额,单位为分可空
platform_discount_amt平台优惠金额String(16)平台优惠金额,单位为分可空
discount_amt支付宝折扣券String(16)仅支付宝时返回,单位为分可空
mdiscount_amt商户优惠券String(16)仅支付宝时返回,单位为分可空
coupon_amt支付宝红包String(16)仅支付宝时返回,单位为分可空
mcard_amt商户店铺卡String(16)仅支付宝时返回,单位为分可空
mcoupon_amt商户红包String(16)仅支付宝时返回,单位为分可空
point_amt支付宝积分String(16)仅支付宝时返回,单位为分可空
memo订单备注String(128)返回支付请求时内容可空
result
->id
响应码String(4)0000:成功
9998:等待付款,需要调用支付查询交易确认结果
其它代表失败,错误信息说明见“响应码解释”字段
必填
result
->comment
响应码解释String(64)响应码对应中文注解,用于显示提示必填
支付宝返回以下数据
alipay_res_info
->trade_no
支付通道订单号String(64)直连为支付宝订单号
间连为通道订单号
可空
alipay_res_info
->out_trade_no
支付通道商户单号String(64)直连为支付宝商户订单号
间连为请求通道订单号
可空
alipay_res_info
->atu_trade_no
ATU订单号String(64)支付宝/微信/银联订单号
客户手机支付凭证上的订单号
可空
alipay_res_info
->atu_out_trade_no
ATU商户订单号String(64)支付宝/微信/银联商户订单号
客户手机支付凭证上的商户订单号
可空
alipay_res_info
->buy_user_id
买家支付宝用户号String(30)直连通道交易成功时候,必填可空
alipay_res_info
->buy_logon_id
买家支付宝帐号String(100)直连通道交易成功时候,必填可空
alipay_res_info
->total_fee
交易总金额String(16)直连通道交易成功时候,必填可空
alipay_res_info
->receipt_amount
实收金额String(16)直连通道交易成功时候,必填可空
alipay_res_info
->invoice_amount
交易中可给用户开具发票的金额String(16)可空可空
alipay_res_info
->buyer_pay_amount
买家付款的金额String(16)直连通道交易成功时候,必填,单位为分可空
alipay_res_info
->charge_amount
交易手续费String(9)单位为分,交易成功时必填可空
alipay_res_info
->fee_allowance_info
手续费补贴信息StringJSONString格式,仅支持汇付通道交易
详细参数见下表
可空
alipay_res_info
->fund_bill_list
->amount
支付金额String(16)支付金额,单位为分,不支持小数点可空
alipay_res_info
->fund_bill_list
->fund_channel
支付渠道String(2)支付宝支付渠道说明
使用xml报文时不支持,返回为空
可空
alipay_res_info
->gmt_payment
支付完成时间String(14)支付完成时间可空
alipay_res_info
->detail_error_code
支付详细错误码String(48)可空
alipay_res_info
->detail_error_desc
支付详细错误码说明String(64)可空
alipay_res_info
->voucher_detail_list
单品优惠信息JSON本交易支付时使用的所有单品优惠信息,以JSON格式返回
详细参数见下表
可空
微信支付返回以下数据
wxpay_res_info
->trade_no
支付通道订单号String(64)直连为微信订单号
间连为通道订单号
可空
wxpay_res_info
->out_trade_no
支付通道商户单号String(64)直连为微信商户订单号
间连为请求通道订单号
可空
wxpay_res_info
->atu_trade_no
ATU订单号String(64)支付宝/微信/银联订单号
客户手机支付凭证上的订单号
可空
wxpay_res_info
->atu_out_trade_no
ATU商户订单号String(64)支付宝/微信/银联商户订单号
客户手机支付凭证上的商户订单号
可空
wxpay_res_info
->app_id
服务商公众号IDString(32)直连通道交易成功时候,必填可空
wxpay_res_info
->mch_id
服务商商户号String(32)直连通道交易成功时候,必填可空
wxpay_res_info
->open_id
用户相对服务商公众号标识String(128)直连通道交易成功时候,必填可空
wxpay_res_info
->is_subscribe
是否已关注服务商公众帐号String(1)直连通道交易成功时候,必填
Y-已关注
N-未关注
可空
wxpay_res_info
->sub_openid
用户相对子商户公众号标识String(128)可空
wxpay_res_info
->sub_is_subscribe
是否已关注子商户公众帐号String(1)Y-已关注
N-未关注
可空
wxpay_res_info
->trade_type
交易类型String(16)直连通道交易成功时候,必填可空
wxpay_res_info
->bank_type
付款银行String(16)直连通道交易成功时候,必填可空
wxpay_res_info
->total_fee
总金额String(64)直连通道交易成功时候,必填可空
wxpay_res_info
->coupon_fee
代金券金额String(64)直连通道交易成功时候,必填可空
wxpay_res_info
->charge_amount
交易手续费String(9)单位为分,交易成功时必填可空
wxpay_res_info
->fee_allowance_info
手续费补贴信息StringJSONString格式,仅支持汇付通道交易
详细参数见下表
可空
wxpay_res_info
->gmt_payment
支付完成时间String(14)直连通道交易成功时候,必填可空
wxpay_res_info
->detail_error_code
支付详细错误码String(48)直连通道交易成功时候,必填可空
wxpay_res_info
->detail_error_desc
支付详细错误码说明String(128)直连通道交易成功时候,必填可空
wxpay_res_info
->promotion_detail
单品优惠信息JSON本次交易支付的单品优惠信息,以JSON格式返回
详细参数见下表
可空
wxpay_res_info
->buyer_pay_amount
买家实付金额String(16)直连通道交易成功时候,必填,单位为分可空
wxpay_res_info
->settlement_total_fee
应结订单金额String(16)单位为分
当订单使用了免充值型优惠券后返回该参数,应结订单金额=订单金额-免充值优惠券金额。
可空
银联二维码返回以下数据
upay_res_info
->trade_no
支付通道订单号String(64)直连为银联订单号
间连为通道订单号
可空
upay_res_info
->out_trade_no
支付通道商户单号String(64)直连为银联商户订单号
间连为请求通道订单号
可空
upay_res_info
->atu_trade_no
ATU订单号String(64)支付宝/微信/银联订单号
客户手机支付凭证上的订单号
可空
upay_res_info
->atu_out_trade_no
ATU商户订单号String(64)支付宝/微信/银联商户订单号
客户手机支付凭证上的商户订单号
可空
upay_res_info
->buyer_pay_amount
买家实付金额String(16)直连通道交易成功时候,必填,单位为分可空
upay_res_info
->total_fee
订单总金额String(9)单位为分
标准银联/合利宝/星POS通道,交易成功时候,必填
可空
upay_res_info
->charge_amount
交易手续费String(9)单位为分,交易成功时必填可空
upay_res_info
->fee_allowance_info
手续费补贴信息StringJSONString格式,仅支持汇付通道交易
详细参数见下表
可空
数字人民币返回以下数据
ecny_res_info
->trade_no
平台订单号String(64)直连通道交易成功时候,必填可空
ecny_res_info
->out_trade_no
支付商户订单号String(64)直连通道交易成功时候,必填可空
ecny_res_info
->buyer_pay_amount
买家实付金额String(64)直连通道交易成功时候,必填,单位为分可空
ecny_res_info
->total_fee
订单金额String(64)直连通道交易成功时候,必填可空
ecny_res_info
->receipt_fee
实付金额String(64)直连通道交易成功时候,必填可空
ecny_res_info
->charge_amount
交易手续费String(9)单位为分,交易成功时必填可空
ecny_res_info
->gmt_payment
交易时间String(64)直连通道交易成功时候,必填可空
ecny_res_info
->detail_error_code
通道原始应答码,直连通道交易成功时候String(64)直连通道交易失败时候可空
ecny_res_info
->detail_error_desc
通道原始应答说明,直连通道交易成功时候String(64)直连通道交易失败时候可空
会员余额支付返回以下数据
balpay_res_info
->trade_no
支付平台订单号String(64)可空
balpay_res_info
->out_trade_no
支付商户订单号String(64)可空
balpay_res_info
->total_fee
订单总金额String(9)单位为分可空
balpay_res_info
->charge_amount
交易手续费String(9)单位为分,交易成功时必填可空
balpay_res_info
->gmt_payment
支付完成时间String(14)格式:yyyyMMddHHmmss可空
balpay_res_info
->member_id
会员idString(9)可空

标准接口会因业务升级需要而新增节点,请在解析返回报文时避免新增未知节点产生的程序出错!

voucher_detail_list 优惠券信息

JSON节点类型说明是否必填范例
idString(32)券id必填2015102600073002039000002D5O
nameString(64)券名称必填xx超市5折优惠
typeString(32)当前有三种类型:
ALIPAY_FIX_VOUCHER - 全场代金券
ALIPAY_DISCOUNT_VOUCHER - 折扣券
ALIPAY_ITEM_VOUCHER - 单品优惠
注:不排除将来新增其他类型的可能,商家接入时注意兼容性避免硬编码
必填ALIPAY_FIX_VOUCHER
amountString(16)优惠券面额,它应该会等于商家出资加上其他出资方出资,单位为分必填1000
merchant_contributeString(16)商家出资(特指发起交易的商家出资金额,单位为分)可空900
other_contributeString(16)其他出资方出资金额,可能是支付宝,可能是品牌商,或者其他方,也可能是他们的一起出资,单位为分可空100
memoString(256)优惠券备注信息可空学生专用优惠
discount_goods_detailString单品信息必填
discount_goods_detail
->goods_id
String(32)商品的编号必填apple-01
discount_goods_detail
->goods_name
String(256)商品名称必填ipad
discount_goods_detail
->discount_amount
String(16)优惠金额,单位为分必填200000
discount_goods_detail
->voucher_id
String(32)优惠券id必填2015102600073002039000002D5O

voucher_detail_list 样例:

  1. [
  2. {
  3. "amount":"1000",
  4. "id":"2015102600073002039000002D5O",
  5. "memo":"学生专用优惠",
  6. "merchant_contribute":"900",
  7. "name":"XX超市5折优惠",
  8. "other_contribute":"100",
  9. "type":"ALIPAY_FIX_VOUCHER",
  10. "discount_goods_detail":[
  11. {
  12. "goods_id":"STANDARD1026181538",
  13. "goods_name":"雪碧",
  14. "discount_amount":"10000",
  15. "voucher_id":"2015102600073002039000002D5O"
  16. }
  17. ]
  18. },
  19. {
  20. "amount":"1000",
  21. "id":"2015102600073002039000002D5O",
  22. "memo":"学生专用优惠",
  23. "merchant_contribute":"900",
  24. "name":"XX超市5折优惠",
  25. "other_contribute":"100",
  26. "type":"ALIPAY_FIX_VOUCHER",
  27. "discount_goods_detail":[
  28. {
  29. "goods_id":"STANDARD1026181538",
  30. "goods_name":"雪碧",
  31. "discount_amount":"10000",
  32. "voucher_id":"2015102600073002039000002D5O"
  33. }
  34. ]
  35. }
  36. ]

promotion_detail 优惠活动信息

JSON节点类型说明是否必填范例
promotion_idString(32)券或者立减优惠id必填109519
nameString(64)优惠名称可空单品惠-6
scopeString(32)优惠范围
GLOBAL - 全场代金券
SINGLE - 单品优惠
可空SINGLE
typeString(32)优惠类型
COUPON - 代金券,需要走结算资金的充值型代金券,(境外商户券币种与支付币种一致)
DISCOUNT - 优惠券,不走结算资金的免充值型优惠券,(境外商户券币种与标价币种一致)
可空DISCOUNT
amountNumber(16)优惠券面额,用户享受的优惠的金额必填5
activity_idString(32)活动ID
在微信商户后台配置的批次ID
必填931386
wxpay_contributeNumber(16)微信出资(特指由微信支付商户平台创建的优惠,出资金额等于本项优惠总金额,单位为分)可空0
merchant_contributeNumber(16)商家出资(特指商户自己创建的优惠,出资金额等于本项优惠总金额,单位为分)可空0
other_contributeNumber(16)其他出资方出资金额,单位为分可空5
goods_detailString单品列表可空
goods_detail
->goods_id
String(32)商品编码必填a_goods1
goods_detail
->goods_remark
String(128)商品备注可选1001
goods_detail
->discount_amount
Number(16)商品优惠金额,单位为分必填100
goods_detail
->quantity
Number(10)商品数量必填1
goods_detail
->price
Number(16)商品价格,单位为分
如果商户有优惠,需传输商户优惠后的单价(例如:用户对一笔100元的订单使用了商场发的纸质优惠券100-50,则活动商品的单价应为原单价-50)
必填528800

promotion_detail 样例:

  1. {
  2. "promotion_detail": [
  3. {
  4. "promotion_id": "109519",
  5. "name": "单品惠-6",
  6. "scope": "SINGLE",
  7. "type": "DISCOUNT",
  8. "amount": 5,
  9. "activity_id": "931386",
  10. "wxpay_contribute": 0,
  11. "merchant_contribute": 0,
  12. "other_contribute": 5,
  13. "goods_detail": [
  14. {
  15. "goods_id": "a_goods1",
  16. "goods_remark": "商品备注",
  17. "quantity": 7,
  18. "price": 1,
  19. "discount_amount": 4
  20. },
  21. {
  22. "goods_id": "a_goods2",
  23. "goods_remark": "商品备注",
  24. "quantity": 1,
  25. "price": 2,
  26. "discount_amount": 1
  27. }
  28. ]
  29. }
  30. ]
  31. }

fee_allowance_info 手续费补贴信息 (JSONString)

JSON节点类型说明是否必填范例
receivable_fee_amtString商户应收手续费,单位:分必填2
actual_fee_amtString商户实收手续费,单位:分必填1
allowance_fee_amtString补贴手续费,单位:分必填1
allowance_typeString补贴类型
0:不补贴,为空默认
1:补贴
2:部分补贴
3:全额补贴(优惠后)
4:部分补贴(优惠后)
必填2
no_allowance_descString不补贴原因
1:汇收款产品(HSK)银联二维码交易金额大于1000元不补贴
2:额度用完
3:不在有效期
4:活动不存在
5:手续费金额为0不补贴
6:顶格优惠
7:额度不足
8:手续费后补
9:未达到起始补贴金额
可空2
cur_allowance_config_infosJSONObject手续费补贴活动详情,详细参数见下表可空 

cur_allowance_config_infos 手续费补贴活动详情 (JSONObject)

JSON节点类型说明是否必填范例
merchant_groupString商户号,通道侧商户号可空6666000123120000
acct_idString门店可空sh002
activity_idString活动号必填223402342
activity_nameString活动描述可空开业大促
statusString活动是否有效
1:生效
0:失效
必填1
total_limit_amtString活动总补贴额度,单位:分必填1000
start_timeString活动开始时间,yyyyMMdd必填20220909
end_timeString活动结束时间,yyyyMMdd必填20220911
human_flagString是否人工操作
N:自动
Y:人工
必填1
allowance_sysString补贴方
1:银行
2:服务商
3:汇来米
必填1
allowance_sys_idString补贴方ID,通道侧商户号必填6666000123120000
is_delay_allowanceString补贴类型
1:实补
2:后补
默认实补
必填1
is_shareString是不是共享额度可空
market_idString自定义活动编号必填ISFE00232
market_nameString自定义活动名称可空开业大促
market_descString自定义活动描述可空新店开业大促
pos_credit_limit_amtStringpos贷记卡补贴额度,单位:分必填500
pos_debit_limit_amtStringpos借记卡补贴额度,单位:分必填200
pos_limit_amtStringpos补贴额度,单位:分必填400
qr_limit_amtString扫码补贴额度,单位:分必填100
create_byString创建人必填Lg2022022201394910571
create_timeString创建时间必填2022-04-14 22:00:30
update_timeString更新时间必填2022-04-14 23:00:30