1. Docking Information

Name Value instructions
Merchant platform login address —— he address is used to log in and view relevant information of merchant number, provided by 3weidu operators. (To be sent with the email of docking document)
Merchant number —— A unique identifiable access account allocated by 3weidu, is used for technology docking and merchant platform login.
Initial password —— Initial password is allocated by 3weidu to log in merchant platform, and merchants can modify it themselves. (Contact 3weidu operators to get it)
Recharge terminal number —— Business terminal number corresponding to merchant number.(To be sent with the email of docking document)
Version number —— A specific version number of identifying payment system business.(To be sent with the email of docking document)
Server public key —— Server side public key information provided for RSA asymmetric encryption.(To be sent with the email of docking document)

1.1 Interface Specification

1.1.1 Protocol Rules

Transmission mode HTTPS transmission is recommended to ensure transaction security.
Submission mode Adopt POST mode to submit.
Character code Adopt UTF-8 character code uniformly.
Signature algorithm RSA or MD5, pairing signature algorithm according to specific API document requirements.
Signature requirement Signature verification is needed for both requesting and receiving data, and please refer to the signature algorithm. required by the specific API document for details.
Judgment logic First judge the return of protocol field, then judge the return of business, and finally judge the status of transaction.

1.1.2 Request Format

All request formats are json, and the request form is post request, and the format json is returned.

1.1.3 MD5 Encryption

First judge the return of protocol field, then judge the return of business, and finally judge the status of transaction.

1.1.4 RSA Encryption

1、oth private key and public key are needed for signature. The private key and public key are included in the digital certificate obtained by customer , known as merchant public key and merchant private key . Merchants need to exchange public key with our company platform, operate according to API docking document, upload the generated public key to our business platform, and obtain the server public key provided by our platform at the same time. Therefore, when signing, the merchant needs both merchant private key and server public key allocated by our platform.

2、After getting the pending signature parameters of request, encrypt the parameters through server public key, put the parameters and merchant private key together into RSA signature function to do signature operation, so as to obtain signature result of character string sign, and then transmit the required parameters.

1.1.5 Notes:

1、The parameters are case-sensitive, and spaces are not allowed front or behind of the parameters .
2、All amount units involved in recharge business are cent, and one cent is the smallest unit, not allowing a decimal point .
3、In the docking document , Y means required, and N means non-required.
4、If the asynchronous callback process does not return SUCCESS, we will send a notification to asynchronization every three minutes , and will no longer send the notification after 10 times .
5、As there is a re-transmission mechanism in asynchronous notification, please must control orders well in case of repeat. A single order can only be successfully entered into account once, and avoid the situation of multiple times callbacks or records, in case of unnecessary loss for business platform.

1.2 Assembly API Request

Parameter Declaration:

The following system parameters are public request parameters of all interface services of payment withholding business. (There are specific business parameter declaration in encParam, and please refer to the API document instructions for specific business parameter fields ).

Name Type If necessary Instructions
merId String Y The only merchant number allocated to merchant after registration and authentication in payment platform system.
version String Y Version number, default 1.0.9
sign String Y Digital signature for requested content of business parameter .
encParam String Y Encrypted data for requested content of business parameter (The specific business parameters vary according to different interfaces needs )

