支付宝 alipay.trade.pay(统一收单交易支付接口)
2018-10-26 17:55 更新
收银员使用扫码设备读取用户手机支付宝“付款码”/声波获取设备(如麦克风)读取用户手机支付宝的声波信息后,将二维码或条码信息/声波信息通过本接口上送至支付宝发起支付。
公共参数
请求地址
环境 | HTTPS请求地址 |
---|---|
正式环境 | https://openapi.alipay.com/gateway.do |
公共请求参数
参数 | 类型 | 是否必填 | 最大长度 | 描述 | 示例值 |
---|---|---|---|---|---|
app_id | String | 是 | 32 | 支付宝分配给开发者的应用ID | 2014072300007148 |
method | String | 是 | 128 | 接口名称 | alipay.trade.pay |
format | String | 否 | 40 | 仅支持JSON JSON | |
charset | String | 是 | 10 | 请求使用的编码格式,如utf-8,gbk,gb2312等 | utf-8 |
sign_type | String | 是 | 10 | 商户生成签名字符串所使用的签名算法类型,目前支持RSA2和RSA,推荐使用RSA2 | RSA2 |
sign | String | 是 | 256 | 商户请求参数的签名串,详见签名 | 详见示例 |
timestamp | String | 是 | 19 | 发送请求的时间,格式"yyyy-MM-dd HH:mm:ss" | 2014-07-24 03:07:50 |
version | String | 是 | 3 | 调用的接口版本,固定为:1.0 | 1.0 |
notify_url | String | 否 | 256 | 支付宝服务器主动通知商户服务器里指定的页面http/https路径。 | http://api.test.alipay.net/atinterface/receive_notify.htm |
app_auth_token | String | 否 | 40 | 详见应用授权概述 | |
biz_content | String | 是 | - | 请求参数的集合,最大长度不限,除公共参数外所有请求参数都必须放在这个参数中传递,具体参照各产品快速接入文档 | - |
请求参数
参数 | 类型 | 是否必填 | 最大长度 | 描述 | 示例值 |
---|---|---|---|---|---|
out_trade_no | String | 必选 | 64 | 商户订单号,64个字符以内、可包含字母、数字、下划线;需保证在商户端不重复 | 20150320010101001 |
scene | String | 必选 | 32 | 支付场景 条码支付,取值:bar_code 声波支付,取值:wave_code | bar_code |
auth_code | String | 必选 | 32 | 支付授权码,25~30开头的长度为16~24位的数字,实际字符串长度以开发者获取的付款码长度为准 | 28763443825664394 |
product_code | String | 可选 | 32 | 销售产品码 | FACE_TO_FACE_PAYMENT |
subject | String | 必选 | 256 | 订单标题 | Iphone6 16G |
buyer_id | String | 可选 | 28 | 买家的支付宝用户id,如果为空,会从传入了码值信息中获取买家ID | 2088202954065786 |
seller_id | String | 可选 | 28 | 如果该值为空,则默认为商户签约账号对应的支付宝用户ID | 2088102146225135 |
total_amount | Price | 可选 | 11 | 订单总金额,单位为元,精确到小数点后两位,取值范围[0.01,100000000] 如果同时传入【可打折金额】和【不可打折金额】,该参数可以不用传入; 如果同时传入了【可打折金额】,【不可打折金额】,【订单总金额】三者,则必须满足如下条件:【订单总金额】=【可打折金额】+【不可打折金额】 | 88.88 |
discountable_amount | Price | 可选 | 11 | 参与优惠计算的金额,单位为元,精确到小数点后两位,取值范围[0.01,100000000]。 如果该值未传入,但传入了【订单总金额】和【不可打折金额】,则该值默认为【订单总金额】-【不可打折金额】 | 8.88 |
body | String | 可选 | 128 | 订单描述 | Iphone6 16G |
goods_detail | GoodsDetail[] | 可选 | - | 订单包含的商品列表信息,Json格式,其它说明详见商品明细说明 | - |
└ goods_id | String | 必填 | 32 | 商品的编号 | apple-01 |
└ goods_name | String | 必填 | 256 | 商品名称 | ipad |
└ quantity | Number | 必填 | 10 | 商品数量 | 1 |
└ price | Price | 必填 | 9 | 商品单价,单位为元 | 2000 |
└ goods_category | String | 可选 | 24 | 商品类目 | 34543238 |
└ body | String | 可选 | 1000 | 商品描述信息 | 特价手机 |
└ show_url | String | 可选 | 400 | 商品的展示地址 | http://www.alipay.com/xxx.jpg |
operator_id | String | 可选 | 28 | 商户操作员编号 | yx_001 |
store_id | String | 可选 | 32 | 商户门店编号 | NJ_001 |
terminal_id | String | 可选 | 32 | 商户机具终端编号 | NJ_T_001 |
extend_params | ExtendParams | 可选 | - | 业务扩展参数 | - |
└ sys_service_provider_id | String | 可选 | 64 | 系统商编号 该参数作为系统商返佣数据提取的依据,请填写系统商签约协议的PID | 2088511833207846 |
timeout_express | String | 可选 | 6 | 该笔订单允许的最晚付款时间,逾期将关闭交易。取值范围:1m~15d。m-分钟,h-小时,d-天,1c-当天(1c-当天的情况下,无论交易何时创建,都在0点关闭)。 该参数数值不接受小数点, 如 1.5h,可转换为 90m | 90m |
公共响应参数
参数 | 类型 | 是否必填 | 最大长度 | 描述 | 示例值 |
---|---|---|---|---|---|
code | String | 是 | - | 网关返回码,详见文档 | 40004 |
msg | String | 是 | - | 网关返回码描述,详见文档 | Business Failed |
sub_code | String | 否 | - | 业务返回码,参见具体的API接口文档 | ACQ.TRADE_HAS_SUCCESS |
sub_msg | String | 否 | - | 业务返回码描述,参见具体的API接口文档 | 交易已被支付 |
sign | String | 是 | - | 签名,详见文档 | DZXh8eeTuAHoYE3w1J+POiPhfDxOYBfUNn1lkeT/V7P4zJdyojWEa6IZs6Hz0yDW5Cp/viufUb5I0/V5WENS3OYR8zRedqo6D+fUTdLHdc+EFyCkiQhBxIzgngPdPdfp1PIS7BdhhzrsZHbRqb7o4k3Dxc+AAnFauu4V6Zdwczo= |
响应参数
参数 | 类型 | 是否必填 | 最大长度 | 描述 | 示例值 |
---|---|---|---|---|---|
trade_no | String | 必填 | 64 | 支付宝交易号 | 2013112011001004330000121536 |
out_trade_no | String | 必填 | 64 | 商户订单号 | 6823789339978248 |
buyer_logon_id | String | 必填 | 100 | 买家支付宝账号 | 159****5620 |
total_amount | Price | 必填 | 11 | 交易金额 | 120.88 |
receipt_amount | String | 必填 | 11 | 实收金额 | 88.88 |
buyer_pay_amount | Price | 选填 | 11 | 买家付款的金额 | 8.88 |
point_amount | Price | 选填 | 11 | 使用积分宝付款的金额 | 8.12 |
invoice_amount | Price | 选填 | 11 | 交易中可给用户开具发票的金额 | 12.50 |
gmt_payment | Date | 必填 | 32 | 交易支付时间 | 2014-11-27 15:45:57 |
fund_bill_list | TradeFundBill | 必填 | - | 交易支付使用的资金渠道 | |
└ fund_channel | String | 必填 | 32 | 交易使用的资金渠道,详见 支付渠道列表 | ALIPAYACCOUNT |
└ amount | Price | 必填 | 32 | 该支付工具类型所使用的金额 | 10 |
└ real_amount | Price | 可选 | 11 | 渠道实际付款金额 | 11.21 |
card_balance | Price | 选填 | 11 | 支付宝卡余额 | 98.23 |
store_name | String | 选填 | 512 | 发生支付交易的商户门店名称 | 证大五道口店 |
buyer_user_id | String | 必填 | 28 | 买家在支付宝的用户id 2088101117955611 | |
discount_goods_detail | String | 必填 | - | 本次交易支付所使用的单品券优惠的商品优惠信息 | [{"goods_id":"STANDARD1026181538","goods_name":"雪碧","discount_amount":"100.00","voucher_id":"2015102600073002039000002D5O"}] |
voucher_detail_list | VoucherDetail | 选填 | - | 本交易支付时使用的所有优惠券信息 | - |
└ id | String | 必填 | 32 | 券id | 2015102600073002039000002D5O |
└ name | String | 必填 | 64 | 券名称 | XX超市5折优惠 |
└ type | String | 必填 | 32 | 当前有三种类型: ALIPAY_FIX_VOUCHER - 全场代金券 ALIPAY_DISCOUNT_VOUCHER - 折扣券 ALIPAY_ITEM_VOUCHER - 单品优惠 注:不排除将来新增其他类型的可能,商家接入时注意兼容性避免硬编码 | ALIPAY_FIX_VOUCHER |
└ amount | Price | 必填 | 8 | 优惠券面额,它应该会等于商家出资加上其他出资方出资 | 10.00 |
└ merchant_contribute | Price | 可选 | 8 | 商家出资(特指发起交易的商家出资金额) | 9.00 |
└ other_contribute | Price | 可选 | 8 | 其他出资方出资金额,可能是支付宝,可能是品牌商,或者其他方,也可能是他们的一起出资 | 1.00 |
└ memo | String | 可选 | 256 | 优惠券备注信息 | 学生专用优惠 |
└ purchase_buyer_contribute | Price | 可选 | 8 | 如果使用的这张券是用户购买的,则该字段代表用户在购买这张券时用户实际付款的金额 | 2.01 |
└ purchase_merchant_contribute | Price | 可选 | 8 | 如果使用的这张券是用户购买的,则该字段代表用户在购买这张券时商户优惠的金额 | 1.03 |
└ purchase_ant_contribute | Price | 可选 | 8 | 如果使用的这张券是用户购买的,则该字段代表用户在购买这张券时平台优惠的金额 | 0.82 |
business_params | String | 选填 | 512 | 商户传入业务信息,具体值要和支付宝约定 将商户传入信息分发给相应系统,应用于安全,营销等参数直传场景 格式为json格式 | {"data":"123"} |
请求示例
JAVA
AlipayClient alipayClient = new DefaultAlipayClient("https://openapi.alipay.com/gateway.do","app_id","your private_key","json","GBK","alipay_public_key","RSA2");
AlipayTradePayRequest request = new AlipayTradePayRequest();
request.setBizContent("{" +
"\"out_trade_no\":\"20150320010101001\"," +
"\"scene\":\"bar_code\"," +
"\"auth_code\":\"28763443825664394\"," +
"\"product_code\":\"FACE_TO_FACE_PAYMENT\"," +
"\"subject\":\"Iphone616G\"," +
"\"buyer_id\":\"2088202954065786\"," +
"\"seller_id\":\"2088102146225135\"," +
"\"total_amount\":88.88," +
"\"discountable_amount\":8.88," +
"\"body\":\"Iphone616G\"," +
"\"goods_detail\":[{" +
"\"goods_id\":\"apple-01\"," +
"\"goods_name\":\"ipad\"," +
"\"quantity\":1," +
"\"price\":2000," +
"\"goods_category\":\"34543238\"," +
"\"body\":\"特价手机\"," +
"\"show_url\":\"http://www.alipay.com/xxx.jpg\"" +
"}]," +
"\"operator_id\":\"yx_001\"," +
"\"store_id\":\"NJ_001\"," +
"\"terminal_id\":\"NJ_T_001\"," +
"\"extend_params\":{" +
"\"sys_service_provider_id\":\"2088511833207846\"" +
"}," +
"\"timeout_express\":\"90m\"" +
"}");
AlipayTradePayResponse response = alipayClient.execute(request);
if(response.isSuccess()){
System.out.println("调用成功");
} else {
System.out.println("调用失败");
}
.NET
IAopClient client = new DefaultAopClient("https://openapi.alipay.com/gateway.do", "app_id", "merchant_private_key", "json", "1.0", "RSA2", "alipay_public_key", "GBK", false);
AlipayTradePayRequest request= new AlipayTradePayRequest() ;
request.BizContent="{" +
"\"out_trade_no\":\"20150320010101001\"," +
"\"scene\":\"bar_code\"," +
"\"auth_code\":\"28763443825664394\"," +
"\"product_code\":\"FACE_TO_FACE_PAYMENT\"," +
"\"subject\":\"Iphone616G\"," +
"\"buyer_id\":\"2088202954065786\"," +
"\"seller_id\":\"2088102146225135\"," +
"\"total_amount\":88.88," +
"\"discountable_amount\":8.88," +
"\"body\":\"Iphone616G\"," +
"\"goods_detail\":[{" +
"\"goods_id\":\"apple-01\"," +
"\"goods_name\":\"ipad\"," +
"\"quantity\":1," +
"\"price\":2000," +
"\"goods_category\":\"34543238\"," +
"\"body\":\"特价手机\"," +
"\"show_url\":\"http://www.alipay.com/xxx.jpg\"" +
"}]," +
"\"operator_id\":\"yx_001\"," +
"\"store_id\":\"NJ_001\"," +
"\"terminal_id\":\"NJ_T_001\"," +
"\"extend_params\":{" +
"\"sys_service_provider_id\":\"2088511833207846\"" +
"}," +
"\"timeout_express\":\"90m\"" +
"}";
AlipayTradePayResponse response=client.execute(request);
Console.WriteLine(response.Body);
PHP
$aop = new AopClient ();
$aop->gatewayUrl = 'https://openapi.alipay.com/gateway.do';
$aop->appId = 'your app_id';
$aop->rsaPrivateKey = '请填写开发者私钥去头去尾去回车,一行字符串';
$aop->alipayrsaPublicKey='请填写支付宝公钥,一行字符串';
$aop->apiVersion = '1.0';
$aop->signType = 'RSA2';
$aop->postCharset='GBK';
$aop->format='json';
$request = new AlipayTradePayRequest ();
$request->setBizContent("{" .
"\"out_trade_no\":\"20150320010101001\"," .
"\"scene\":\"bar_code\"," .
"\"auth_code\":\"28763443825664394\"," .
"\"product_code\":\"FACE_TO_FACE_PAYMENT\"," .
"\"subject\":\"Iphone616G\"," .
"\"buyer_id\":\"2088202954065786\"," .
"\"seller_id\":\"2088102146225135\"," .
"\"total_amount\":88.88," .
"\"discountable_amount\":8.88," .
"\"body\":\"Iphone616G\"," .
"\"goods_detail\":[{" .
"\"goods_id\":\"apple-01\"," .
"\"goods_name\":\"ipad\"," .
"\"quantity\":1," .
"\"price\":2000," .
"\"goods_category\":\"34543238\"," .
"\"body\":\"特价手机\"," .
"\"show_url\":\"http://www.alipay.com/xxx.jpg\"" .
"}]," .
"\"operator_id\":\"yx_001\"," .
"\"store_id\":\"NJ_001\"," .
"\"terminal_id\":\"NJ_T_001\"," .
"\"extend_params\":{" .
"\"sys_service_provider_id\":\"2088511833207846\"" .
"}," .
"\"timeout_express\":\"90m\"" .
"}");
$result = $aop->execute ( $request);
$responseNode = str_replace(".", "_", $request->getApiMethodName()) . "_response";
$resultCode = $result->$responseNode->code;
if(!empty($resultCode)&&$resultCode == 10000){
echo "成功";
} else {
echo "失败";
}
HTTP请求源码
https://openapi.alipay.com/gateway.do?timestamp=2013-01-01 08:08:08&method=alipay.trade.pay&app_id=4407&sign_type=RSA2&sign=ERITJKEIJKJHKKKKKKKHJEREEEEEEEEEEE&version=1.0&biz_content=
{
"out_trade_no":"20150320010101001",
"scene":"bar_code",
"auth_code":"28763443825664394",
"product_code":"FACE_TO_FACE_PAYMENT",
"subject":"Iphone6 16G",
"buyer_id":"2088202954065786",
"seller_id":"2088102146225135",
"total_amount":88.88,
"discountable_amount":8.88,
"body":"Iphone6 16G",
"goods_detail":[{
"goods_id":"apple-01",
"goods_name":"ipad",
"quantity":1,
"price":2000,
"goods_category":"34543238",
"body":"特价手机",
"show_url":"http://www.alipay.com/xxx.jpg"
}],
"operator_id":"yx_001",
"store_id":"NJ_001",
"terminal_id":"NJ_T_001",
"extend_params":{
"sys_service_provider_id":"2088511833207846"
},
"timeout_express":"90m"
}
//为确保安全通信,需自行验证响应示例中的sign值是否为蚂蚁金服所提供。
响应示例
JSON 示例
{
"alipay_trade_pay_response": {
"code": "10000",
"msg": "Success",
"trade_no": "2013112011001004330000121536",
"out_trade_no": "6823789339978248",
"buyer_logon_id": "159****5620",
"total_amount": 120.88,
"receipt_amount": "88.88",
"buyer_pay_amount": 8.88,
"point_amount": 8.12,
"invoice_amount": 12.5,
"gmt_payment": "2014-11-27 15:45:57",
"fund_bill_list": [
{
"fund_channel": "ALIPAYACCOUNT",
"amount": 10,
"real_amount": 11.21
}
],
"card_balance": 98.23,
"store_name": "证大五道口店",
"buyer_user_id": "2088101117955611",
"discount_goods_detail": "[{\"goods_id\":\"STANDARD1026181538\",\"goods_name\":\"雪碧\",\"discount_amount\":\"100.00\",\"voucher_id\":\"2015102600073002039000002D5O\"}]",
"voucher_detail_list": [
{
"id": "2015102600073002039000002D5O",
"name": "XX超市5折优惠",
"type": "ALIPAY_FIX_VOUCHER",
"amount": 10,
"merchant_contribute": 9,
"other_contribute": 1,
"memo": "学生专用优惠",
"purchase_buyer_contribute": 2.01,
"purchase_merchant_contribute": 1.03,
"purchase_ant_contribute": 0.82
}
],
"business_params": "{\"data\":\"123\"}"
},
"sign": "ERITJKEIJKJHKKKKKKKHJEREEEEEEEEEEE"
}
XML 示例
<alipay_trade_pay_response>
<code>10000</code>
<msg>Success</msg> <trade_no>2013112011001004330000121536</trade_no>
<out_trade_no>6823789339978248</out_trade_no>
<open_id>2088102122524333</open_id>
<buyer_logon_id>159****5620</buyer_logon_id>
<total_amount>120.88</total_amount>
<receipt_amount>88.88</receipt_amount>
<buyer_pay_amount>8.88</buyer_pay_amount>
<point_amount>8.12</point_amount>
<invoice_amount>12.50</invoice_amount>
<gmt_payment>2014-11-27 15:45:57</gmt_payment>
<fund_bill_list list="true">
<trade_fund_bill>
<fund_channel>ALIPAYACCOUNT</fund_channel>
<amount>10</amount>
<real_amount>11.21</real_amount>
<fund_type>DEBIT_CARD</fund_type>
</trade_fund_bill>
</fund_bill_list>
<card_balance>98.23</card_balance>
<store_name>证大五道口店</store_name>
<buyer_user_id>2088101117955611</buyer_user_id>
<discount_goods_detail>[{"goods_id":"STANDARD1026181538","goods_name":"雪碧","discount_amount":"100.00","voucher_id":"2015102600073002039000002D5O"}]</discount_goods_detail>
<async_payment_mode>SYNC_DIRECT_PAY</async_payment_mode>
<voucher_detail_list list="true">
<voucher_detail>
<id>2015102600073002039000002D5O</id>
<name>XX超市5折优惠</name>
<type>ALIPAY_FIX_VOUCHER</type>
<amount>10.00</amount>
<merchant_contribute>9.00</merchant_contribute>
<other_contribute>1.00</other_contribute>
<memo>学生专用优惠</memo>
<purchase_buyer_contribute>2.01</purchase_buyer_contribute>
<purchase_merchant_contribute>1.03</purchase_merchant_contribute>
<purchase_ant_contribute>0.82</purchase_ant_contribute>
</voucher_detail>
</voucher_detail_list>
<business_params>{"data":"123"}</business_params>
</alipay_trade_pay_response>
异常示例
JSON 示例
{
"alipay_trade_pay_response": {
"code": "20000",
"msg": "Service Currently Unavailable",
"sub_code": "isp.unknow-error",
"sub_msg": "系统繁忙"
},
"sign": "ERITJKEIJKJHKKKKKKKHJEREEEEEEEEEEE"
}
业务错误码
公共错误码
错误码 | 错误描述 | 解决方案 |
---|---|---|
ACQ.SYSTEM_ERROR | 接口返回错误 | 请立即调用查询订单API,查询当前订单的状态,并根据订单状态决定下一步的操作,如果多次调用依然报此错误码,请联系支付宝客服 |
ACQ.INVALID_PARAMETER | 参数无效 | 检查请求参数,修改后重新发起请求 |
ACQ.ACCESS_FORBIDDEN | 无权限使用接口 | 未签约条码支付或者合同已到期 |
ACQ.EXIST_FORBIDDEN_WORD | 订单信息中包含违禁词 | 修改订单信息后,重新发起请求 |
ACQ.PARTNER_ERROR | 应用APP_ID填写错误 | 联系支付宝小二(联系支付宝文档右边的客服头像或到支持中心咨询),确认APP_ID的状态 |
ACQ.TOTAL_FEE_EXCEED | 订单总金额超过限额 | 修改订单金额再发起请求 |
ACQ.PAYMENT_AUTH_CODE_INVALID | 支付授权码无效 | 用户刷新条码后,重新扫码发起请求 |
ACQ.CONTEXT_INCONSISTENT | 交易信息被篡改 | 更换商家订单号后,重新发起请求 |
ACQ.TRADE_HAS_SUCCESS | 交易已被支付 | 确认该笔交易信息是否为当前买家的,如果是则认为交易付款成功,如果不是则更换商家订单号后,重新发起请求 |
ACQ.TRADE_HAS_CLOSE | 交易已经关闭 | 更换商家订单号后,重新发起请求 |
ACQ.BUYER_BALANCE_NOT_ENOUGH | 买家余额不足 | 买家绑定新的银行卡或者支付宝余额有钱后再发起支付 |
ACQ.BUYER_BANKCARD_BALANCE_NOT_ENOUGH | 用户银行卡余额不足 | 建议买家更换支付宝进行支付或者更换其它付款方式 |
ACQ.ERROR_BALANCE_PAYMENT_DISABLE | 余额支付功能关闭 | 用户打开余额支付开关后,再重新进行支付 |
ACQ.BUYER_SELLER_EQUAL | 买卖家不能相同 | 更换买家重新付款 |
ACQ.TRADE_BUYER_NOT_MATCH | 交易买家不匹配 | 更换商家订单号后,重新发起请求 |
ACQ.BUYER_ENABLE_STATUS_FORBID | 买家状态非法 | 用户联系支付宝小二(联系支付宝文档右边的客服头像或到支持中心咨询),确认买家状态为什么非法 |
ACQ.PULL_MOBILE_CASHIER_FAIL | 唤起移动收银台失败 | 用户刷新条码后,重新扫码发起请求 |
ACQ.MOBILE_PAYMENT_SWITCH_OFF | 用户的无线支付开关关闭 | 用户在PC上打开无线支付开关后,再重新发起支付 |
ACQ.PAYMENT_FAIL | 支付失败 | 用户刷新条码后,重新发起请求,如果重试一次后仍未成功,更换其它方式付款 |
ACQ.BUYER_PAYMENT_AMOUNT_DAY_LIMIT_ERROR | 买家付款日限额超限 | 更换买家进行支付 |
ACQ.BEYOND_PAY_RESTRICTION | 商户收款额度超限 | 联系支付宝小二提高限额(联系电话:0571-88158090) |
ACQ.BEYOND_PER_RECEIPT_RESTRICTION | 商户收款金额超过月限额 | 联系支付宝小二提高限额(联系电话:0571-88158090) |
ACQ.BUYER_PAYMENT_AMOUNT_MONTH_LIMIT_ERROR | 买家付款月额度超限 | 让买家更换账号后,重新付款或者更换其它付款方式 |
ACQ.SELLER_BEEN_BLOCKED | 商家账号被冻结 | 联系支付宝小二,解冻账号(联系电话:95188) |
ACQ.ERROR_BUYER_CERTIFY_LEVEL_LIMIT | 买家未通过人行认证 | 让用户联系支付宝小二并更换其它付款方式(联系电话:95188) |
ACQ.PAYMENT_REQUEST_HAS_RISK | 支付有风险 | 更换其它付款方式 |
ACQ.NO_PAYMENT_INSTRUMENTS_AVAILABLE | 没用可用的支付工具 | 更换其它付款方式 |
ACQ.USER_FACE_PAYMENT_SWITCH_OFF | 用户当面付付款开关关闭 | 让用户在手机上打开当面付付款开关 |
ACQ.INVALID_STORE_ID | 商户门店编号无效 | 检查传入的门店编号是否有效 |
ACQ.SUB_MERCHANT_CREATE_FAIL | 二级商户创建失败 | 检查上送的二级商户信息是否有效 |
ACQ.SUB_MERCHANT_TYPE_INVALID | 二级商户类型非法 | 检查上传的二级商户类型是否有效 |
ACQ.AGREEMENT_NOT_EXIST | 用户协议不存在 | 确认代扣业务传入的协议号对应的协议是否已解约 |
ACQ.AGREEMENT_INVALID | 用户协议失效 | 代扣业务传入的协议号对应的用户协议已经失效,需要用户重新签约 |
ACQ.AGREEMENT_STATUS_NOT_NORMAL | 用户协议状态非NORMAL | 代扣业务用户协议状态非正常状态,需要用户解约后重新签约 |
ACQ.MERCHANT_AGREEMENT_NOT_EXIST | 商户协议不存在 | 确认商户与支付宝是否已签约 |
ACQ.MERCHANT_AGREEMENT_INVALID | 商户协议已失效 | 商户与支付宝合同已失效,需要重新签约 |
ACQ.MERCHANT_STATUS_NOT_NORMAL | 商户协议状态非正常状态 | 商户与支付宝的合同非正常状态,需要重新签商户合同 |
触发通知类型
通知类型 | 描述 | 默认开启 |
---|---|---|
tradeStatus.TRADE_CLOSED | 交易关闭 | 0 |
tradeStatus.TRADE_FINISHED | 交易完结 | 0 |
tradeStatus.TRADE_SUCCESS | 支付成功 | 1 |
tradeStatus.WAIT_BUYER_PAY | 交易创建 | 0 |
触发通知示例
https://www.merchant.com/receive_notify.htm?notify_type=trade_status_sync¬ify_id=91722adff935e8cfa58b3aabf4dead6ibe¬ify_time=2017-0
以上内容是否对您有帮助:
更多建议: