AllPay_Integration_Specification_EN.md 43 KB

AllPay Integration Specification V5.0.0

Shanghai AllPay Technology Co., Ltd.

  • Version:English V5.0.0
  • Update Time:2019/04

1.Overview

AllPay provides customers with unified API access to help them implement fast, secure and centralized access payment channels.

2.Transaction process

image

3.Description of verifying the signature

1.For a POST request message sent to the AllPay system, in which all incoming parameters (except signature parameters) according to the field name of ASCII smallest sequence (dictionary), using the format of the URL key/value pair (key1 = value1 & key2 = value2... ) spliced into a string String1.

2.At the end of String1, the signature Key (assigned at AllPay upon access) agreed by both parties is spliced directly (no need to connect with "&"), resulting in a stringSignTemp string, and an encryption on stringSignTemp to get the value of signature.

3.Sample signature string: acqID=99020344&backURL=https://www.allpayx.com&charSet=UTF-8&detailInfo=W3siZ29vZHNfbmFtZSI6IuiLueaenCIsInF1YW50aXR5IjoiMyJ9LHsiZ29vZHNfbmFtZSI6IuapmOWtkCIsInF1YW50aXR5IjoiNyJ9XQ==&frontURL=https://www.baidu.com&goodsInfo=apple&merID=000000000000015&merReserve=iPhone&orderAmount=0.01&orderCurrency=USD&orderNum=20190104022800&paymentSchema=AP&signType=MD5&transTime=20190104022800&transType=PURC&version=VER0000000052f2c77e3718c47cfb47a89a6fbc9d361

4.Common interface

Common interface includes notification, asynchronous notification of transactions, transaction inquiry, refund, refund inquiry interface.

4.1 General API access address

Interface Name Test URL Production URL
Purchase https://testapi.allpayx.com/api/unifiedorder https://api.allpayx.com/api/unifiedorder
Inquiry https://testapi.allpayx.com/api/orderquery https://api.allpayx.com/api/orderquery
Refund https://testapi.allpayx.com/api/refund https://api.allpayx.com/api/refund
Refund inquiry https://testapi.allpayx.com/api/refundquery https://api.allpayx.com/api/refundquery
Pre-authorization https://testapi.allpayx.com/api/unifiedorder https://api.allpayx.com/api/unifiedorder
Pre-authorization completed https://testapi.allpayx.com/api/pauc https://api.allpayx.com/api/pauc
Cancellation https://testapi.allpayx.com/api/canc https://api.allpayx.com/api/canc
Manual refund https://testapi.allpayx.com/api/manrefd https://api.allpayx.com/api/manrefd

4.2 Purchase interface

1.Interface specification

This interface provides the function of purchase transaction for access merchants.

2.Request message format

This field is a list of common fields, sending, every channel needs some channel channel exclusive field, specific fields please go to the channel's exclusive canal to the fields that view. Consumer interface is divided into jump transformation and parameters return type, default to jump transformation, parameters return type will be explained in chapter 5 channels (exclusive) inside.

Parameter Type Required Description
version String(12) M "VER000000005"
charSet String(6) M "UTF-8"
transType String(4) M "PURC"
orderNum String(60) M Order number: it is defined by the merchant itself, and the order number must not be repeated for the same merchant number
orderAmount String(12) M Order amount: if 100 yuan, it will be 100 or 100.00
orderCurrency String(3) M Currency of the order: ISO standard, such as RMB filling in "CNY", US dollar filling in "USD"
frontURL String(400) M When the payment is complete, jump to the address
backURL String(400) M Payment results are asynchronously notified to this address
merID String(15) M Merchant ID, assigned by AllPay
acqID String(11) M "99020344"
paymentSchema String(10) M Channel code:Click Here
goodsInfo String(60) M Commodity information, displayed on the payment page
detailInfo String(400) M Product details format: [{"goods_name":"iPhone X","quantity":"2"},{"goods_name":"iPhone 8","quantity":"4"}], which requires base-64 encoding of this field before signing and sending.
transTime String(14) M Transaction time, format :" yyyyMMddHHmmss"
merReserve String(1024) O Merchant reserved content, can pass any content, such as purchase information, account number, etc., but do not pass special symbols, such as commas.
signType String(10) M "MD5" or "SHA256"
signature String(32) M MD5 or SHA256 signature

