业务说明

支持的交易类型:
4.2条码支付、4.3扫码支付、4.13jsapi支付、4.14微信小程序支付、4.21聚合动态码支付、4.22小程序支付收银台下单

交易请求报文

JSON:

  1. {
  2. "request_type": "barcode_query_request",
  3. "isspid": "39493002",
  4. "pos_id": "8888888888",
  5. "store_id": "8888888888",
  6. "pos_seq": "2018121400000005",
  7. "user_id": "user01",
  8. "system_id": "8888",
  9. "barcode_query_request": {
  10. "pay_type": "502",
  11. "org_pos_seq": "2018121400000001"
  12. },
  13. "sign": "79CB18BC49A4D60C457506EA4EF27C14"
  14. }

XML:

  1. <?xml version="1.0" encoding="GBK"?>
  2. <business_trans>
  3. <request_type>barcode_query_request</request_type>
  4. <isspid>39493002</isspid>
  5. <pos_id>1511300001</pos_id>
  6. <store_id>1511300001</store_id>
  7. <pos_seq>1511300000003</pos_seq>
  8. <user_id>user01</user_id>
  9. <system_id>8888</system_id>
  10. <barcode_query_request>
  11. <pay_type>502</pay_type>
  12. <org_pos_seq>1511300000001</org_pos_seq>
  13. </barcode_query_request>
  14. </business_trans>

交易请求报文说明

节点名称中文名称类型说明是否必填
sign报文签名String(32)请求报文格式为JSON时必填
计算签名方式请看2.1章节
可选
request_type请求类型String(32)固定值:barcode_query_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)由翼码提供必填
barcode_query_request
->pay_type
支付类型String(3)502:支付宝
503:微信支付
512:银联二维码
515:微信小程序
516:数字人民币
519:会员余额支付
521:聚分期
可空
barcode_query_request
->org_pos_seq
支付请求流水号String(32)被查询的支付请求流水号必填

交易返回报文

JSON:

  1. {
  2. "response_type": "barcode_query_response",
  3. "isspid": "39493002",
  4. "pos_id": "8888888888",
  5. "pos_seq": "2018121400000005",
  6. "trans_time": "20181214143957",
  7. "pay_type": "502",
  8. "extend": "<![CDATA[]]>",
  9. "sys_seq": "0f041092d0ccc6ae",
  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": "1",
  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": "",
  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. "wxapp_res_info": {
  135. "buyer_pay_amount": 1,
  136. "trade_no": "4200000196201812146252898537",
  137. "out_trade_no": "2018121400000002",
  138. "atu_trade_no": "4200000196201812146252898537",
  139. "atu_out_trade_no": "2018121400000002",
  140. "app_id": "wx5acb63e448b4fc22",
  141. "mch_id": "1241109502",
  142. "open_id": "oVTJstwEIdlt3ExaSCxF_cfdRADE",
  143. "is_subscribe": "N",
  144. "sub_openid": "oXI_E5KN-FJi1Hf65mWeiBF8fUlU",
  145. "sub_is_subscribe": "",
  146. "trade_type": "MICROPAY",
  147. "bank_type": "CFT",
  148. "total_fee": "1",
  149. "coupon_fee": "",
  150. "charge_amount": "0",
  151. "gmt_payment": "20181214141132",
  152. "detail_error_code": "SUCCESS",
  153. "detail_error_desc": "OK",
  154. "settlement_total_fee": "1",
  155. "promotion_detail": {
  156. "promotion_detail": [
  157. {
  158. "promotion_id": "109519",
  159. "name": "单品惠-6",
  160. "scope": "SINGLE",
  161. "type": "DISCOUNT",
  162. "amount": 5,
  163. "activity_id": "931386",
  164. "wxpay_contribute": 0,
  165. "merchant_contribute": 0,
  166. "other_contribute": 5,
  167. "goods_detail": [
  168. {
  169. "goods_id": "a_goods1",
  170. "goods_remark": "商品备注",
  171. "quantity": 7,
  172. "price": 1,
  173. "discount_amount": 4
  174. },
  175. {
  176. "goods_id": "a_goods2",
  177. "goods_remark": "商品备注",
  178. "quantity": 1,
  179. "price": 2,
  180. "discount_amount": 1
  181. }
  182. ]
  183. }
  184. ]
  185. }
  186. },
  187. "upay_res_info": {
  188. "trade_no": "20180504050741694554",
  189. "out_trade_no": "1805040000021",
  190. "atu_trade_no": "20180504050741694554",
  191. "atu_out_trade_no": "1805040000021",
  192. "buyer_pay_amount": "1",
  193. "total_fee": "1",
  194. "charge_amount": "0"
  195. },
  196. "ecny_res_info": {
  197. "trade_no": "20180504050741694554",
  198. "out_trade_no": "1805040000021",
  199. "buyer_pay_amount": "1",
  200. "total_fee": "1",
  201. "receipt_fee": "1",
  202. "charge_amount": "0",
  203. "gmt_payment": "20210205113225",
  204. "detail_error_code": "",
  205. "detail_error_desc": "",
  206. "order_status": "03"
  207. },
  208. "balpay_res_info": {
  209. "trade_no": "20180504050741694554",
  210. "out_trade_no": "1805040000021",
  211. "total_fee": "25",
  212. "charge_amount": "0",
  213. "gmt_payment": "20230530105300",
  214. "member_id": "1542"
  215. },
  216. "jfqpay_res_info": {
  217. "trade_no": "20180504050741694554",
  218. "out_trade_no": "1805040000021",
  219. "atu_trade_no": "20180504050741694554",
  220. "atu_out_trade_no": "1805040000021",
  221. "total_fee": "25",
  222. "charge_amount": "0",
  223. "gmt_payment": "20230530105300",
  224. "bank_code": "",
  225. },
  226. "result": {
  227. "id": "0000",
  228. "comment": "交易成功"
  229. },
  230. "sign": "79D928004531AE15DFA6AD7E9A6A2447"
  231. }