<form id="paysubmit" name="paysubmit" action="https://www.xxxx/gateway/orderPay"method="post">
<input type="hidden" name="sign"
value="cLFzpk/K1nBJSCowNKWYY9mFdtMhwLUbi+opOgm2SrceqzxPtqct3BfqsxAFmCPVOQAeE7UbXgQPvapjoZwKMf1FzUcF3F9xRLySiWtQO54ZVvXU9jhYnJrgk4Juf12dXx+sctZkZkCae9wGrLbJovARf7+N71SzNCsnYL1kvtg="/>
<input type="hidden" name="merId" value="201709292914064"/>
<input type="hidden" name="encParam"
value="OkXIlem9laas0hddcvHK2oyxCj8eqDOVh3FXVmGIKrcgiiYdIpDV6HeHhRUd9ozIWbx/UfrAuv5SREwJvmBHHQJPzUMe1tShh16O1KU8DTtpuQpXXmfrqAl2Xl3weK/SS6RCTJlhku3vRz4Z4s1/+pHiE9gSw4Jgxh7iPeZgI2NUglThEiICx6NhlKdNvrw/2hTRotapuC/Lqnw545FipfZVjf1zMI36nZsswf6D0Q3P1J0roRpTsbqST97UKldFb1JLLYvIB/yft3lJH2hAq/eB2zJfT3lR13l2J56SI/k1UE7PdnKcSumRVDZ9cAj319sCOlSrStaEm0wZKKraDwQ3SM0XTmu0hSAIqFj/MQTri7ccBaAUGaPwQMyLFABqbO4eLCf1KVtbO4cj41BTgCZHHQKxMRz0DmBEAADvufMsPKaG6saMk4qR2BnpCHhNSiZI0HHintYV76xYrW+zfh+Qm3r4+v5/0ZUofFdL+biwWD0VJY4bL6p+wERbjoPepJ5zqheuCIbvWNki2oczvnHQMhlSZ9spFNFUZCh8v1QG2CtwM+MhwYOik5NJ+HfhTBPKeVE8yaYAHnulfDGkwkKPUSf8vXdd9EVbJ02tEvutU7DlbCwYRT8+lXQSQn3cyFsOINJmWFFrSrvAaPxHHtN8y46b/uMz90DgqZd+Zo="/>
<input type="hidden" name="version" value="1.0.9"/>
<input type="submit" value="gatewayPay" style="display:none;"/>
<"/form>
<script>document.forms['paysubmit'].submit();</script>

1.3 Error Code

1.3.1 Withholding Business

Error code Error description Solutions
1000 Success
0002 Merchant number format error , Version number format error. Check whether the format of submitted parameters of merchant number merId and version number is correctnumber format error.
0010 Merchant has no access to this interface number format error. Submit parameters request methods according to the specific API document.
0001 The merchant does not exist, please upload merchant public key first. Upload merchant public key to business platform according to the document
0002 The merchant is under review, the merchant has been banned. Provide the merchant number, and contact customer service to verify the specific status.
0003 Required parameter is null , synchronous address format error , asynchronous address format error. Check API document whether the format of required parameters, synchronous address syncURL and asynchronous address asynURL is correct.
0004 Failed to generate order.
0005 The order has been processed , please do not repeat submission. Check whether the order number is repeated, and do not need to process again.
0006 Single excess Check whether the amount submitted is greater than the single maximum amount of the platform constraints.
0007 Single day excess Check whether the amount of transaction is excess on the day.
0035 The merchant transaction is too frequent and the system refuses to deal. The current transaction is too frequent, and please try again later.
0000 Version number error, verification failed, decryption failed. Check whether version number , server public key , and merchant public / private key are correct.
0016 The payment authority has not been opened . Provide merchant number , and contact platform customer service to verify.
0020 Transaction amount format error. Transaction amount should be in unit of "cent", cannot include decimal point, and must be a pure number.
0021 The transaction amount is invalid . Transaction amount must be greater than or equal to 1 yuan , and the terminal number does not exist . Check whether the transaction amount and the terminal number terId are valid.

1.3.2 Payment Service

Error code Error description in Chinese Solutions
0000 Operation successful
0001 Operation failed (At the same time there is the specific failure reason in return message)
1000 Message parsing error

1.4 Interface List

Menus Interface Payment business
Payment API Order payment API yes
Order status query API yes
Obtain QR code API yes
Synchronous / Asynchronous yes
Issue API Check account balance API yes
Order status query API yes
Single transfer API yes
Batch transfer API yes

1.5 Nuclear Business Process

1.5.1 E-bank Payment

1.5.2 Scanning Code Payment