3.Jump transformation Purchase interface response message

The merchant needs to provide an HTTP/HTTPS protocol interface that is included in the parameters passed to the SDK, the backURL. After the payment is complete, the AllPay server will call the backURL as a POST, informing the payment result (JSON). When merchant receive the notification, the merchant is required to response String "OK".

If we didn't receive "OK" from merchant,AllPay will resend the response message to merchant.Time interval is[15, 15, 30, 180, 1800, 3600, 7200, 14400, 14400], the unit is second.

Parameters as follows:

parameter Type Required Description
version String(12) M "VER000000005"
charSet String(6) M "UTF-8"
transType String(4) M "PURC"
orderNum String(60) M Order number
orderAmount String(12) M Order amount: if 100 yuan, it will be 100 or 100.00
orderCurrency String(3) M Currency of the order: ISO standard, such as RMB filling in "CNY", us dollar filling in "USD"
merID String(15) M Merchant ID, assigned by AllPay
acqID String(11) M "99020344"
paymentSchema String(10) M Channel code:Click Here
RespCode String(2) M 00 stands for success; 01 stands for fail. See Chapter 6 Response Codes in this document for details.
RespMsg String(20) M Response message
transID String(32) M The unique transaction id generated by the gateway.
GWTime String(14) M yyyyMMddHHmmss this should be a GWtime, currently is local transaction time.
transTime String(14) M Transaction time, format :" yyyyMMddHHmmss"
merReserve String(1024) O Merchant reserved content, can pass any content, such as purchase information, account number, etc., but do not pass special symbols, such as commas.
signType String(10) M "MD5" or "SHA256"
signature String(32) M MD5 or SHA256 signature

4.3 Inqiury interface

1.Interface specification

This interface provides the function of inqiury transaction for access merchants.

(1) Interface supplement

  • After the merchant initiates the consumer transaction, the status of the consumer transaction can be queried through the interface.

(2) Interface transaction process

2.Request message format

Parameter Type Required Description
version String(12) M "VER000000005"
charSet String(6) M "UTF-8"
transType String(4) M "INQY"
orderNum String(60) M Original payment order number
merID String(15) M Merchant ID, assigned by AllPay
acqID String(11) M "99020344"
paymentSchema String(10) M Channel code:Click Here
transTime String(14) M Transaction time, format :" yyyyMMddHHmmss"
signType String(10) M "MD5" or "SHA256"
signature String(32) M MD5 or SHA256 signature

3.Response message format

Parameter Type Required Description
version String(12) M "VER000000005"
charSet String(6) M "UTF-8"
transType String(4) M "INQY"
orderNum String(60) M Original payment order number
transID String(32) M The unique transaction id generated by the gateway.
merID String(15) M Merchant ID, assigned by AllPay
acqID String(11) M "99020344"
paymentSchema String(10) M Channel code:Click Here
RespCode String(2) M 00 stands for success; 01 stands for fail. See Chapter 6 Response Codes in this document for details.
RespMsg String(20) M Response message
transTime String(14) M Transaction time, format :" yyyyMMddHHmmss"
GWTime String(14) M yyyyMMddHHmmss this should be a GWtime, currently is local transaction time
signType String(3) M "MD5" or "SHA256"
signature String(32) M MD5 or SHA256 signature

4.4 Refund interface

1.Interface specification

This interface provides access to merchants with a refund of transactions.

(1) Interface supplement

  • The interface is initiated after the consumer transaction is successful, and the original order number is required to be specified.
  • International credit card transactions cannot be refunded on the same day, can be revoked, and can only be refunded every other day.
  • Under normal circumstances, the refund amount of the merchant on the day shall not be greater than the successful transaction amount on the day.

(2) Interface transaction process

2.Request message format