XML:

  1. <?xml version="1.0" encoding="GBK"?>
  2. <business_trans>
  3. <response_type>barcode_query_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>oVTJstwEIdlt3ExaSCxF_cfdRADE</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. <wxapp_res_info>
  62. <trade_no>4001172001201604144821605495</trade_no>
  63. <out_trade_no>1811150000002</out_trade_no>
  64. <atu_trade_no>4001172001201604144821605495</atu_trade_no>
  65. <atu_out_trade_no>1811150000002</atu_out_trade_no>
  66. <app_id>wx5acb63e448b4fc22</app_id>
  67. <mch_id>1241109502</mch_id>
  68. <open_id>oVTJstwEIdlt3ExaSCxF_cfdRADE</open_id>
  69. <is_subscribe>N</is_subscribe>
  70. <sub_openid>oXI_E5KN-FJi1Hf65mWeiBF8fUlU</sub_openid>
  71. <sub_is_subscribe>N</sub_is_subscribe>
  72. <trade_type>MICROPAY</trade_type>
  73. <bank_type>CCB_DEBIT</bank_type>
  74. <total_fee>1</total_fee>
  75. <coupon_fee>0</coupon_fee>
  76. <charge_amount>0</charge_amount>
  77. <gmt_payment>20181115090351</gmt_payment>
  78. <detail_error_code>SUCCESS</detail_error_code>
  79. <detail_error_desc>OK</detail_error_desc>
  80. <promotion_detail>[{单品优惠信息(JOSN)}]</promotion_detail>
  81. <buyer_pay_amount>1</buyer_pay_amount>
  82. <settlement_total_fee>1</settlement_total_fee>
  83. </wxapp_res_info>
  84. <upay_res_info>
  85. <trade_no>20180504050741694554</trade_no>
  86. <out_trade_no>1805040000021</out_trade_no>
  87. <atu_trade_no>20180504050741694554</atu_trade_no>
  88. <atu_out_trade_no>1805040000021</atu_out_trade_no>
  89. <buyer_pay_amount>1</buyer_pay_amount>
  90. <total_fee>1</total_fee>
  91. <charge_amount>0</charge_amount>
  92. </upay_res_info>
  93. <ecny_res_info>
  94. <trade_no>20180504050741694554</trade_no>
  95. <out_trade_no>1805040000021</out_trade_no>
  96. <buyer_pay_amount>1</buyer_pay_amount>
  97. <total_fee>1</total_fee>
  98. <receipt_fee>1</receipt_fee>
  99. <charge_amount>0</charge_amount>
  100. <gmt_payment>20210205113225</gmt_payment>
  101. <detail_error_code></detail_error_code>
  102. <detail_error_desc></detail_error_desc>
  103. <order_status>03</order_status>"
  104. </ecny_res_info>
  105. <balpay_res_info>
  106. <trade_no>20180504050741694554</trade_no>
  107. <out_trade_no>1805040000021</out_trade_no>
  108. <total_fee>25</total_fee>
  109. <charge_amount>0</charge_amount>
  110. <gmt_payment>20230530105300</gmt_payment>
  111. <member_id>1542</member_id>
  112. </balpay_res_info>
  113. <jfqpay_res_info>
  114. <trade_no>20180504050741694554</trade_no>
  115. <out_trade_no>1805040000021</out_trade_no>
  116. <atu_trade_no>20180504050741694554</atu_trade_no>
  117. <atu_out_trade_no>1805040000021</atu_out_trade_no>
  118. <total_fee>25</total_fee>
  119. <charge_amount>0</charge_amount>
  120. <gmt_payment>20230530105300</gmt_payment>
  121. <bank_code></bank_code>
  122. </jfqpay_res_info>
  123. <result>
  124. <id>0000</id>
  125. <comment>成功</comment>
  126. </result>
  127. </business_trans>

