业务说明
支持的交易类型:
4.2条码支付、4.3扫码支付、4.13jsapi支付、4.14微信小程序支付、4.21聚合动态码支付、4.22小程序支付收银台下单
交易请求报文
JSON:
{
"request_type": "barcode_refundquery_request",
"isspid": "39493002",
"pos_id": "8888888888",
"store_id": "8888888888",
"pos_seq": "2018121400000008",
"user_id": "user01",
"system_id": "8888",
"barcode_refundquery_request": {
"pay_type": "502",
"org_pos_seq": "2018121400000006"
},
"sign": "A95561E9CBB30BD049000FD9C530B1AF"
}
XML:
<?xml version="1.0" encoding="GBK"?>
<business_trans>
<request_type>barcode_refundquery_request</request_type>
<isspid>39493002</isspid>
<pos_id>1511300001</pos_id>
<store_id>1511300001</store_id>
<pos_seq>1511300000003</pos_seq>
<user_id>user01</user_id>
<system_id>8888</system_id>
<barcode_refundquery_request>
<pay_type>502</pay_type>
<org_pos_seq>1511300000001</org_pos_seq>
</barcode_refundquery_request>
</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:
{
"response_type": "barcode_refundquery_response",
"isspid": "39493002",
"pos_id": "8888888888",
"pos_seq": "2018121400000008",
"trans_time": "20181214151418",
"sys_seq": "a4507a682d26403a",
"pay_type": "502",
"extend": "<![CDATA[]]>",
"buss_discount_amt": 0,
"platform_discount_amt": 0,
"memo": "订单备注",
"alipay_res_info": {
"trade_no": "2018121422001429700548119225",
"out_trade_no": "2018121400000001",
"detail_error_code": "",
"detail_error_desc": "",
"send_back_fee": "",
"charge_amount": "0",
"gmt_refund_pay": ""
},
"wxpay_res_info": {
"trade_no": "4200000196201812146252898537",
"out_trade_no": "2018121400000002",
"app_id": "wx5acb63e448b4fc22",
"mch_id": "1241109502",
"detail_error_code": "",
"detail_error_desc": "",
"send_back_fee": "1",
"settlement_total_fee": "",
"settlement_refund_fee": "",
"charge_amount": "0",
"gmt_refund_pay": "20181214150715"
},
"wxapp_res_info": {
"trade_no": "4200000196201812146252898537",
"out_trade_no": "2018121400000002",
"app_id": "wx5acb63e448b4fc22",
"mch_id": "1241109502",
"detail_error_code": "",
"detail_error_desc": "",
"send_back_fee": "1",
"settlement_total_fee": "",
"settlement_refund_fee": "",
"charge_amount": "0",
"gmt_refund_pay": "20181214150715"
},
"upay_res_info": {
"trade_no": "4200000196201812146252898537",
"out_trade_no": "2018121400000002",
"refund_amt": "1",
"charge_amount": "0"
},
"ecny_res_info": {
"trade_no": "4200000196201812146252898537",
"out_trade_no": "2018121400000002",
"refund_amount": "1",
"do_refund_amount": "1",
"charge_amount": "0",
"gmt_refund_pay": "20210205113225",
"order_status": "03",
"detail_error_code": "",
"detail_error_desc": ""
},
"balpay_res_info": {
"trade_no": "4200000196201812146252898537",
"out_trade_no": "2018121400000002",
"refund_amount": "1",
"charge_amount": "0",
"gmt_refund_pay": "20210205111441",
"member_id": "1452",
},
"jfqpay_res_info": {
"trade_no": "4200000196201812146252898537",
"out_trade_no": "2018121400000002",
"refund_amount": "1",
"charge_amount": "0",
"gmt_refund_pay": "20210205111441",
},
"result": {
"id": "0000",
"comment": "交易成功"
},
"sign": "B94B9113A279C761A831C5B592E0BF09"
}
XML:
<?xml version="1.0" encoding="GBK"?>
<business_trans>
<response_type>barcode_refundquery_response</response_type>
<isspid>39493002</isspid>
<pos_id>123456789</pos_id>
<pos_seq>000000000001</pos_seq>
<sys_seq>000000000244</sys_seq>
<trans_time>20090405010104</trans_time>
<pay_type>502</pay_type>
<extend><![CDATA[扩展字段(json格式)]]></extend>
<buss_discount_amt>2</buss_discount_amt>
<platform_discount_amt>2</platform_discount_amt>
<memo>订单备注</memo>
<alipay_res_info>
<trade_no></trade_no>
<out_trade_no></out_trade_no>
<detail_error_code></detail_error_code>
<detail_error_desc></detail_error_desc>
<send_back_fee>1</send_back_fee>
<charge_amount>0</charge_amount>
<gmt_refund_pay>20181115092624</gmt_refund_pay>
</alipay_res_info>
<wxpay_res_info>
<trade_no>4001172001201611169902101944</trade_no>
<out_trade_no>0001034843100000087203</out_trade_no>
<app_id>wx5acb63e448b4fc22</app_id>
<mch_id>1241109502</mch_id>
<detail_error_code>SUCCESS</detail_error_code>
<detail_error_desc>OK</detail_error_desc>
<send_back_fee>1</send_back_fee>
<settlement_total_fee>1</settlement_total_fee>
<settlement_refund_fee>1</settlement_refund_fee>
<charge_amount>0</charge_amount>
<gmt_refund_pay>20181115092624</gmt_refund_pay>
</wxpay_res_info>
<wxapp_res_info>
<trade_no>4001172001201611169902101944</trade_no>
<out_trade_no>0001034843100000087203</out_trade_no>
<app_id>wx5acb63e448b4fc22</app_id>
<mch_id>1241109502</mch_id>
<detail_error_code>SUCCESS</detail_error_code>
<detail_error_desc>OK</detail_error_desc>
<send_back_fee>1</send_back_fee>
<settlement_total_fee>1</settlement_total_fee>
<settlement_refund_fee>1</settlement_refund_fee>
<charge_amount>0</charge_amount>
<gmt_refund_pay>20181115092624</gmt_refund_pay>
</wxapp_res_info>
<upay_res_info>
<trade_no>4001172001201611169902101944</trade_no>
<out_trade_no>0001034843100000087203</out_trade_no>
<refund_amt>1</refund_amt>
<charge_amount>0</charge_amount>
</upay_res_info>
<ecny_res_info>
<trade_no>4001172001201611169902101944</trade_no>
<out_trade_no>0001034843100000087203</out_trade_no>
<refund_amount>1</refund_amount>
<do_refund_amount>1</do_refund_amount>
<charge_amount>0</charge_amount>
<gmt_refund_pay>20210205113225</gmt_refund_pay>
<order_status>03</order_status>
<detail_error_code></detail_error_code>
<detail_error_desc></detail_error_desc>
</ecny_res_info>
<balpay_res_info>
<trade_no>15415906</trade_no>
<out_trade_no>1000000000511</out_trade_no>
<refund_amount>1</refund_amount>
<charge_amount>0</charge_amount>
<gmt_refund_pay>20210205111441</gmt_refund_pay>
<member_id>1452</member_id>
</balpay_res_info>
<jfqpay_res_info>
<trade_no>15415906</trade_no>
<out_trade_no>1000000000511</out_trade_no>
<refund_amount>1</refund_amount>
<charge_amount>0</charge_amount>
<gmt_refund_pay>20210205111441</gmt_refund_pay>
</jfqpay_res_info>
<result>
<id>0000</id>
<comment>成功</comment>
</result>
</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 | 服务商公众号ID | String(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 | 服务商公众号ID | String(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 | 会员id | String(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 | 可空 |
标准接口会因业务升级需要而新增节点,请在解析返回报文时避免新增未知节点产生的程序出错!