Parameter Type Required Description
version String(12) M "VER000000005"
charSet String(6) M "UTF-8"
transType String(4) M "REFD"
orderNum String(60) M Refund order number: it is defined by the merchant, and the refund order number under the same merchant number cannot be repeated
origOrderNum String(60) M Original trade order number
returnAmount String(12) M Refund amount: if 100 yuan, it is 100 or 100.00
orderCurrency String(3) M Currency of the order: ISO standard, such as RMB filling in "CNY", us dollar filling in "USD"
merID String(15) M Merchant ID, assigned by AllPay
paymentSchema String(10) M Channel code:Click Here
acqID String(11) M "99020344"
transTime String(14) M Transaction time, format :" yyyyMMddHHmmss"
signType String(3) M "MD5" or "SHA256"
signature String(32) M MD5 or SHA256 signature

3.Response message format

Parameter Type Required Description
version String(12) M "VER000000005"
charSet String(6) M "UTF-8"
transType String(4) M "REFD"
orderNum String(60) M Refund order number
transID String(32) M The unique transaction id generated by the gateway.
merID String(15) M Merchant ID, assigned by AllPay
acqID String(11) M "99020344"
paymentSchema String(10) M Channel code:Click Here
RespCode String(2) M 00 stands for success; 01 stands for fail. See Chapter 6 Response Codes in this document for details.
RespMsg String(20) M Response message
transTime String(14) M Transaction time, format :" yyyyMMddHHmmss"
GWTime String(14) M yyyyMMddHHmmss this should be a GWtime, currently is local transaction time
signType String(10) M "MD5" or "SHA256"
signature String(32) M MD5 or SHA256 signature

4.5 Refund Inqiury interface

1.Interface specification

This interface provides the function of refund inqiury transaction for access merchants.

(1) Interface supplement

  • This interface is used by the merchant to check the processing status of the refund transaction after the refund is initiated.

(2) Interface transaction process

2.Request message format

Parameter Type Required Description
version String(12) M "VER000000005"
charSet String(6) M "UTF-8"
transType String(4) M "RFQY"
orderNum String(60) M Refund order number
merID String(15) M Merchant ID, assigned by AllPay
acqID String(11) M "99020344"
paymentSchema String(10) M Channel code:Click Here
transTime String(14) M Transaction time, format :" yyyyMMddHHmmss"
signType String(10) M "MD5" or "SHA256"
signature String(32) M MD5 or SHA256 signature

3.Response message format

Parameter Type Required Description
version String(12) M "VER000000005"
charSet String(6) M "UTF-8"
transType String(4) M "RFQY"
orderNum String(60) M Refund order number
transID String(32) M The unique transaction id generated by the gateway.
merID String(15) M Merchant ID, assigned by AllPay
acqID String(11) M "99020344"
paymentSchema String(10) M Channel code:Click Here
RespCode String(2) M 00 stands for success; 01 stands for fail. See Chapter 6 Response Codes in this document for details.
RespMsg String(20) M Response message
transTime String(14) M Transaction time, format :" yyyyMMddHHmmss"
GWTime String(14) M yyyyMMddHHmmss this should be a GWtime, currently is local transaction time
signType String(10) M "MD5" or "SHA256"
signature String(32) M MD5 or SHA256 signature

4.6 Pre-authorization interface

1.Interface specification

The pre-authorization interface is suitable for international credit card transactions, including VISA, MasterCard, JCB and other card brands. Pre-authorized transactions will not participate in liquidation, and the issuing bank will temporarily freeze user funds.

2.Request message format

The fields listed below are common fields, and each channel needs to be sent. Some channels have exclusive fields. For details, please refer to Chapter 5, Channel-Specific Configuration.

