|
@@ -9,7 +9,7 @@
|
|
|
AllPay 为客户提供统一的api接入,以帮助客户实 现快速、安全、集中式的接入支付渠道。
|
|
|
#### 2.交易流程
|
|
|

|
|
|
-
|
|
|
+
|
|
|
#### 3.通用API说明
|
|
|
商户服务器和 AllPay 网关对接的通用接口,每个渠道都具有的功能,包括:消费,退款,查询接口。
|
|
|
|
|
@@ -24,14 +24,36 @@ AllPay 为客户提供统一的api接入,以帮助客户实 现快速、安全
|
|
|
##### 3.2. 通用API 接入地址
|
|
|
交易名称 |开发调试地址|生产交易地址
|
|
|
------- |-----------|-------
|
|
|
- 消费接口 |https://testapi.allpayx.com/pay |https://api.allpayx.com/pay
|
|
|
- 查询接口 |https://testapi.allpayx.com/pay |https://api.allpayx.com/pay
|
|
|
- 退款接口 |https://testapi.allpayx.com/pay |https://api.allpayx.com/pay
|
|
|
-
|
|
|
-##### 3.3. 消费交易接口
|
|
|
+ 消费接口 |https://testapi.allpayx.com/pay/v1 |https://api.allpayx.com/pay/v1
|
|
|
+ 查询接口 |https://testapi.allpayx.com/pay/v1 |https://api.allpayx.com/pay/v1
|
|
|
+ 退款接口 |https://testapi.allpayx.com/pay/v1 |https://api.allpayx.com/pay/v1
|
|
|
+
|
|
|
+**3.3.交易信息错误返回参数说明 **
|
|
|
+
|
|
|
+若商户请求AllPay网关时,请求的参数错误或参数缺失时,AllPay网关会将错误信息以JSON格式返回给客户端,供商户解析调用,以下是相关错误信息返回参数的说明
|
|
|
+
|
|
|
+| 参数应答码code | 对应应答信息msg |
|
|
|
+| -------------- | ------------------------------------------ |
|
|
|
+| U1 | Clientid not found |
|
|
|
+| U2 | Signature error |
|
|
|
+| V1 | Parameter missing |
|
|
|
+| E1 | Exceed the limit |
|
|
|
+| R1 | Orderno repeat |
|
|
|
+| C1 | Order currency is not set |
|
|
|
+| P1 | paychannel error |
|
|
|
+| I1 | Illegal request address |
|
|
|
+| T1 | Parameter missing(version或tranType) |
|
|
|
+| T2 | Txntype error |
|
|
|
+| T3 | transaction is not exist or fail |
|
|
|
+| T4 | The maximum amount exceeds the upper limit |
|
|
|
+| 99 | System error |
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+##### 3.4. 消费交易接口
|
|
|
|
|
|
1. 请求报文格式
|
|
|
-
|
|
|
+
|
|
|
下面列举的字段为通用字段,每个渠道都需要上送,部分渠道有渠道专属字段,具体字段请到该渠道的专属渠到字段说明处查看. 消费接口分为跳转型和参数返回型,默认为跳转型,参数返回型会在 第4章(渠道专属配置)里面说明
|
|
|
|
|
|
序号 |名称 |长度|类型|参数名称|备注
|
|
@@ -52,9 +74,9 @@ AllPay 为客户提供统一的api接入,以帮助客户实 现快速、安全
|
|
|
14|交易时间 |14 |文本|transTime |交易时间,格式:"yyyyMMddHHmmss"
|
|
|
15|签名类型 |3 |文本|signType |MD5
|
|
|
16|签名 |32 |文本|signature |采用 MD5 签名
|
|
|
-
|
|
|
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
2. 跳转型消费接口响应报文
|
|
|
|
|
|
商户需要提供一个 http/https 协议的接口,包含在参数里传递给 SDK,即 backURL。AllPay
|
|
@@ -86,17 +108,17 @@ AllPay 为客户提供统一的api接入,以帮助客户实 现快速、安全
|
|
|
19|签名类型 |3 |文本|signType |MD5
|
|
|
20|签名 |32 |文本|signature |采用 MD5 签名
|
|
|
|
|
|
-##### 3.4. 查询交易接口
|
|
|
+##### 3.5. 查询交易接口
|
|
|
+
|
|
|
|
|
|
|
|
|
-
|
|
|
1. 接口说明
|
|
|
-
|
|
|
+
|
|
|
该接口为接入商家提供交易查询的功能。
|
|
|
|
|
|
2. 请求报文格式
|
|
|
|
|
|
-
|
|
|
+
|
|
|
序号 |名称 |长度|类型|参数名称|备注
|
|
|
-----|-----|----|----|------|------
|
|
|
1|版本号|12|文本|version |统一填写为“VER000000002”
|
|
@@ -114,7 +136,7 @@ AllPay 为客户提供统一的api接入,以帮助客户实 现快速、安全
|
|
|
|
|
|
3. 响应报文格式
|
|
|
|
|
|
-
|
|
|
+
|
|
|
序号 |名称 |长度|类型|参数名称|备注
|
|
|
-----|-----|----|----|------|------
|
|
|
1|版本号|12|文本|version |统一填写为“VER000000002”
|
|
@@ -131,7 +153,7 @@ AllPay 为客户提供统一的api接入,以帮助客户实 现快速、安全
|
|
|
12|签名类型 |3 |文本|signType |MD5
|
|
|
13|签名 |32 |文本|signature |采用 MD5 签名
|
|
|
|
|
|
-##### 3.5. 退款交易接口
|
|
|
+##### 3.6. 退款交易接口
|
|
|
|
|
|
1.接口功能说明
|
|
|
|
|
@@ -154,10 +176,10 @@ AllPay 为客户提供统一的api接入,以帮助客户实 现快速、安全
|
|
|
11|交易时间 |14 |文本|transTime |交易时间,格式:"yyyyMMddHHmmss"
|
|
|
12|签名类型 |3 |文本|signType |MD5
|
|
|
13|签名 |32 |文本|signature |采用 MD5 签名
|
|
|
-
|
|
|
+
|
|
|
3.响应报文格式
|
|
|
|
|
|
-
|
|
|
+
|
|
|
序号 |名称 |长度|类型|参数名称|备注
|
|
|
-----|-----|----|----|------|------
|
|
|
1|版本号|12|文本|version |统一填写为“VER000000002”
|
|
@@ -173,9 +195,9 @@ AllPay 为客户提供统一的api接入,以帮助客户实 现快速、安全
|
|
|
11|GW 处理时间 |14 |文本|GWTime |YYYYMMDDHHMMSS,为 GW 时间,目前为本地交易时间
|
|
|
12|签名类型 |3 |文本|signType |MD5
|
|
|
13|签名 |32 |文本|signature |采用 MD5 签名
|
|
|
-
|
|
|
-#### 5.渠道专属配置
|
|
|
-##### 5.1 EB渠道(跳转)
|
|
|
+
|
|
|
+#### 4.渠道专属配置
|
|
|
+##### 4.1 EB渠道(跳转)
|
|
|
|
|
|
|
|
|
序号 |名称 |长度|类型|参数名称|备注
|
|
@@ -183,20 +205,20 @@ AllPay 为客户提供统一的api接入,以帮助客户实 现快速、安全
|
|
|
1| 姓名 |32 |文本|trxn_firstname |This is name of the customer who is doing the transaction.
|
|
|
2| 邮箱 |40 |文本|trxn_email_id |this is email id of the customer who is doing transaction.
|
|
|
3|电话 |20 |文本|trxn_phone|Phone number of the customer.
|
|
|
-
|
|
|
-##### 5.2 UP渠道(跳转)
|
|
|
+
|
|
|
+##### 4.2 UP渠道(跳转)
|
|
|
|
|
|
序号 |名称 |长度|类型|参数名称|备注
|
|
|
-----|-----|----|----|------|------
|
|
|
1| 银联卡号 |19 | 文本|uCardNumber |境外银联通道,适用于银联优计划。可以不上送,若需要提前填入银行卡号,则上送此字段。
|
|
|
-
|
|
|
-##### 5.3 WX渠道(含跳转和参数返回)
|
|
|
+
|
|
|
+##### 4.3 WX渠道(含跳转和参数返回)
|
|
|
|
|
|
序号 |名称 |长度|类型|参数名称|备注
|
|
|
-----|-----|----|----|------|------
|
|
|
1| 交易场景代码|16 | 文本|code |1.“NATIVE“:为参数返回方式,返回微信收款URL值, 要求商户将其转换为 QR 码,自己生成支付前端界 面,提示用户扫码付款; 2.“QUICK”:为跳转方式,打开 AllPay 提供的前端页面,页面包含微信 QR 码
|
|
|
-##### 5.4 PPRO相关渠道(跳转)
|
|
|
-###### 5.4.1 PPRO_AC
|
|
|
+##### 4.4 PPRO相关渠道(跳转)
|
|
|
+###### 4.4.1 PPRO_AC
|
|
|
|
|
|
|
|
|
Field name |M/O |Type |Description
|
|
@@ -207,7 +229,7 @@ consumerref |M |文本 |Unique reference identifying the consumer, has to sati
|
|
|
|
|
|
Note: AstroPay Card is available for currency USD and country codes BO, BR, CL, CN, CO, CR, MX, PE, UY, VE.
|
|
|
|
|
|
-###### 5.4.2 PPRO_AD
|
|
|
+###### 4.4.2 PPRO_AD
|
|
|
|
|
|
|
|
|
Field name |M/O |Type |Description
|
|
@@ -218,8 +240,8 @@ consumerref |M |文本 |Unique reference identifying the consumer, has to sati
|
|
|
|
|
|
Note: AstroPay Direct is available for currency USD and country codes AR, BR, CL, CN, CO, MX, PE, UY.
|
|
|
|
|
|
-
|
|
|
-###### 5.4.3 PPRO_AR
|
|
|
+
|
|
|
+###### 4.4.3 PPRO_AR
|
|
|
|
|
|
|
|
|
Field name |M/O |Type |Description
|
|
@@ -233,8 +255,8 @@ dob |O |文本 |Date of birth, format YYYYMMDD
|
|
|
|
|
|
Note: Aura (Brazil) is available for currency USD and country code BR.
|
|
|
|
|
|
-
|
|
|
-###### 5.4.4 PPRO_BA
|
|
|
+
|
|
|
+###### 4.4.4 PPRO_BA
|
|
|
|
|
|
|
|
|
Field name |M/O |Type |Description
|
|
@@ -248,8 +270,8 @@ dob |O |文本 |Date of birth, format YYYYMMDD
|
|
|
|
|
|
Note: Baloto Cash (Colombia) is available for currency USD and country code CO.
|
|
|
|
|
|
-
|
|
|
-###### 5.4.5 PPRO_BB
|
|
|
+
|
|
|
+###### 4.4.5 PPRO_BB
|
|
|
|
|
|
|
|
|
Field name |M/O |Type |Description
|
|
@@ -263,8 +285,8 @@ dob |O |文本 |Date of birth, format YYYYMMDD
|
|
|
|
|
|
Note: Banco do Brasil (Brazil) is available for currency USD and country code BR.
|
|
|
|
|
|
-
|
|
|
-###### 5.4.6 PPRO_BO
|
|
|
+
|
|
|
+###### 4.4.6 PPRO_BO
|
|
|
|
|
|
|
|
|
Field name |M/O |Type |Description
|
|
@@ -280,7 +302,7 @@ Note: Boleto Bancario is available for currency USD and country code BR.
|
|
|
|
|
|
|
|
|
|
|
|
-###### 5.4.7 PPRO_CC
|
|
|
+###### 4.4.7 PPRO_CC
|
|
|
|
|
|
|
|
|
Field name |M/O |Type |Description
|
|
@@ -294,7 +316,7 @@ dob |O |文本 |Date of birth, format YYYYMMDD
|
|
|
|
|
|
Note: Cartao MercadoLivre (Brazil) is available for currency USD and country code BR.
|
|
|
|
|
|
-###### 5.4.8 PPRO_DR
|
|
|
+###### 4.4.8 PPRO_DR
|
|
|
|
|
|
|
|
|
Field name |M/O |Type |Description
|
|
@@ -308,7 +330,7 @@ Note: Dragonpay is only available for currency PHP and country code PH.
|
|
|
|
|
|
|
|
|
|
|
|
-###### 5.4.9 PPRO_EN
|
|
|
+###### 4.4.9 PPRO_EN
|
|
|
|
|
|
|
|
|
Field name |M/O |Type |Description
|
|
@@ -320,7 +342,7 @@ phone |M |文本 |Valid international phone number of the account holder
|
|
|
|
|
|
Note: eNETS is only available for currency SGD and country code SG.
|
|
|
|
|
|
-###### 5.4.10 PPRO_EP
|
|
|
+###### 4.4.10 PPRO_EP
|
|
|
|
|
|
|
|
|
Field name |M/O |Type |Description
|
|
@@ -330,7 +352,7 @@ accountholdername|M |文本 |The account holder - minimum of 3 characters, up
|
|
|
|
|
|
Note: eps only works for the countrycode “AT” and currency “EUR”.
|
|
|
|
|
|
-###### 5.4.11 PPRO_GP
|
|
|
+###### 4.4.11 PPRO_GP
|
|
|
|
|
|
|
|
|
Field name |M/O |Type |Description
|
|
@@ -340,7 +362,7 @@ accountholdername|M |文本 |The account holder - minimum of 3 characters, up
|
|
|
bic |O |文本 |Valid BIC (8 or 11 alphanumeric letters) of consumer’s bank
|
|
|
|
|
|
|
|
|
-###### 5.4.12 PPRO_HC
|
|
|
+###### 4.4.12 PPRO_HC
|
|
|
|
|
|
|
|
|
Field name |M/O |Type |Description
|
|
@@ -354,7 +376,7 @@ dob |O |文本 |Date of birth, format YYYYMMDD
|
|
|
|
|
|
Note: Hipercard (Brazil) is available for currency USD and country code BR.
|
|
|
|
|
|
-###### 5.4.13 PPRO_ID
|
|
|
+###### 4.4.13 PPRO_ID
|
|
|
|
|
|
|
|
|
Field name |M/O |Type |Description
|
|
@@ -364,7 +386,7 @@ accountholdername|M |文本 |The account holder - minimum of 3 characters, up
|
|
|
|
|
|
Note: iDEAL only works for the countrycode “NL” and currency “EUR”.
|
|
|
|
|
|
-###### 5.4.14 PPRO_IT
|
|
|
+###### 4.4.14 PPRO_IT
|
|
|
|
|
|
|
|
|
Field name |M/O |Type |Description
|
|
@@ -378,7 +400,7 @@ dob |O |文本 |Date of birth, format YYYYMMDD
|
|
|
|
|
|
Note: Itaú (Brazil) is available for currency USD and country code BR.
|
|
|
|
|
|
-###### 5.4.15 PPRO_MB
|
|
|
+###### 4.4.15 PPRO_MB
|
|
|
|
|
|
|
|
|
|
|
@@ -390,7 +412,7 @@ accountholdername|M |文本 |The account holder - minimum of 3 characters, up
|
|
|
Note: MyBank only works for the country code IT and currency EUR.
|
|
|
|
|
|
|
|
|
-###### 5.4.16 PPRO_PC
|
|
|
+###### 4.4.16 PPRO_PC
|
|
|
|
|
|
|
|
|
|
|
@@ -402,7 +424,7 @@ consumerref |M |文本 |Unique reference identifying the consumer, has to sati
|
|
|
|
|
|
|
|
|
|
|
|
-###### 5.4.17 PPRO_PB
|
|
|
+###### 4.4.17 PPRO_PB
|
|
|
|
|
|
|
|
|
|
|
@@ -417,7 +439,7 @@ Note: PAYSBUY Cash is only available for currency THB and country code TH.
|
|
|
|
|
|
|
|
|
|
|
|
-###### 5.4.18 PPRO_PU
|
|
|
+###### 4.4.18 PPRO_PU
|
|
|
|
|
|
|
|
|
|
|
@@ -429,7 +451,7 @@ email |M |文本 |RFC compliant email address of the account holder
|
|
|
|
|
|
Note: PayU works only for country code/currency combinations CZ/CZK and PL/PLN.
|
|
|
|
|
|
-###### 5.4.19 PPRO_PL
|
|
|
+###### 4.4.19 PPRO_PL
|
|
|
|
|
|
|
|
|
Field name |M/O |Type |Description
|
|
@@ -439,7 +461,7 @@ accountholdername|M |文本 |The account holder - minimum of 3 characters, up
|
|
|
|
|
|
Note: POLi only works for the countrycode/currency combinations “NZ”/”NZD” and “AU/AUD”.
|
|
|
|
|
|
-###### 5.4.20 PPRO_P24
|
|
|
+###### 4.4.20 PPRO_P24
|
|
|
|
|
|
|
|
|
Field name |M/O |Type |Description
|
|
@@ -451,7 +473,7 @@ email |M |文本 |RFC compliant email address of the account holder
|
|
|
Note: Przelewy24 only works for the countrycode “PL” and currencies “PLN” and “EUR”.
|
|
|
|
|
|
|
|
|
-###### 5.4.21 PPRO_QW
|
|
|
+###### 4.4.21 PPRO_QW
|
|
|
|
|
|
|
|
|
Field name |M/O |Type |Description
|
|
@@ -462,7 +484,7 @@ mobilephone|M |文本 |Valid international Russian mobile phone number identif
|
|
|
|
|
|
|
|
|
Note: QIWI Payout only works for the countrycodes “RU”, “KZ” and UA, and - depending on your contract - currency
“RUB” , “EUR” ,”KZT” and “USD”.
|
|
|
-###### 5.4.22 PPRO_SP
|
|
|
+###### 4.4.22 PPRO_SP
|
|
|
|
|
|
|
|
|
Field name |M/O |Type |Description
|
|
@@ -472,7 +494,7 @@ accountholdername|M |文本 |The account holder - minimum of 3 characters, up
|
|
|
|
|
|
Note: SafetyPay only works for country codes “AT”, “BR”, “CO”, “CR”, “DE”, “ES”, “MX”, “NI”, “NL”, “PA”, “PE” and currencies “EUR”, “USD”.
|
|
|
|
|
|
-###### 5.4.23 PPRO_SD
|
|
|
+###### 4.4.23 PPRO_SD
|
|
|
|
|
|
|
|
|
Field name |M/O |Type |Description
|
|
@@ -484,7 +506,7 @@ accountholdername|M |文本 |The account holder - minimum of 3 characters, up
|
|
|
Note: SEPA Direct Debit works for all SEPA countries and currency EUR.
|
|
|
|
|
|
|
|
|
-###### 5.4.24 PPRO_SG
|
|
|
+###### 4.4.24 PPRO_SG
|
|
|
|
|
|
|
|
|
Field name |M/O |Type |Description
|
|
@@ -496,7 +518,7 @@ phone |M |文本 |Valid international phone number of the account holder
|
|
|
|
|
|
Note: SingPost (Singapore) is only available for currency SGD and country code SG.
|
|
|
|
|
|
-###### 5.4.25 PPRO_SK
|
|
|
+###### 4.4.25 PPRO_SK
|
|
|
|
|
|
|
|
|
Field name |M/O |Type |Description
|
|
@@ -508,7 +530,7 @@ address |O |文本 |Consumer’s address (e.g. street)
|
|
|
zipcode |O |文本 |Consumer’s postal code
|
|
|
city |O |文本 |Consumer’s city
|
|
|
|
|
|
-###### 5.4.26 PPRO_DP
|
|
|
+###### 4.4.26 PPRO_DP
|
|
|
|
|
|
|
|
|
Field name |M/O |Type |Description
|
|
@@ -518,7 +540,7 @@ accountholdername|M |文本 |The account holder - minimum of 3 characters, up
|
|
|
bic |O |文本 |Valid BIC (8 or 11 alphanumeric letters) of consumer’s bank
|
|
|
|
|
|
|
|
|
-###### 5.4.27 PPRO_TP
|
|
|
+###### 4.4.27 PPRO_TP
|
|
|
|
|
|
|
|
|
Field name |M/O |Type |Description
|
|
@@ -540,7 +562,7 @@ EUR
|
|
|
The currencies available to you may depend on your contract.
|
|
|
|
|
|
|
|
|
-###### 5.4.28 PPRO_WP
|
|
|
+###### 4.4.28 PPRO_WP
|
|
|
|
|
|
|
|
|
Field name |M/O |Type |Description
|
|
@@ -553,13 +575,13 @@ email |M |文本 |RFC compliant email address of the account holder
|
|
|
dob |O |文本 |Date of birth, format YYYYMMDD
|
|
|
|
|
|
Note: WebPay is available for currency USD and country code CL.
|
|
|
-#### 6.测试账户
|
|
|
-
|
|
|
+#### 5.测试账户
|
|
|
+
|
|
|
请注意,支付宝、财付通交易需要用中国实名认证的账户进行测试交易,所有测试交
|
|
|
易不提供清算服务,请用小额测试。
|
|
|
|
|
|
以下是银联渠道测试卡,仅用于测试使用:
|
|
|
-
|
|
|
+
|
|
|
```
|
|
|
信用卡:5200831111111113
|
|
|
手机:13552535506
|
|
@@ -577,16 +599,16 @@ CVN2:248
|
|
|
|
|
|
```
|
|
|
|
|
|
-#### 7.技术支持
|
|
|
+#### 6.技术支持
|
|
|
|
|
|
如果您在调试时遇到问题,请我们联系:support@allpayx.com。
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
|