业务说明

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

交易请求报文

JSON:

  1. {
  2. "request_type": "barcode_refundquery_request",
  3. "isspid": "39493002",
  4. "pos_id": "8888888888",
  5. "store_id": "8888888888",
  6. "pos_seq": "2018121400000008",
  7. "user_id": "user01",
  8. "system_id": "8888",
  9. "barcode_refundquery_request": {
  10. "pay_type": "502",
  11. "org_pos_seq": "2018121400000006"
  12. },
  13. "sign": "A95561E9CBB30BD049000FD9C530B1AF"
  14. }

XML:

  1. <?xml version="1.0" encoding="GBK"?>
  2. <business_trans>
  3. <request_type>barcode_refundquery_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_refundquery_request>
  11. <pay_type>502</pay_type>
  12. <org_pos_seq>1511300000001</org_pos_seq>
  13. </barcode_refundquery_request>
  14. </business_trans>

交易请求报文说明

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

交易返回报文

JSON:

  1. {
  2. "response_type": "barcode_refundquery_response",
  3. "isspid": "39493002",
  4. "pos_id": "8888888888",
  5. "pos_seq": "2018121400000008",
  6. "trans_time": "20181214151418",
  7. "sys_seq": "a4507a682d26403a",
  8. "pay_type": "502",
  9. "extend": "<![CDATA[]]>",
  10. "buss_discount_amt": 0,
  11. "platform_discount_amt": 0,
  12. "memo": "订单备注",
  13. "alipay_res_info": {
  14. "trade_no": "2018121422001429700548119225",
  15. "out_trade_no": "2018121400000001",
  16. "detail_error_code": "",
  17. "detail_error_desc": "",
  18. "send_back_fee": "",
  19. "charge_amount": "0",
  20. "gmt_refund_pay": ""
  21. },
  22. "wxpay_res_info": {
  23. "trade_no": "4200000196201812146252898537",
  24. "out_trade_no": "2018121400000002",
  25. "app_id": "wx5acb63e448b4fc22",
  26. "mch_id": "1241109502",
  27. "detail_error_code": "",
  28. "detail_error_desc": "",
  29. "send_back_fee": "1",
  30. "settlement_total_fee": "",
  31. "settlement_refund_fee": "",
  32. "charge_amount": "0",
  33. "gmt_refund_pay": "20181214150715"
  34. },
  35. "wxapp_res_info": {
  36. "trade_no": "4200000196201812146252898537",
  37. "out_trade_no": "2018121400000002",
  38. "app_id": "wx5acb63e448b4fc22",
  39. "mch_id": "1241109502",
  40. "detail_error_code": "",
  41. "detail_error_desc": "",
  42. "send_back_fee": "1",
  43. "settlement_total_fee": "",
  44. "settlement_refund_fee": "",
  45. "charge_amount": "0",
  46. "gmt_refund_pay": "20181214150715"
  47. },
  48. "upay_res_info": {
  49. "trade_no": "4200000196201812146252898537",
  50. "out_trade_no": "2018121400000002",
  51. "refund_amt": "1",
  52. "charge_amount": "0"
  53. },
  54. "ecny_res_info": {
  55. "trade_no": "4200000196201812146252898537",
  56. "out_trade_no": "2018121400000002",
  57. "refund_amount": "1",
  58. "do_refund_amount": "1",
  59. "charge_amount": "0",
  60. "gmt_refund_pay": "20210205113225",
  61. "order_status": "03",
  62. "detail_error_code": "",
  63. "detail_error_desc": ""
  64. },
  65. "balpay_res_info": {
  66. "trade_no": "4200000196201812146252898537",
  67. "out_trade_no": "2018121400000002",
  68. "refund_amount": "1",
  69. "charge_amount": "0",
  70. "gmt_refund_pay": "20210205111441",
  71. "member_id": "1452",
  72. },
  73. "jfqpay_res_info": {
  74. "trade_no": "4200000196201812146252898537",
  75. "out_trade_no": "2018121400000002",
  76. "refund_amount": "1",
  77. "charge_amount": "0",
  78. "gmt_refund_pay": "20210205111441",
  79. },
  80. "result": {
  81. "id": "0000",
  82. "comment": "交易成功"
  83. },
  84. "sign": "B94B9113A279C761A831C5B592E0BF09"
  85. }

XML:

  1. <?xml version="1.0" encoding="GBK"?>
  2. <business_trans>
  3. <response_type>barcode_refundquery_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. <memo>订单备注</memo>
  14. <alipay_res_info>
  15. <trade_no></trade_no>
  16. <out_trade_no></out_trade_no>
  17. <detail_error_code></detail_error_code>
  18. <detail_error_desc></detail_error_desc>
  19. <send_back_fee>1</send_back_fee>
  20. <charge_amount>0</charge_amount>
  21. <gmt_refund_pay>20181115092624</gmt_refund_pay>
  22. </alipay_res_info>
  23. <wxpay_res_info>
  24. <trade_no>4001172001201611169902101944</trade_no>
  25. <out_trade_no>0001034843100000087203</out_trade_no>
  26. <app_id>wx5acb63e448b4fc22</app_id>
  27. <mch_id>1241109502</mch_id>
  28. <detail_error_code>SUCCESS</detail_error_code>
  29. <detail_error_desc>OK</detail_error_desc>
  30. <send_back_fee>1</send_back_fee>
  31. <settlement_total_fee>1</settlement_total_fee>
  32. <settlement_refund_fee>1</settlement_refund_fee>
  33. <charge_amount>0</charge_amount>
  34. <gmt_refund_pay>20181115092624</gmt_refund_pay>
  35. </wxpay_res_info>
  36. <wxapp_res_info>
  37. <trade_no>4001172001201611169902101944</trade_no>
  38. <out_trade_no>0001034843100000087203</out_trade_no>
  39. <app_id>wx5acb63e448b4fc22</app_id>
  40. <mch_id>1241109502</mch_id>
  41. <detail_error_code>SUCCESS</detail_error_code>
  42. <detail_error_desc>OK</detail_error_desc>
  43. <send_back_fee>1</send_back_fee>
  44. <settlement_total_fee>1</settlement_total_fee>
  45. <settlement_refund_fee>1</settlement_refund_fee>
  46. <charge_amount>0</charge_amount>
  47. <gmt_refund_pay>20181115092624</gmt_refund_pay>
  48. </wxapp_res_info>
  49. <upay_res_info>
  50. <trade_no>4001172001201611169902101944</trade_no>
  51. <out_trade_no>0001034843100000087203</out_trade_no>
  52. <refund_amt>1</refund_amt>
  53. <charge_amount>0</charge_amount>
  54. </upay_res_info>
  55. <ecny_res_info>
  56. <trade_no>4001172001201611169902101944</trade_no>
  57. <out_trade_no>0001034843100000087203</out_trade_no>
  58. <refund_amount>1</refund_amount>
  59. <do_refund_amount>1</do_refund_amount>
  60. <charge_amount>0</charge_amount>
  61. <gmt_refund_pay>20210205113225</gmt_refund_pay>
  62. <order_status>03</order_status>
  63. <detail_error_code></detail_error_code>
  64. <detail_error_desc></detail_error_desc>
  65. </ecny_res_info>
  66. <balpay_res_info>
  67. <trade_no>15415906</trade_no>
  68. <out_trade_no>1000000000511</out_trade_no>
  69. <refund_amount>1</refund_amount>
  70. <charge_amount>0</charge_amount>
  71. <gmt_refund_pay>20210205111441</gmt_refund_pay>
  72. <member_id>1452</member_id>
  73. </balpay_res_info>
  74. <jfqpay_res_info>
  75. <trade_no>15415906</trade_no>
  76. <out_trade_no>1000000000511</out_trade_no>
  77. <refund_amount>1</refund_amount>
  78. <charge_amount>0</charge_amount>
  79. <gmt_refund_pay>20210205111441</gmt_refund_pay>
  80. </jfqpay_res_info>
  81. <result>
  82. <id>0000</id>
  83. <comment>成功</comment>
  84. </result>
  85. </business_trans>

交易返回报文说明

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