Parameter Type Required Description
version String(12) M "VER000000005"
charSet String(6) M "UTF-8"
transType String(4) M "PAUT"
orderNum String(60) M Order number: it is defined by the merchant itself, and the order number must not be repeated for the same merchant number
orderAmount String(12) M Order amount: if 100 yuan, it will be 100 or 100.00
orderCurrency String(3) M Currency of the order: ISO standard, such as RMB filling in "CNY", US dollar filling in "USD"
frontURL String(400) M When the payment is complete, jump to the address
backURL String(400) M Payment results are asynchronously notified to this address
merID String(15) M Merchant ID, assigned by AllPay
acqID String(11) M "99020344"
paymentSchema String(10) M Channel code: "FC"
goodsInfo String(60) M Commodity information, displayed on the payment page
detailInfo String(400) M Product details format: [{"goods_name":"iPhone X","quantity":"2"},{"goods_name":"iPhone 8","quantity":"4"}], which requires base-64 encoding of this field before signing and sending.
transTime String(14) M Transaction time, format :" yyyyMMddHHmmss"
merReserve String(1024) O Merchant reserved content, can pass any content, such as purchase information, account number, etc., but do not pass special symbols, such as commas.
signType String(10) M "MD5" or "SHA256"
signature String(32) M MD5 or SHA256 signature

3.Response message

The merchant needs to provide an HTTP/HTTPS protocol interface that is included in the parameters passed to the SDK, the backURL. After the payment is complete, the AllPay server will call the backURL as a POST, informing the payment result (JSON). When merchant receive the notification, the merchant is required to response String "OK".

If we didn't receive "OK" from merchant,AllPay will resend the response message to merchant.Time interval is[15, 15, 30, 180, 1800, 3600, 7200, 14400, 14400], the unit is second.

Parameters as follows:

Parameter Type Required Description
version String(12) M "VER000000005"
charSet String(6) M "UTF-8"
transType String(4) M "PAUT"
orderNum String(60) M Order number
orderAmount String(12) M Order amount: if 100 yuan, it will be 100 or 100.00
orderCurrency String(3) M Currency of the order: ISO standard, such as RMB filling in "CNY", US dollar filling in "USD"
merID String(15) M Merchant ID, assigned by AllPay
acqID String(11) M "99020344"
paymentSchema String(10) M Channel code: "FC"
RespCode String(2) M 00 stands for success; 01 stands for fail. See Chapter 6 Response Codes in this document for details.
RespMsg String(20) M Response message
transID String(32) M The unique transaction id generated by the gateway.
GWTime String(14) M yyyyMMddHHmmss this should be a GWtime, currently is local transaction time.
transTime String(14) M Transaction time, format :" yyyyMMddHHmmss"
merReserve String(1024) O Merchant reserved content, can pass any content, such as purchase information, account number, etc., but do not pass special symbols, such as commas.
signType String(10) M "MD5" or "SHA256"
signature String(32) M MD5 or SHA256 signature

4.7 Pre-authorization completion interface

1.Interface specification

The pre-authorization completion interface is applicable to international credit card transactions, including VISA, MasterCard, JCB and other card brands. The pre-authorization completion transaction is similar to the consumer transaction. After the transaction is successful, the merchant will be liquidated.

(1) Interface supplement

  • The interface is initiated after the pre-authorization transaction is successful, and the original pre-authorization order number is required to be specified, and the time is separated by no more than 30 days.
  • The pre-authorization completion transaction amount cannot be greater than the pre-authorized transaction amount.
  • Pre-authorized transactions that only support one successful pre-authorization completion transaction.

(2) Interface transaction process

2.Request message format

Parameter Type Required Description
version String(12) M "VER000000005"
charSet String(6) M "UTF-8"
transType String(4) M "PAUC"
orderNum String(60) M Order number: it is defined by the merchant itself, and the order number must not be repeated for the same merchant number
origOrderNum String(60) M Pre-authorized order number
orderAmount String(12) M Order amount: if 100 yuan, it will be 100 or 100.00
orderCurrency String(3) M Currency of the order: ISO standard, such as RMB filling in "CNY", US dollar filling in "USD"
merID String(15) M Merchant ID, assigned by AllPay
acqID String(11) M "99020344"
paymentSchema String(10) M Channel code: "FC"
transTime String(14) M Transaction time, format :" yyyyMMddHHmmss"
signType String(10) M "MD5" or "SHA256"
signature String(32) M MD5 or SHA256 signature

