支付宝刷卡支付接口
接口说明
- 收银员使用扫码设备读取用户手机支付宝“付款码,读取用户手机支付宝的信息后,将条码信息通过本接口上送至支付宝发起支付
请求方式
方法名
- fshows.liquidation.submerchant.alipay.trade.pay
请求参数
| 参数 |
类型 |
是否必填 |
最大长度 |
描述 |
| out_trade_no |
String |
是 |
64 |
渠道方订单号,64 个字符以内、可 包 含字母、数字、下划线;需保证 在 接入的渠道方系统中不重复 |
| notify_url |
String |
可选 |
- |
支付成功后回调地址,如果不填会用morp默认地址 |
| scene |
String |
可选 |
32 |
支付场景 条码支付,取值:bar_code 声波支付,取值:wave_code bar_code,wave_code |
| auth_code |
String |
是 |
32 |
支付授权码 28763443825664394 |
| total_amount |
Price |
可选 |
11 |
订单总金额,单位为元,精确到小数点后两位,取值范围[0.01,100000000]。 如果同时传入【可打折金额】和【不可打折金额】,该参数可以不用传入; 如果同时传入了【可打折金额】,【不可打折金额】,【订单总金额】三者,则必须 |
| discountable_amount |
Price |
可选 |
11 |
参与优惠计算的金额,单位为元,精确到小数点后两位,取值范围[0.01,100000000]。 如果该值未传入,但传入了【订单总金额】和【不可打折金额】,则该值默认为【订单总金额】-【不可打折金额】 8.88 |
| undiscountable_amount |
Price |
可选 |
11 |
不参与优惠计算的金额,单位为元,精确到小数点后两位,取值范围[0.01,100000000]。如果该值未传入,但传入了【订单总金额】和【可打折金额】,则该值默认为【订单总金额】-【可打折金额】 80.00 |
| subject |
String |
是 |
256 |
订单标题 Iphone6 16G |
| body |
String |
可选 |
128 |
订单描述 Iphone6 16G |
| store_id |
String |
是 |
20 |
移动支付平台为商户分配的惟一 ID,商户入驻后,由平台返回 |
请求示例
{
"method":"fshows.liquidation.submerchant.alipay.trade.pay",
"app_id":"2016072300007148",
"sign":"hq1j1tBCQkJCecJbU1I+9VyRDPyjzBjT6ok7S6QWT72ebJ7nNmTJFy5GLh0Zw9lyciT/1Qd7dDeFRVwqxHW10xzv8qBqjGNq4S1TH1sEukMBk7emkD78javGS0m+6KIEtK1K5gePgqy3HRpxqrD58jqZIOu5FIxY5m5a93CJC/o=",
"version":"1.0"
"content":{
"out_trade_no":"CQL201709060943390148266",
"auth_code":"282201997776220157",
"subject":"mx3",
"store_id":"20170720205421027980"
}
}
返回值
| 参数 |
类型 |
最大长 度 |
描述 |
| trade_no |
String |
64 |
移动支付平台的订单号,在支付平台中惟一 |
| platform_order_no |
String |
64 |
平台方订单号 |
| out_trade_no |
String |
64 |
商户订单号 |
| buyer_logon_id |
String |
100 |
买家支付宝账号 |
| total_amount |
String |
11 |
交易金额 |
| receipt_amount |
String |
11 |
实收金额 |
| buyer_pay_amount |
String |
11 |
买家付款的金额 |
| point_amount |
String |
11 |
使用积分宝付款的金额 |
| invoice_amount |
String |
11 |
交易中可给用户开具发票的金额 |
| gmt_payment |
String |
32 |
交易支付时间 |
| fund_bill_list |
TradeFundBill [] |
- |
交易支付使用的资金渠道 |
| └ amount |
String |
|
|
| └ fundChannel |
String |
32 |
交易使用的资金渠道,详见 支付渠道列表 ALIPAYACCOUNT |
| └ realAmount |
String |
11 |
渠道实际付款金额 |
| card_balance |
String |
11 |
支付宝卡余额 |
| store_name |
String |
512 |
发生支付交易的商户门店名称 |
| buyer_user_id |
String |
28 |
买家在支付宝的用户id |
| disdiscount_goods_detail |
String |
|
本次交易支付所使用的单品券优惠的商品优惠信息 [{"goods_id":"STANDARD1026181538","goods_name":"雪碧","discount_amount":"100.00","voucher_id":"2015102600073002039000002D5O"}] |
| gateway_commission_rate |
String |
8 |
网关手续费率 |
| gateway_commission_fee |
String |
16 |
网关手续费 |
| liquidator_commission_rate |
String |
8 |
渠道方手续费率 |
| liquidator_commission_fee |
String |
16 |
渠道方手续费 |
| bank_commission_rate |
String |
8 |
银行手续费率 |
| bank_commission_fee |
String |
16 |
银行手续费 |
| pay_platform_rate |
String |
81 |
平台方手续费率 |
| pay_platform_fee |
String |
6 |
平台方手续费 |
| net_income |
String |
|
商户净收入 |
返回值示例
成功返回示例:
{
'return_value': {
'trade_no': '2018110110505902904673796684',
'platform_order_no': '2018110122001424250500466173',
'out_trade_no': 'f50c3c7edd8011e89e2b28d24472053b',
'buyer_logon_id': 'wan***@sandbox.com',
'total_amount': '5.00',
'receipt_amount': '5.00',
'buyer_pay_amount': '5.00',
'point_amount': '0.00',
'invoice_amount': '5.00',
'gmt_payment': 1541040664000,
'fund_bill_list': [
{
'amount': '5.00',
'fundChannel': 'ALIPAYACCOUNT',
'fundType': None,
'realAmount': None
}
],
'card_balance': None,
'store_name': None,
'buyer_user_id': '2088102176424254',
'disdiscount_goods_detail': None,
'bank_commission_fee': 0.01,
'bank_commission_rate': 0.0015,
'liquidator_commission_fee': 0.02,
'liquidator_commission_rate': 0.005,
'pay_platform_fee': 0.03,
'pay_platform_rate': 0.005,
'gateway_commission_rate': 0.0,
'gateway_commission_fee': 0.0,
'net_income': '4.94'
},
'success': True
}
失败返回示例:
{
"error_code": "-101",
"error_message": "无效参数",
"success": false
}