交易请求报文

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
根据央行要求必须传门店真实公网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. "fund_bill_list": [
  33. {
  34. "amount": "1",
  35. "fund_channel": "ALIPAYACCOUNT"
  36. },
  37. {
  38. "amount": "1",
  39. "fund_channel": "COUPON"
  40. }
  41. ],
  42. "voucher_detail_list": [
  43. {
  44. "amount": "1000",
  45. "id": "2015102600073002039000002D5O",
  46. "memo": "学生专用优惠",
  47. "merchant_contribute": "900",
  48. "name": "XX超市5折优惠",
  49. "other_contribute": "100",
  50. "type": "ALIPAY_FIX_VOUCHER",
  51. "discount_goods_detail": [
  52. {
  53. "goods_id": "STANDARD1026181538",
  54. "goods_name": "雪碧",
  55. "discount_amount": "10000",
  56. "voucher_id": "2015102600073002039000002D5O"
  57. }
  58. ]
  59. },
  60. {
  61. "amount": "1000",
  62. "id": "2015102600073002039000002D5O",
  63. "memo": "学生专用优惠",
  64. "merchant_contribute": "900",
  65. "name": "XX超市5折优惠",
  66. "other_contribute": "100",
  67. "type": "ALIPAY_FIX_VOUCHER",
  68. "discount_goods_detail": [
  69. {
  70. "goods_id": "STANDARD1026181538",
  71. "goods_name": "雪碧",
  72. "discount_amount": "10000",
  73. "voucher_id": "2015102600073002039000002D5O"
  74. }
  75. ]
  76. }
  77. ],
  78. "detail_error_code": "10000",
  79. "detail_error_desc": "Success"
  80. },
  81. "wxpay_res_info": {
  82. "buyer_pay_amount": 1,
  83. "trade_no": "4200000196201812146252898537",
  84. "out_trade_no": "2018121400000002",
  85. "atu_trade_no": "4200000196201812146252898537",
  86. "atu_out_trade_no": "2018121400000002",
  87. "app_id": "wx5acb63e448b4fc22",
  88. "mch_id": "1241109502",
  89. "open_id": "oVTJstwEIdlt3ExaSCxF_cfdRADE",
  90. "is_subscribe": "N",
  91. "sub_openid": "oXI_E5KN-FJi1Hf65mWeiBF8fUlU",
  92. "sub_is_subscribe": "",
  93. "trade_type": "MICROPAY",
  94. "bank_type": "CFT",
  95. "total_fee": "1",
  96. "coupon_fee": "",
  97. "charge_amount": "0",
  98. "gmt_payment": "20181214141132",
  99. "detail_error_code": "SUCCESS",
  100. "detail_error_desc": "OK",
  101. "settlement_total_fee": "1",
  102. "promotion_detail": {
  103. "promotion_detail": [
  104. {
  105. "promotion_id": "109519",
  106. "name": "单品惠-6",
  107. "scope": "SINGLE",
  108. "type": "DISCOUNT",
  109. "amount": 5,
  110. "activity_id": "931386",
  111. "wxpay_contribute": 0,
  112. "merchant_contribute": 0,
  113. "other_contribute": 5,
  114. "goods_detail": [
  115. {
  116. "goods_id": "a_goods1",
  117. "goods_remark": "商品备注",
  118. "quantity": 7,
  119. "price": 1,
  120. "discount_amount": 4
  121. },
  122. {
  123. "goods_id": "a_goods2",
  124. "goods_remark": "商品备注",
  125. "quantity": 1,
  126. "price": 2,
  127. "discount_amount": 1
  128. }
  129. ]
  130. }
  131. ]
  132. }
  133. },
  134. "upay_res_info": {
  135. "trade_no": "20180504050741694554",
  136. "out_trade_no": "1805040000021",
  137. "atu_trade_no": "20180504050741694554",
  138. "atu_out_trade_no": "1805040000021",
  139. "buyer_pay_amount": "1",
  140. "total_fee": "1",
  141. "charge_amount": "0"
  142. },
  143. "ecny_res_info": {
  144. "trade_no": "20180504050741694554",
  145. "out_trade_no": "1805040000021",
  146. "buyer_pay_amount": "1"
  147. "total_fee": "1",
  148. "receipt_fee": "1",
  149. "charge_amount": "0",
  150. "gmt_payment": "20210205113225",
  151. "detail_error_code": "",
  152. "detail_error_desc": ""
  153. },
  154. "balpay_res_info": {
  155. "trade_no": "20180504050741694554",
  156. "out_trade_no": "1805040000021",
  157. "total_fee": "25",
  158. "charge_amount": "0",
  159. "gmt_payment": "20230530105300",
  160. "member_id": "1542"
  161. },
  162. "result": {
  163. "id": "0000",
  164. "comment": "交易成功"
  165. },
  166. "sign": "C557C5D68AA5D803B2E6FF54AA28E5DF"
  167. }

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. <fund_bill_list></fund_bill_list>
  33. <gmt_payment>20181115085738</gmt_payment>
  34. <detail_error_code></detail_error_code>
  35. <detail_error_desc></detail_error_desc>
  36. <voucher_detail_list>[{单品优惠信息(JOSN)}]</voucher_detail_list>
  37. </alipay_res_info>
  38. <wxpay_res_info>
  39. <trade_no>4001172001201604144821605495</trade_no>
  40. <out_trade_no>1811150000002</out_trade_no>
  41. <atu_trade_no>4001172001201604144821605495</atu_trade_no>
  42. <atu_out_trade_no>1811150000002</atu_out_trade_no>
  43. <app_id>wx5acb63e448b4fc22</app_id>
  44. <mch_id>1241109502</mch_id>
  45. <open_id>oVTJstwEIdlt3ExaSCxF_cfdRADE</open_id>
  46. <is_subscribe>N</is_subscribe>
  47. <sub_openid>oXI_E5KN-FJi1Hf65mWeiBF8fUlU</sub_openid>
  48. <sub_is_subscribe>N</sub_is_subscribe>
  49. <trade_type>MICROPAY</trade_type>
  50. <bank_type>CCB_DEBIT</bank_type>
  51. <total_fee>1</total_fee>
  52. <coupon_fee>0</coupon_fee>
  53. <charge_amount>0</charge_amount>
  54. <gmt_payment>20181115090351</gmt_payment>
  55. <detail_error_code>SUCCESS</detail_error_code>
  56. <detail_error_desc>OK</detail_error_desc>
  57. <promotion_detail>[{单品优惠信息(JOSN)}]</promotion_detail>
  58. <buyer_pay_amount>1</buyer_pay_amount>
  59. <settlement_total_fee>1</settlement_total_fee>
  60. </wxpay_res_info>
  61. <upay_res_info>
  62. <trade_no>20180504050741694554</trade_no>
  63. <out_trade_no>1805040000021</out_trade_no>
  64. <atu_trade_no>20180504050741694554</atu_trade_no>
  65. <atu_out_trade_no>1805040000021</atu_out_trade_no>
  66. <buyer_pay_amount>1</buyer_pay_amount>
  67. <total_fee>1</total_fee>
  68. <charge_amount>0</charge_amount>
  69. </upay_res_info>
  70. <ecny_res_info>
  71. <trade_no>20180504050741694554</trade_no>
  72. <out_trade_no>1805040000021</out_trade_no>
  73. <buyer_pay_amount>1</buyer_pay_amount>
  74. <total_fee>1</total_fee>
  75. <receipt_fee>1</receipt_fee>
  76. <charge_amount>0</charge_amount>
  77. <gmt_payment>20210205113225</gmt_payment>
  78. <detail_error_code></detail_error_code>
  79. <detail_error_desc></detail_error_desc>
  80. </ecny_res_info>
  81. <balpay_res_info>
  82. <trade_no>20180504050741694554</trade_no>
  83. <out_trade_no>1805040000021</out_trade_no>
  84. <total_fee>25</total_fee>
  85. <charge_amount>0</charge_amount>
  86. <gmt_payment>20230530105300</gmt_payment>
  87. <member_id>1542</member_id>
  88. </balpay_res_info>
  89. <result>
  90. <id>0000</id>
  91. <comment>成功</comment>
  92. </result>
  93. </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
->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
->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)单位为分,交易成功时必填可空
数字人民币返回以下数据
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. }