3.Response message format

Parameter Type Required Description
version String(12) M "VER000000005"
charSet String(6) M "UTF-8"
transType String(4) M "PAUC"
orderNum String(60) M Order number
transID String(32) M The unique transaction id generated by the gateway.
merID String(15) M Merchant ID, assigned by AllPay
acqID String(11) M "99020344"
paymentSchema String(10) M Channel code: "FC"
RespCode String(2) M 00 stands for success; 01 stands for fail. See Chapter 6 Response Codes in this document for details.
RespMsg String(20) M Response message
transTime String(14) M Transaction time, format :" yyyyMMddHHmmss"
GWTime String(14) M yyyyMMddHHmmss this should be a GWtime, currently is local transaction time.
signType String(10) M "MD5" or "SHA256"
signature String(32) M MD5 or SHA256 signature

4.8 Cancellation interface

1.Interface specification

The cancellation interface is suitable for international credit card transactions, including VISA, MasterCard, JCB and other card brands.

(1) Interface supplement

  • This interface supports the cancellation of international credit card transactions, including consumption, pre-authorization, and pre-authorization completion.
  • When withdrawing consumption, you can only support the cancellation of the day's trading (note: after 23:00 Beijing time, it is considered the next day). For non-day trading, it can be processed through the refund interface.

(2) Interface transaction process

2.Request message format

Parameter Type Required Description
version String(12) M "VER000000005"
charSet String(6) M "UTF-8"
transType String(4) M "VOID"
orderNum String(60) M Order number: it is defined by the merchant itself, and the order number must not be repeated for the same merchant number
origOrderNum String(60) M Original transaction order number: The order number to be revoked, which can be consumption, pre-authorization, pre-authorization completed orderNum
merID String(15) M Merchant ID, assigned by AllPay
acqID String(11) M "99020344"
paymentSchema String(10) M Channel code: "FC"
transTime String(14) M Transaction time, format :" yyyyMMddHHmmss"
signType String(10) M "MD5" or "SHA256"
signature String(32) M MD5 or SHA256 signature

3.Response message format

Parameter Type Required Description
version String(12) M "VER000000005"
charSet String(6) M "UTF-8"
transType String(4) M "VOID"
orderNum String(60) M Order number of cancellation
transID String(32) M The unique transaction id generated by the gateway.
merID String(15) M Merchant ID, assigned by AllPay
acqID String(11) M "99020344"
paymentSchema String(10) M Channel code: "FC"
RespCode String(2) M 00 stands for success; 01 stands for fail. See Chapter 6 Response Codes in this document for details.
RespMsg String(20) M Response message
transTime String(14) M Transaction time, format :" yyyyMMddHHmmss"
GWTime String(14) M yyyyMMddHHmmss this should be a GWtime, currently is local transaction time.
signType String(10) M "MD5" or "SHA256"
signature String(32) M MD5 or SHA256 signature

4.9 Manual refund interface

1.Interface specification

To refund the transaction before 90 days, the merchant can't process the online refund interface, but need to call the interface to initiate the refund application. After the application is successful, our business staff will handle it manually. The processing period is about 3 to 5 working days. The refund application transaction will be successfully refunded after manual processing, and the transaction will be liquidated.

2.Request message format

Parameter Type Required Description
version String(12) M "VER000000005"
charSet String(6) M "UTF-8"
transType String(4) M "MANREFD"
orderNum String(60) M Refund order number: it is defined by the merchant, and the refund order number under the same merchant number cannot be repeated
origOrderNum String(60) M Original trade order number
returnAmount String(12) M Refund amount: if 100 yuan, it is 100 or 100.00
orderCurrency String(3) M Currency of the order: ISO standard, such as RMB filling in "CNY", us dollar filling in "USD"
merID String(15) M Merchant ID, assigned by AllPay
paymentSchema String(10) M Channel code: "FC"
acqID String(11) M "99020344"
transTime String(14) M Transaction time, format :" yyyyMMddHHmmss"
signType String(3) M "MD5" or "SHA256"
signature String(32) M MD5 or SHA256 signature