节点名称中文名称类型说明是否必填
sign报文签名String(32)返回报文格式为JSON时必填
计算签名方式请看2.1章节
可选
response_type返回类型String(32)固定值:barcode_refundquery_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)平台优惠金额,单位为分,支付宝类型根据返回平台结果可能返回为空值可空
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
->detail_error_code
支付详细错误码String(48)可空
alipay_res_info
->detail_error_desc
支付详细错误码说明String(64)可空
alipay_res_info
->send_back_fee
卖家退款金额String(16)本次商户实际退回金额
即退款总金额减去商户优惠退款部分
默认不返回该信息,需与支付宝约定后配置返回,单位为分
可空
alipay_res_info
->charge_amount
退款手续费String(9)单位为分,交易成功时必填可空
alipay_res_info
->gmt_refund_pay
退款完成时间String(14)退款完成时间可空
微信支付返回以下数据
wxpay_res_info
->trade_no
微信订单号String(64)直连通道交易成功时候,必填可空
wxpay_res_info
->out_trade_no
支付商户订单号String(64)直连通道交易成功时候,必填可空
wxpay_res_info
->app_id
服务商公众号IDString(32)直连通道交易成功时候,必填可空
wxpay_res_info
->mch_id
服务商商户号String(32)直连通道交易成功时候,必填可空
wxpay_res_info
->detail_error_code
退款详细错误码String(48)直连通道交易成功时候,必填可空
wxpay_res_info
->detail_error_desc
退款详细错误码说明String(128)直连通道交易成功时候,必填可空
wxpay_res_info
->send_back_fee
卖家退款金额String(16)本次商户实际退回金额
即退款总金额减去商户优惠退款部分
直连通道交易成功时候,必填,单位为分
可空
wxpay_res_info
->settlement_total_fee
应结订单金额String(16)单位为分
当订单使用了免充值型优惠券后返回该参数,应结订单金额=订单金额-免充值优惠券金额。
可空
wxpay_res_info
->settlement_refund_fee
应结退款金额String(16)单位为分
去掉非充值代金券退款金额后的应结退款金额,应结退款金额=申请退款金额-非充值代金券退款金额,应结退款金额<=申请退款金额
可空
wxpay_res_info
->charge_amount
退款手续费String(9)单位为分,交易成功时必填可空
wxpay_res_info
->gmt_refund_pay
退款完成时间String(14)退款完成时间可空
微信小程序支付返回以下数据
wxapp_res_info
->trade_no
微信订单号String(64)直连通道交易成功时候,必填可空
wxapp_res_info
->out_trade_no
支付商户订单号String(64)直连通道交易成功时候,必填可空
wxapp_res_info
->app_id
服务商公众号IDString(32)直连通道交易成功时候,必填可空
wxapp_res_info
->mch_id
服务商商户号String(32)直连通道交易成功时候,必填可空
wxapp_res_info
->detail_error_code
退款详细错误码String(48)直连通道交易成功时候,必填可空
wxapp_res_info
->detail_error_desc
退款详细错误码说明String(128)直连通道交易成功时候,必填可空
wxapp_res_info
->send_back_fee
卖家退款金额String(16)本次商户实际退回金额
即退款总金额减去商户优惠退款部分
直连通道交易成功时候,必填,单位为分
可空
wxapp_res_info
->settlement_total_fee
应结订单金额String(16)单位为分
当订单使用了免充值型优惠券后返回该参数,应结订单金额=订单金额-免充值优惠券金额。
可空
wxapp_res_info
->settlement_refund_fee
应结退款金额String(16)单位为分
去掉非充值代金券退款金额后的应结退款金额,应结退款金额=申请退款金额-非充值代金券退款金额,应结退款金额<=申请退款金额
可空
wxapp_res_info
->charge_amount
退款手续费String(9)单位为分,交易成功时必填可空
wxapp_res_info
->gmt_refund_pay
退款完成时间String(14)退款完成时间可空
银联二维码返回以下数据
upay_res_info
->trade_no
银联订单号String(64)直连通道交易成功时候,必填可空
upay_res_info
->out_trade_no
支付商户订单号String(64)直连通道交易成功时候,必填可空
upay_res_info
->refund_amt
退款金额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
->refund_amount
退款金额String(64)直连通道交易成功时候,必填可空
ecny_res_info
->do_refund_amt
订单已退金额String(64)直连通道交易成功时候,必填可空
ecny_res_info
->charge_amount
退款手续费String(9)单位为分,交易成功时必填可空
ecny_res_info
->gmt_refund_pay
退款订单的交易时间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
->refund_amount
退款金额String(9)单位为分可空
balpay_res_info
->charge_amount
退款手续费String(9)单位为分,交易成功时必填可空
balpay_res_info
->gmt_refund_pay
退款完成时间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
->refund_amount
退款金额String(9)单位为分可空
jfqpay_res_info
->charge_amount
退款手续费String(9)单位为分,交易成功时必填可空
jfqpay_res_info
->gmt_refund_pay
退款完成时间String(14)格式:yyyyMMddHHmmss可空

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