common.md 14 KB

6.Common interface

6.1. Interface URL

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

Interface Name Test URL Production URL
inquiry https://testapi.allpayx.com/pay https://api.allpayx.com/pay
refund https://testapi.allpayx.com/refund https://api.allpayx.com/refund
refund inquiry https://testapi.allpayx.com/refundquery https://api.allpayx.com/refundquery

6.2. Purchase Response from AllPay

AllPay server sends the backURL address to the consumer interface asynchronously through get, and the merchant determines the payment result of the transaction based on the received messag

Parameter Type Required Description
version String(12) M "VER000000002"
charSet String(6) M “UTF-8”
transType String(4) M “PURC”
orderNum String(60) M 订单号
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"
settAmount String(12) M 100 is displayed as 100 or 100.00
settCurrency String(3) M Comply with ISO standards
rate String(7) M Real exchange rate, 7 digits
merReserve String(1024) M Merchant reserved content, can pass any content, such as purchase information, account number, etc., but do not pass special symbols, such as commas.
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.
RespMsg String(20) M Response message, all English characters
transTime String(14) M Transaction time, format :" yyymmddhhmmss"
GWTime String(14) M YYYYMMDDHHMMSS this should be a GWtime, currently is local transaction time
signType String(3) M MD5
signature String(32) M MD5 signature

6.3. Inqiury interface

  1. Interface specification

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

  1. Request message format
Parameter Type Required Description
version String(12) M "VER000000002"
charSet String(6) M "UTF-8"
transType String(4) M "INQY"
orderNum String(60) M Original trade order number
merReserve String(1024) M Merchant reserved content, can pass any content, such as purchase information, account number, etc., but do not pass special symbols, such as commas.
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 :" yyymmddhhmmss"
signType String(3) M "MD5"
signature String(32) M MD5 signature
  1. Response message format
Parameter Type Required Description
version String(12) M "VER000000002"
charSet String(6) M “UTF-8”
transType String(4) M “INQY”
orderNum String(60) M Original trade 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.
RespMsg String(20) M Response message, all English characters
transTime String(14) M Transaction time, format :" yyymmddhhmmss"
GWTime String(14) M YYYYMMDDHHMMSS this should be a GWtime, currently is local transaction time
signType String(3) M MD5
signature String(32) M signature

6.4. Refund interface

1.Interface specification

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

2.Request message format

Parameter Type Required Description
version String(12) M “VER000000002”
charSet String(6) M “UTF-8”
transType String(4) M “REFD”
orderNum String(60) M Original trade order number
refundNum 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
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"
merReserve String(1024) M Merchant reserved content, can pass any content, such as purchase information, account number, etc., but do not pass special symbols, such as commas.
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 :" yyymmddhhmmss"
signType String(3) M MD5
signature String(32) M signature

3.Response message format

Parameter Type Required Description
version String(12) M “VER000000002”
charSet String(6) M “UTF-8”
transType String(4) M “REFD”
refundNum String(60) M The merchant shall define it by itself, and the refund number of the same merchant number shall not be repeated
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"
RespCode String(2) M 00 stands for success; 01 stands for fail.
RespMsg String(20) M Response message, all English characters
transTime String(14) M Transaction time, format :" yyymmddhhmmss"
GWTime String(14) M YYYYMMDDHHMMSS this should be a GWtime, currently is local transaction time
signType String(3) M MD5
signature String(32) M signature

6.5. Refund Inqiury interface

1.Interface specification

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

  1. Request message format
Parameter Type Required Description
version String(12) M “VER000000002”
charSet String(6) M “UTF-8”
transType String(4) M “RFQY”
refundNum String(60) M Refund order number
merReserve String(1024) M Merchant reserved content, can pass any content, such as purchase information, account number, etc., but do not pass special symbols, such as commas.
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 :" yyymmddhhmmss"
signType String(3) M MD5
signature String(32) M signature
  1. Response message format
Parameter Type Required Description
version String(12) M “VER000000002”
charSet String(6) M “UTF-8”
transType String(4) M “REFD”
refundNum 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) Channel code:Click Here
RespCode String(2) M Response message, all English characters
RespMsg String(20) M Response message, all English characters
transTime String(14) M Transaction time, format :" yyymmddhhmmss"
GWTime String(14) M YYYYMMDDHHMMSS this should be a GWtime, currently is local transaction time
signType String(3) M MD5
signature String(32) M signature