3.Response message format

Parameter Type Required Description
version String(12) M "VER000000005"
charSet String(6) M "UTF-8"
transType String(4) M "MANREFD"
orderNum String(60) M Refund order number
transID String(32) M The unique transaction id generated by the gateway.
merID String(15) M Merchant ID, assigned by AllPay
acqID String(11) M "99020344"
paymentSchema String(10) M Channel code: "FC"
RespCode String(2) M 00 means the application has been accepted
RespMsg String(20) M Response message
transTime String(14) M Transaction time, format :" yyyyMMddHHmmss"
GWTime String(14) M yyyyMMddHHmmss this should be a GWtime, currently is local transaction time
signType String(10) M "MD5" or "SHA256"
signature String(32) M MD5 or SHA256 signature

5.Channel exclusive allocation

5.1 WX

5.1.1 QR code no jump mode

This mode returns the URL value of WeChat payment collection for parameter return, ask the merchant to convert it into QR code, generate the front interface of payment, and prompt the user to scan the code to pay.

Purchase interface specific fields

Parameter Type Required Description
tradeFrom String M "QRCODE"

Response message:

Parameter Type Required Description
RespCode String M 00 stands for success; 01 stands for fail.
RespMsg String M Response message
code_url String O Characters to generate QR code. When RespCode=00 returns it.

5.1.2 QR code jump mode

It's jump mode, open the front-end page provided by AllPay, which contains WeChat QR code.

Purchase interface specific fields

Parameter Type Required Description
tradeFrom String M "QUICK"

5.1.3 WeChat Official Accounts payment

Purchase interface specific fields

Parameter Type Required Description
tradeFrom String M "JSAPI"

5.1.4 WeChat Mini Programs payment

Purchase interface specific fields

Parameter Type Required Description
tradeFrom String M "APPLET"
openid String M Wechat openid

Response message:

Parameter Type Required Description
RespCode String M 00 stands for success; 01 stands for fail.
RespMsg String M Response message
sdk_params String O Required parameter for Mini Program payment(JSON). When RespCode=00 returns it.

Parameter sdk_params is used to call up the WeChat Mini Programs payment. Please refer to the Mini Programs integration specification.

5.1.5 APP mode

Purchase interface specific fields

Parameter Type Required Description
tradeFrom String M "APP"

Response message:

Parameter Type Required Description
RespCode String M 00 stands for success; 01 stands for fail.
RespMsg String M Response message
tn String O Transaction serial number. Required parameter for Wechat app payment. When RespCode=00 returns it.

After getting tn, call the SDK to pay according to Section 7 of this document.

5.2 AP

5.2.1 WebSite mode

Purchase interface specific fields

Parameter Type Required Description
tradeFrom String M "WEB"

5.2.2 H5 mode

Purchase interface specific fields

Parameter Type Required Description
tradeFrom String M "JSAPI"

5.2.3 APP mode

Purchase interface specific fields

Parameter Type Required Description
tradeFrom String M "APP"

Response message:

Parameter Type Required Description
RespCode String M 00 stands for success; 01 stands for fail.
RespMsg String M Response message
tn String O Transaction serial number. Required parameter for Wechat app payment. When RespCode=00 returns it.

After getting tn, call the SDK to pay according to Section 7 of this document.

5.2.4 QR code no jump mode

This mode returns the URL value of WeChat payment collection for parameter return, ask the merchant to convert it into QR code, generate the front interface of payment, and prompt the user to scan the code to pay.

Purchase interface specific fields

Parameter Type Required Description
tradeFrom String M "QRCODE"

Response message:

Parameter Type Required Description
RespCode String M 00 stands for success; 01 stands for fail.
RespMsg String M Response message
code_url String O Characters to generate QR code. When RespCode=00 returns it.

5.3 UP

5.3.1 H5 mode, adaptive PC and mobile

Purchase interface specific fields

Parameter Type Required Description
tradeFrom String M "H5"

5.3.2 APP mode

Purchase interface specific fields

Parameter Type Required Description
tradeFrom String M "APP"