交易返回报文说明

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

节点名称中文名称类型说明是否必填
sign报文签名String(32)返回报文格式为JSON时必填
计算签名方式请看2.1章节
可选
response_type返回类型String(32)固定值:barcode_query_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:银联二维码
515:微信小程序
516:数字人民币
519:会员余额支付
521:聚分期
当支付单为聚合动态码时,用户未扫码下单前为空
可空
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
单品优惠信息JSONArray本交易支付时使用的所有单品优惠信息,以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)单位为分
当订单使用了免充值型优惠券后返回该参数,应结订单金额=订单金额-免充值优惠券金额。
可空
微信小程序支付返回以下数据
wxapp_res_info
->trade_no
支付通道订单号String(64)直连为微信订单号
间连为通道订单号
可空
wxapp_res_info
->out_trade_no
支付通道商户单号String(64)直连为微信商户订单号
间连为请求通道订单号
可空
wxapp_res_info
->atu_trade_no
ATU订单号String(64)支付宝/微信/银联订单号
客户手机支付凭证上的订单号
可空
wxapp_res_info
->atu_out_trade_no
ATU商户订单号String(64)支付宝/微信/银联商户订单号
客户手机支付凭证上的商户订单号
可空
wxapp_res_info
->app_id
服务商公众号IDString(32)直连通道交易成功时候,必填可空
wxapp_res_info
->mch_id
服务商商户号String(32)直连通道交易成功时候,必填可空
wxapp_res_info
->open_id
用户相对服务商公众号标识String(128)直连通道交易成功时候,必填可空
wxapp_res_info
->is_subscribe
是否已关注服务商公众帐号String(1)直连通道交易成功时候,必填
Y-已关注
N-未关注
可空
wxapp_res_info
->sub_openid
用户相对子商户公众号标识String(128)直连通道交易成功时候,必填可空
wxapp_res_info
->sub_is_subscribe
是否已关注子商户公众帐号String(1)直连通道交易成功时候,必填
Y-已关注
N-未关注
可空
wxapp_res_info
->trade_type
交易类型String(16)直连通道交易成功时候,必填可空
wxapp_res_info
->bank_type
付款银行String(16)直连通道交易成功时候,必填可空
wxapp_res_info
->total_fee
总金额String(64)直连通道交易成功时候,必填可空
wxapp_res_info
->coupon_fee
代金券金额String(64)直连通道交易成功时候,必填可空
wxapp_res_info
->charge_amount
交易手续费String(9)单位为分,交易成功时必填可空
wxapp_res_info
->gmt_payment
支付完成时间String(14)直连通道交易成功时候,必填可空
wxapp_res_info
->detail_error_code
支付详细错误码String(48)直连通道交易成功时候,必填可空
wxapp_res_info
->detail_error_desc
支付详细错误码说明String(128)直连通道交易成功时候,必填可空
wxapp_res_info
->promotion_detail
单品优惠信息JSON本次交易支付的单品优惠信息,以JSON格式返回
详细参数见下表
可空
wxapp_res_info
->buyer_pay_amount
买家实付金额String(16)直连通道交易成功时候,必填,单位为分可空
wxapp_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(16)直连通道交易成功时候,必填,单位为分可空
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
->order_status
原始订单的状态String(64)01:订单创建,02:用户支付中,03:已关闭,04:部分退款,05:全部退款,06:交易成功可空
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)可空
聚分期返回以下数据
jfqpay_res_info
->trade_no
支付平台订单号String(64)可空
jfqpay_res_info
->out_trade_no
支付商户订单号String(64)可空
jfqpay_res_info
->atu_trade_no
ATU订单号String(64)支付宝/微信/银联订单号
客户手机支付凭证上的订单号
可空
jfqpay_res_info
->atu_out_trade_no
ATU商户订单号String(64)支付宝/微信/银联商户订单号
客户手机支付凭证上的商户订单号
可空
jfqpay_res_info
->total_fee
订单总金额String(9)单位为分可空
jfqpay_res_info
->charge_amount
交易手续费String(9)单位为分,交易成功时必填可空
jfqpay_res_info
->gmt_payment
支付完成时间String(14)格式:yyyyMMddHHmmss可空
jfqpay_res_info
->bank_code
发卡行编码String(20)可空

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

voucher_detail_list 优惠券信息 (JSONArray)

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_detailArray单品信息必填
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)

JSON节点类型说明是否必填范例
promotion_detailArraypromotion_detail必填 

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_detailArray单品列表可空
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. }