Response message:

Parameter Type Required Description
RespCode String M 00 stands for success; 01 stands for fail.
RespMsg String M Response message
tn String O Transaction serial number. Required parameter for Wechat app payment. When RespCode=00 returns it.

After getting tn, call the SDK to pay according to Section 7 of this document.

Test cards:

Credit card:8171999927660000
mobile:+852 11112222
cvn2:  123
exp date: month 12 year 30
SMS Code on PC: 111111
SMS Code on Mobile: 123456

5.4 Apple Pay

5.4.1 APP mode

Purchase interface specific fields

Parameter Type Required Description
tradeFrom String M "APP"

Response message:

Parameter Type Required Description
RespCode String M 00 stands for success; 01 stands for fail.
RespMsg String M Response message
tn String O Transaction serial number. Required parameter for Wechat app payment. When RespCode=00 returns it.

After getting tn, call the SDK to pay according to Section 7 of this document.

5.5 CA

5.5.1 APP mode

Purchase interface specific fields

Parameter Type Required Description
tradeFrom String M "APP"

Response message:

Parameter Type Required Description
RespCode String M 00 stands for success; 01 stands for fail.
RespMsg String M Response message
tn String O Transaction serial number. Required parameter for CA app payment. When RespCode=00 returns it.

After you get tn,please integrate according to Android Integration Specification

5.6 MIPAY

5.6.1 H5 mode

Purchase interface specific fields

Parameter Type Required Description
tradeFrom String M "H5"
firstname String M This is name of the customer who is doing the transaction.
email String M this is email id of the customer who is doing transaction
phone String M Phone number of the customer
customerId String O Customer ID, when client register on merchant, merchant distribute it to client.
Test environment configuration:

Modify the test machine hosts file, add the following two information.
114.80.87.249 account.preview.n.xiaomi.net
114.80.87.249 api.account.preview.n.xiaomi.net

Test card:

Card number:5123456789012346
Validity period:0520
cvv:123

5.7 EB

5.7.1 H5 mode

Purchase interface specific fields

Parameter Type Required Description
tradeFrom String M "H5"
firstname String M This is name of the customer who is doing the transaction.
email String M this is email id of the customer who is doing transaction
phone String M Phone number of the customer

5.8 PF

5.8.1 H5 mode

Purchase interface specific fields

Parameter Type Required Description
tradeFrom String M "H5"
email String M email
transport_express String M tracking number
Test card:

Card Number: 4242424242424242
Expriation Date: 1220
CVC: 123

5.9 APHK

5.9.1 H5 mode

Purchase interface specific fields

Parameter Type Required Description
tradeFrom String M "JSAPI"

5.9.2 QR code no jump mode

This mode returns the URL value of WeChat payment collection for parameter return, ask the merchant to convert it into QR code, generate the front interface of payment, and prompt the user to scan the code to pay.

Purchase interface specific fields

Parameter Type Required Description
tradeFrom String M "QRCODE"

Response message:

Parameter Type Required Description
RespCode String M 00 stands for success; 01 stands for fail.
RespMsg String M Response message
code_url String O Characters to generate QR code. When RespCode=00 returns it.

5.10 FC

5.10.1 Purchase/Pre-authorization

Purchase/Pre-authorization interface specific fields

Parameter Type Required Description
tradeFrom String M "H5"
Test card:

Card Number: 4761340000000019
Expiry Date: 1217
CVV2: 830

6.RespCode

RespCode Description
00 Success
01 Fail
04 Processing
61 Exceed the limit
U1 Merchant ID is not exsit
U2 Signature is not correct
U3 Message is tampered
U4 Missing parameter
U5 Invalid parameter
U6 Repeat order number
U7 Order is not exist
U8 Parameter is null
U9 System error
P1 Channel is not setted
P2 Currency is not setted
P3 Balance is not enough
P4 Function is not supported
P5 Channel returns "Error"

7.APP mode integration specification

Android Integration Specification:Click Here

iOS Integration Specification:Click Here

8.Technical support

If you have problems with debugging, please contact us: support@allpayx.com