Gateway description:
The platform interface adopts RSA 2048 (SHA-256) asymmetric encryption algorithm.
Request mode: GET/POST
Request address:/pub/pay/records/gateway
Details:
Unified ordering interface, through which all payment requests are initiated to the payment platform. According to different payment methods, the request parameters and return data are different, and the business can choose different interfaces according to different usage scenarios.
Header parameter | Type | Required | Describe | Example e.g. |
---|---|---|---|---|
Content-Type | string | Yes | It is recommended to fix application/x-www-form-urlencoded | application/x-www-form-urlencoded |
isemailmode | string | No | This field must be passed in Header when using mail mode payment channel, and its value is 1 | 1 |
issmsmode | string | No | This field must be passed in the header when using the payment channel in SMS mode, and its value is 1 | 1 |
Query parameter | Type | Required | Describe | Example e.g. |
---|---|---|---|---|
access_token | string | Yes | Merchant number, assigned merchant number | 29901 |
ciphertext | string | Yes | The ciphertext obtained by the merchant encrypting JSON with the public key |
ciphertext encapsulates content | Type | Required | Describe | Example e.g. |
---|---|---|---|---|
payid | string | Yes | Payment channel ID | 1001 |
requestid | string | Yes | Merchant order number (8 ~ 32-bit string composed of numbers, uppercase English letters and lowercase English letters) | 20180909002 |
amount | string | Yes | Payment amount (The currency of each channel may be different, use User Center-My Interface as the stanard. In addition, the incoming amount will be rounded to 2 decimal places.) | 23.99 |
callfront | string | Yes | Front notification address (The backstage setting shall prevail, and if it is not set, it will be subject to the setting when submission) *If you can set or pass in-1, the default friendly prompt page of our company will be automatically used, and merchants need to use callback information to confirm payment |
|
callback | string | Yes | Backend notification address (The backstage setting shall prevail, and if it is not set, it will be subject to the setting when submission) | |
currency | string | No | The currency you submitted(your currency is considered the same as the channel currency by default) | USD |
timestamp | string | No | Time stamp (GMT time seconds since January 1, 1970) | 1536131800 |
customeridentify | string | No | User ID(optional, user name, login ID, user ID, etc. can be passed in, which can be used for some channels that need to collect information to automatically read the information of the customer's recent payment success) | user123456 |
customername | string | No | Name of customer requesting payment (optional, required for some channels) | meimei han |
idnumber | string | No | Customer ID number applying for payment (optional, which may be required for some channels) | 012345678 |
mobile | string | No | Phone number of customer applying for payment (optional, required for some channels) | 15000000000 |
string | No | Customer mailbox applying for payment (optional, required for some channels) | 123456@qq.com | |
paycard | string | No | Default payment card number for applying for payment (optional, which may be required for some channels) | 6223164991230014 |
customize1 | string | No | Custom content 1 (optional, it will be sent back as it is when callback) | Name:'Han Meimei 1' |
customize2 | string | No | Custom content 2 (optional, it will be sent back as it is when callback) | Commodity: 'Red coat 2' |
customize3 | string | No | Custom content 3 (optional, it will be sent back as it is when callback) | Specification:'XXXL3' |
Request method: POST
Redirect address: set by the merchant in the background or specified when submitting payment
Details:
After successful or failed payment, the customer will jump to the address specified by the merchant with parameters, and the merchant can make a prompt interface when the payment is successful or failed
Example of the return:
ciphertext=wwlputO3AfKyi9AqnUm%2FY9c%2FZ8T4S1A%2FJ96k5SR8oCs03%2FuNU%2BlbJltxnqhdPep%2BciYqLcA2CxtD1FC0ChuONB2grI1DCYO181rGtSCibgxGMWjeUJNxyBx9qQFf5GGwORvDEuW%2BAAgEF2GFxVWgAlbARc2k%2BR%2BUXiUhY6YOefPMG5fG3yaysftDvOvGO6xgPix49WS88bOKGENY9sM4snonLoy8eBju5zWPlLXEiPv8n2pVVcgdGTNAKZ5j9yzSzYzMvTXo6js%2Fud3Zs1S5Nt40g6NONl7ifqv0YKFsEfhNMM16dvfxYL2s5%2Ffrw2HCPdgRwELemiI6P8DsjHZREp7ErBkaHaPGjvnubXA%2BKB7e%2FmKIYCtOQGIfP1fzlxdDn2xoNcjUi80qog60x%2BoDBFLx620I0NBox8Mj9VqDRQ2V1kqOrfOxtnjkIEINkO9Y1rUt420TvD6QGq6OaNRxNaSlG3gYmHYNj8yzyf%2BSfzNBKpw6jEM6yNb5O4ua8rX%2B
Received value | Describe | Type |
---|---|---|
ciphertext | Ciphertext encrypted by platform with private key | string |
The merchant uses the public key provided by the platform to decrypt ciphertext and get the following parameters:
{
"requestid": "1624438261194",
"amount": 100,
"subamount": 100,
"paytime": "2021-06-13 16:51:49",
"merchantid": 887082,
"orderno": "1624438286359773",
"paystatus": 1,
"accNo": "622316****0014",
"timestamp": 1624438320,
"paystatusdesc": "SUCCESS",
"customize1": "TEST",
"customize2": "TEST",
"customize3": "TEST"
}
Ciphertext encapsulates content | Describe | Type |
---|---|---|
requestid | Merchant order number | string |
amount | Payment amount | string |
subamount | Submitted amount | string |
paytime | Time of payment | string |
merchantid | Merchant number | string |
orderno | Payment platform system order number | string |
paystatus | Payment status (1 for: "Payment succeeded."-1 for: "Payment failed."-2 for: "Actual payment amount does not match requested amount."-3 for: "Payment order cancelled."-4 for: "Unknown exception.") | string |
paystatusdesc | Payment status description, string type. When paystatus is-1 or-4, the specific description that may be returned varies according to different payment channels. | string |
accNo | Customer payment card number, if there is no data, it will be an empty string | string |
timestamp | Time stamp (GMT time seconds since January 1, 1970) | string |
customize1 | Custom Content 1 (returned if filled in) | string |
customize2 | Custom Content 2 (returned if filled in) | string |
customize3 | Custom content 3 (returned if filled in) | string |
Request method:POST
Callback address: specified when the merchant sets in the background or submits payment
Details:
After the customer pays successfully, the system will send a notification to the order callback address please respond to the uppercase SUCCESSwhen receiving the callback successfully, otherwise the system will send 6 callback notifications at most for each order.
Example of the return:
ciphertext=wwlputO3AfKyi9AqnUm%2FY9c%2FZ8T4S1A%2FJ96k5SR8oCs03%2FuNU%2BlbJltxnqhdPep%2BciYqLcA2CxtD1FC0ChuONB2grI1DCYO181rGtSCibgxGMWjeUJNxyBx9qQFf5GGwORvDEuW%2BAAgEF2GFxVWgAlbARc2k%2BR%2BUXiUhY6YOefPMG5fG3yaysftDvOvGO6xgPix49WS88bOKGENY9sM4snonLoy8eBju5zWPlLXEiPv8n2pVVcgdGTNAKZ5j9yzSzYzMvTXo6js%2Fud3Zs1S5Nt40g6NONl7ifqv0YKFsEfhNMM16dvfxYL2s5%2Ffrw2HCPdgRwELemiI6P8DsjHZREp7ErBkaHaPGjvnubXA%2BKB7e%2FmKIYCtOQGIfP1fzlxdDn2xoNcjUi80qog60x%2BoDBFLx620I0NBox8Mj9VqDRQ2V1kqOrfOxtnjkIEINkO9Y1rUt420TvD6QGq6OaNRxNaSlG3gYmHYNj8yzyf%2BSfzNBKpw6jEM6yNb5O4ua8rX%2B
Received value | Describe | Type |
---|---|---|
ciphertext | Ciphertext encrypted by platform with private key | string |
The merchant uses the public key provided by the platform to decrypt ciphertext and get the following parameters:
{
"requestid": "1624438261194",
"amount": 100,
"subamount": 100,
"paytime": "2021-06-13 16:51:49",
"merchantid": 887082,
"orderno": "1624438286359773",
"paystatus": 1,
"accNo": "622316****0014",
"timestamp": 1624438320,
"paystatusdesc": "SUCCESS",
"customize1": "TEST",
"customize2": "TEST",
"customize3": "TEST"
}
Ciphertext encapsulates content | Describe | Type |
---|---|---|
requestid | Merchant order number | string |
amount | Payment amount | string |
subamount | Submitted amout | string |
paytime | Time of payment | string |
merchantid | Merchant number | string |
orderno | Payment platform system order number | string |
paystatus | Payment status (1 for: "Payment succeeded."-1 for: "Payment failed."-2 for: "Actual payment amount does not match requested amount."-3 for: "Payment order cancelled."-4 for: "Unknown exception.") | string |
paystatusdesc | Payment status description, string type. When paystatus is-1 or-4, the specific description that may be returned varies according to different payment channels. | string |
setstatus | Settlement status (1 means "settled". 0 means "pending settlement".) | string |
setcurr | Settlement currency | string |
setamount | Settlement amount | string |
accNo | Customer payment card number, if there is no data, it will be an empty string | string |
timestamp | Time stamp (GMT time seconds since January 1, 1970) | string |
customize1 | Custom Content 1 (returned if filled in) | string |
customize2 | Custom Content 2 (returned if filled in) | string |
customize3 | Custom content 3 (returned if filled in) | string |
Request mode: GET/POST
Request address:/pub/pay/records/return
Details:
Order refund interface, which can be used by merchants to submit refund requests and refund a successfully paid order
Header parameter | Type | Required | Describe | Example e.g |
---|---|---|---|---|
Content-Type | string | Yes | It is recommended to fix application/x-www-form-urlencoded | application/x-www-form-urlencoded |
Query parameter | Type | Required | Describe | Example e.g. |
---|---|---|---|---|
access_token | string | Yes | Merchant number, assigned merchant number | 29901 |
ciphertext | string | Yes | The ciphertext obtained by the merchant encrypting JSON with the public key |
Ciphertext encapsulates content | Type | Required | Describe | Example e.g. |
---|---|---|---|---|
orderno | string | No | System order number (used to query orders) | 1622798925426391 |
requestid | string | No | Merchant order number (used to query orders) | 10920180909203400603 |
amount | string | No | Amount (the default is the total payment amount of the order. If the order has been submitted for partial liquidation, the amount will be prompted) | 100 |
cmd | string | No | Operation type "0 automatic, 1 before settlement only, 2 after settlement only (wallet balance is required to be deducted)" (Default is automatic) |
0 |
callback | string | No | Callback address | https://xxxx/callback.jsp |
timestamp | string | No | Time stamp (GMT time seconds since January 1, 1970) | 1536131800 |
Example of the return:
{
"code": "true",
"message": "success"
}
Received value | Describe | Type |
---|---|---|
code | Return value, which indicates success when true and success when false; If true, the request succeeded; Otherwise, the request failed | string |
msg | Prompt message, success means success, otherwise specific error message | string |
Request Mathod:POST
Callback address:Merchat set in the background settings or specify when submit payment
Detailed Description:
Each time the refund status is updated, the system will send a notification to the callback address of the refund, after successfully revice the callback, please response with "SUCCESS",Otherwise for each order, the system will only send callback notifications 6 times at most.
Example of the return:
ciphertext=wwlputO3AfKyi9AqnUm%2FY9c%2FZ8T4S1A%2FJ96k5SR8oCs03%2FuNU%2BlbJltxnqhdPep%2BciYqLcA2CxtD1FC0ChuONB2grI1DCYO181rGtSCibgxGMWjeUJNxyBx9qQFf5GGwORvDEuW%2BAAgEF2GFxVWgAlbARc2k%2BR%2BUXiUhY6YOefPMG5fG3yaysftDvOvGO6xgPix49WS88bOKGENY9sM4snonLoy8eBju5zWPlLXEiPv8n2pVVcgdGTNAKZ5j9yzSzYzMvTXo6js%2Fud3Zs1S5Nt40g6NONl7ifqv0YKFsEfhNMM16dvfxYL2s5%2Ffrw2HCPdgRwELemiI6P8DsjHZREp7ErBkaHaPGjvnubXA%2BKB7e%2FmKIYCtOQGIfP1fzlxdDn2xoNcjUi80qog60x%2BoDBFLx620I0NBox8Mj9VqDRQ2V1kqOrfOxtnjkIEINkO9Y1rUt420TvD6QGq6OaNRxNaSlG3gYmHYNj8yzyf%2BSfzNBKpw6jEM6yNb5O4ua8rX%2B
Received value | Description | Type |
---|---|---|
ciphertext | The ciphertext encrypted by the platform with the private key | string |
The merchant uses the public key provided by the platform to decrypt the ciphertext and get the following parameters:
{
"requestid": "1640940552189",
"orderno": "1640940560602434",
"reforderno": "R1640940560602434B1",
"currency": "CNY",
"amount": 50,
"walletcur": "",
"walletamt": 0,
"amountsurplus": 0,
"cmd": 0,
"addtime": "2021-12-31 16:49:36",
"status": 1,
"audittime": "2021-12-31 16:49:36"
}
ciphertext封装内容 | Description | Type |
---|---|---|
requestid | Merchant Order Number | string |
orderno | System Order Number | string |
reforderno | Refund order number | string |
currency | Currency Received | string |
amount | Amount Received | string |
walletcur | Deduction wallet | string |
walletamt | Amount Deducated | string |
amountsurplus | Available Refund Amount/td> | string |
cmd | Operation Type【1:void、2:refund】 | string |
addtime | Submit time | string |
status | Audit Status(0:Pending、1:Approved、-1:Failed、-2:Cancelled) | string |
audittime | Audit Time | string |
Request mode: GET/POST
Request address:/pub/pay/records/payforanother
Details:
Payment ordering interface, which can be used by merchants to submit payment requests. Payment will usually be reviewed within 1 working day and received within 1 ~ 3 working days.
Header parameter | Type | Required | Describe | Example e.g. |
---|---|---|---|---|
Content-Type | string | Yes | It is recommended to fix application/x-www-form-urlencoded | application/x-www-form-urlencoded |
Query Parameter | Type | Required | Describe | Example e.g. |
---|---|---|---|---|
access_token | string | Yes | Merchant number, assigned merchant number | 29901 |
ciphertext | string | Yes | The ciphertext obtained by the merchant encrypting JSON with the public key |
Ciphertext encapsulates content | Type | Required | Describe | |
---|---|---|---|---|
requestid | string | Yes | Merchant order number | 1622798925426391 |
paypass | string | Yes | Payment password | test1234 |
walletcur | string | Yes | Deduction wallet | USD |
currency | string | Yes | Currency of receipt | CNY |
amount | string | Yes | Amount of collection | 100 |
bankcode | string | Yes | Account Opening bank | ICBC |
banksub | string | Yes | Branch | Beijing Chaoyang Branch |
bankname | string | Yes | Account name | Zhang San |
bankcard | string | Yes | Card number | 9876543210 |
bankcountry | string | No | Account opening country | China |
bankprovince | string | No | Account opening province | Beijing |
bankcity | string | No | City of opening an account | Beijing |
callback | string | No | Callback address | https://xxxx/callback.jsp |
timestamp | string | No | Time stamp (GMT time seconds since January 1, 1970) | 1536131800 |
Example of the return:
{
"code": "true",
"message": "success"
}
Received value | Describe | Type |
---|---|---|
code | Return value,which indicates success when true and success when false; If true, the request succeeded; Otherwise, the request failed | string |
msg | Prompt message, success means success, otherwise specific error message | string |
Request Method:POST
Callback address: specified when merchant's background setting or payment is submitted
Detailed description:
After the payment is approved and the transfer is successful, the system will send a notification to the callback address of the payment order respectivelyPlease respond to uppercase SUCCESS if the callback is successfully receivedOtherwise, the system will send up to 6 callback notifications per order.
The example of returns:
ciphertext=wwlputO3AfKyi9AqnUm%2FY9c%2FZ8T4S1A%2FJ96k5SR8oCs03%2FuNU%2BlbJltxnqhdPep%2BciYqLcA2CxtD1FC0ChuONB2grI1DCYO181rGtSCibgxGMWjeUJNxyBx9qQFf5GGwORvDEuW%2BAAgEF2GFxVWgAlbARc2k%2BR%2BUXiUhY6YOefPMG5fG3yaysftDvOvGO6xgPix49WS88bOKGENY9sM4snonLoy8eBju5zWPlLXEiPv8n2pVVcgdGTNAKZ5j9yzSzYzMvTXo6js%2Fud3Zs1S5Nt40g6NONl7ifqv0YKFsEfhNMM16dvfxYL2s5%2Ffrw2HCPdgRwELemiI6P8DsjHZREp7ErBkaHaPGjvnubXA%2BKB7e%2FmKIYCtOQGIfP1fzlxdDn2xoNcjUi80qog60x%2BoDBFLx620I0NBox8Mj9VqDRQ2V1kqOrfOxtnjkIEINkO9Y1rUt420TvD6QGq6OaNRxNaSlG3gYmHYNj8yzyf%2BSfzNBKpw6jEM6yNb5O4ua8rX%2B
Received value | Describe | Type |
---|---|---|
ciphertext | Ciphertext encrypted by platform with private key | string |
The merchant uses the public key provided by the platform to decrypt ciphertext and get the following parameters:
{
"requestid": "1639724634951",
"orderno": "W1639724632326999",
"walletcur": "USD",
"currency": "MYR",
"walletamt": 12.2,
"amount": 50,
"rate": 4.099,
"addtime": "2021-12-17 15:03:52",
"status": 1,
"audittime": "2021-12-17 15:25:00",
"paystatus": 1,
"wdrtime": "2021-12-17 16:21:25",
"bankcode": "",
"banksub": "",
"bankname": "Customer Name",
"bankcard": "10000001",
"bankcountry": "Malaysia",
"bankprovince": "",
"bankcity": "Kuala Lumpur"
}
Ciphertext encapsulates content | Describe | Type |
---|---|---|
requestid | Merchant order number | string |
orderno | System order number | string |
walletcur | Deduction wallet | string |
currency | Currency of receipt | string |
walletamt | Deduction amount | string |
amount | Collection amount | string |
rate | Payment rate | string |
addtime | Time of submission | string |
status | Audit status(0:Pending、1:Approved、-1:Failed) | string |
audittime | Audit time | string |
paystatus | Transfer status(0:Untransferred、1:Transferred) | string |
wdrtime | Transfer time | string |
bankcode | Account opening bank | string |
banksub | Branch | string |
bankname | Account name | string |
bankcard | Card number | string |
bankcountry | Account opening Country | string |
bankprovince | Account opening Province | string |
bankcity | Account opening City | string |
Request mode: GET/POST
Request address:/pub/pay/records/query
Detailed Instruction:
Payment status query interface, through which business applications can query the status of payment orders to update the order payment status of business parties; The business party can also monitor the payment result notification sent by the payment platform and update the payment status of the business system.
Header parameter | Type | Required | Describe | Example e.g. |
---|---|---|---|---|
Content-Type | string | Yes | It is recommended to fix application/x-www-form-urlencoded | application/x-www-form-urlencoded |
Query parameter | Type | Required | Describe | Example e.g. |
---|---|---|---|---|
access_token | string | Yes | Merchant number, assigned merchant number | 29901 |
ciphertext | string | Yes | The ciphertext obtained by the merchant encrypting JSON with the public key |
Ciphertext encapsulates content | Type | Required | Describe | Example e.g |
---|---|---|---|---|
orderno | string | No | System order number (used to query orders) | 1622798925426391 |
requestid | string | No | Merchant order number (used to query orders) | 10920180909203400603 |
timestamp | string | No | Time stamp (GMT time seconds since January 1, 1970) | 1536131800 |
Example of the return:
{
"code": "true",
"message": "success",
"data": ciphertext,
}
Received value | Describe | Type |
---|---|---|
code | Return value, which indicates success when true and success when false; If true, the request succeeded; Otherwise, the request failed | string |
msg | Prompt message, success means success, otherwise specific error message | string |
data | Ciphertext encrypted by platform with private key | string |
The merchant uses the public key provided by the platform to decrypt ciphertext and get the following parameters:
[
{
"requestid": "1624438261194",
"amount": 100,
"subamount": 100,
"paytime": "2021-06-13 16:51:49",
"merchantid": 887082,
"orderno": "1624438286359773",
"paystatus": 1,
"accNo": "622316****0014",
"amountsurplus": 100,
"timestamp": 1624439865,
"paystatusdesc": "SUCCESS",
"setstatus": 0,
"setcurr": "",
"setamount": "",
"customize1": "TEST",
"customize2": "TEST",
"customize3": "TEST"
}
]
Ciphertext encapsulates content | Describe | Type |
---|---|---|
requestid | Merchant order number | string |
amount | Payment amount | string |
subamount | Amount submitted | string |
paytime | Time of payment | string |
merchantid | Merchant number | string |
orderno | Payment platform system order number | string |
paystatus | Payment status (1 for: "Payment succeeded."-1 for: "Payment failed."-2 for: "Actual payment amount does not match requested amount."-3 for: "Payment order cancelled."-4 for: "Unknown exception.") | string |
paystatusdesc | Payment status description, string type. When paystatus is-1 or-4, the specific description that may be returned varies according to different payment channels. | string |
accNo | Customer payment card number, if there is no data, it will be an empty string | string |
setstatus | Settlement status (0: Unsettled. 1: Settled) | string |
setcurr | Settlement currency, blank if not settled | string |
setamount | Settlement Amount; blank if not settled | string |
timestamp | Time stamp (GMT time seconds since January 1, 1970) | string |
customize1 | Custom Content 1 (returned if filled in) | string |
customize2 | Custom Content 2 (returned if filled in) | string |
customize3 | Custom content 3 (returned if filled in) | string |
Request mode: GET/POST
Request address:/pub/pay/records/refund/query
Details:
Interface for querying order refund status.
Header parameter | Type | Required | Describe | Example e.g. |
---|---|---|---|---|
Content-Type | string | Yes | It is recommended to fix application/x-www-form-urlencoded | application/x-www-form-urlencoded |
Query parameter | Type | Required | Describe | Example e.g. |
---|---|---|---|---|
access_token | string | Yes | Merchant number, assigned merchant number | 29901 |
ciphertext | string | Yes | The ciphertext obtained by the merchant encrypting JSON with the public key |
Ciphertext encapsulates content | Type | Required | Describe | Example e.g. |
---|---|---|---|---|
orderno | string | No | System order number (used to query orders) | 1622798925426391 |
requestid | string | No | Merchant order number (used to query orders) | 10920180909203400603 |
reforderno | string | No | Refund order number (used to query orders) | R1622798925426391B1 |
timestamp | string | No | Time stamp (GMT time seconds since January 1, 1970) | 1536131800 |
Example of the return:
{
"code": "true",
"message": "success",
"data": ciphertext,
}
Received value | Describe | Type |
---|---|---|
code | Return value, which indicates success when true and success when false; If true, the request succeeded; Otherwise, the request failed | string |
msg | Prompt message, success means success, otherwise specific error message | string |
data | Ciphertext encrypted by platform with private key | string |
The merchant uses the public key provided by the platform to decrypt ciphertext and get the following parameters:
[
{
"merchantid": 887082,
"requestid": "1624438261194",
"orderno": "1624438286359773",
"reforderno": "R1624438286359773B1",
"addtime": "2021-4-14 15:09:44",
"audittime": "2021-4-14 16:11:19",
"cmd": 1,
"refundamount": 100,
"deductamount": 15.53,
"refundcurrency": "CNY",
"deductcurrency": "USD",
"status": 1
},
{
"merchantid": 887082,
"requestid": "1624438261194",
"orderno": "1624438286359773",
"reforderno": "R1624438286359773B2",
"addtime": "2021-4-14 15:09:44",
"audittime": "2021-4-14 16:11:19",
"cmd": 1,
"refundamount": 100,
"deductamount": 15.53,
"refundcurrency": "CNY",
"deductcurrency": "USD",
"status": 1
}
]
Ciphertext encapsulates content | Describe | Type |
---|---|---|
merchantid | Merchant ID | string |
requestid | Payment order merchant order number | string |
orderno | Payment order system order number | string |
reforderno | Refund order number | string |
addtime | Application time | string |
audittime | Audit time | string |
cmd | Operation type "0: Void, 1: Refund, 2: Ahead" | string |
refundamount | Refund amount | string |
deductamount | Deduction amount | string |
refundcurrency | Refund currency | string |
deductcurrency | Deduction currency | string |
Status"-1: Refund failed, 0: Pending approval, 1: Refund successful" | Status | string |
Request mode: GET/POST
Request address:/pub/pay/records/payforanother/query
Details:
Interface for querying payment order status.
Header parameter | Type | Required | Describe | Example e.g. |
---|---|---|---|---|
Content-Type | string | Yes | It is recommended to fix application/x-www-form-urlencoded | application/x-www-form-urlencoded |
Query parameter | Type | Required | Describe | Example e.g. |
---|---|---|---|---|
access_token | string | Yes | Merchant number, assigned merchant number | 29901 |
ciphertext | string | Yes | The ciphertext obtained by the merchant encrypting JSON with the public key |
Ciphertext encapsulates content | Type | Required | Describe | Example e.g. |
---|---|---|---|---|
orderno | string | No | System order number (used to query orders) | 1623403856822249 |
requestid | string | No | Merchant order number (used to query orders) | 1623403847078 |
timestamp | string | No | Time stamp (GMT time seconds since January 1, 1970) | 1536131800 |
Example of the return:
{
"code": "true",
"message": "success",
"data": ciphertext,
}
Received value | Describe | Type |
---|---|---|
code | Return value, which indicates success when true and success when false; If true, the request succeeded; Otherwise, the request failed | string |
msg | Prompt message, success means success, otherwise specific error message | string |
data | Ciphertext encrypted by platform with private key | string |
The merchant uses the public key provided by the platform to decrypt ciphertext and get the following parameters:
[
{
"merchantid":887082,
"addtime": "2021-06-13 16:51:49",
"auditdate": "2021-06-13 16:53:39",
"orderno": "1623403856822249",
"requestid": "1623403847078",
"deductcurrency": "USD",
"deductamount": 15.35,
"receivingcurrency": "CNY",
"receivingamount": 100,
"feerate": 7.04,
"status": 1,
"paystatus": 1,
"bank": "Bank of China",
"banksub": "Shanghai branch",
"bankname": "TEST",
"bankcard": "TEST",
"bankcountry": "China",
"bankprovince": "TEST",
"bankcity": "TEST",
"auditexplain": "TEST",
}
]
Ciphertext encapsulates content | Describe | Type |
---|---|---|
merchantid | Merchant ID | string |
addtime | Application time | string |
audittime | Audit time | string |
orderno | Payment system order number | string |
requestid | Payment merchant order number | string |
deductcurrency | Deduction wallet | string |
deductamount | Deduction amount | string |
receivingcurrency | Currency of receipt | string |
receivingamount | Amount of collection | string |
feerate | Handling fee | string |
status | Status "0:Pending approval, 1: Approval passed, 2: Approval failed" | string |
paystatus | Transfer status "0: No Transfer, 1: Transferred" | string |
bank | Name of Bank | string |
banksub | Bank branch | string |
bankname | Account name | string |
bankcard | Receiving account | string |
bankcountry | Account opening country | string |
bankprovince | Account opening province | string |
bankcity | City of opening an account | string |
auditexplain | Cause | string |
Request mode: GET/POST
Request address:/pub/pay/records/rate/query
Details:
If the optional parameter currency is used when placing an order, currency conversion will be carried out automatically (please consult our company if you need to turn on this function to use it). This interface is used to query the exchange rate to be used for currency conversion, so that the amount to be paid will be displayed in advance on your payment page.
Header parameter | Type | Required | Describe | Example e.g. |
---|---|---|---|---|
Content-Type | string | Yes | It is recommended to fix application/x-www-form-urlencoded | application/x-www-form-urlencoded |
Query parameter | Type | Required | Describe | Example e.g. |
---|---|---|---|---|
access_token | string | Yes | Merchant number, assigned merchant number | 29901 |
ciphertext | string | Yes | The ciphertext obtained by the merchant encrypting JSON with the public key |
Details:
Query the exchange rate used in the single currency conversion function of our company
Ciphertext encapsulates content | Type | Required | Describe | Example e.g. |
---|---|---|---|---|
currency | string | No | Original currency | USD |
aimcurrency | string | No | Target currency | RM |
timestamp | string | Yes | Time stamp (GMT time seconds since January 1, 1970) | 1536131800 |
Example of the return:
{
"code": "true",
"message": "success",
"data": {
"USDRM":"4.12",
}
}
Received value | Describe | Type |
---|---|---|
code | Return value, which indicates success when true and success when false; If true, the request succeeded; Otherwise, the request failed | string |
message | Prompt message, success means success, otherwise specific error message | string |
data | Main data | string |
Request method: GET / POST
Request address: /pub/pay/payforanother/amount/conversion
Detailed Description
The currency of the amount submitted by the proxy payment interface is the currency of the actual payment, not the currency of the deduction from your wallet balance. If you want to specify the debit amount in your wallet, you can use this interface to automatically convert the expected payment amount for you.
Header Parameters | Type | Required | Describe | Example e.g. |
---|---|---|---|---|
Content-Type | string | Yes | Suggest pass in the fixed format as application/x-www-form-urlencoded | application/x-www-form-urlencoded |
Query Parameters | Type | Required | Describe | Example e.g. |
---|---|---|---|---|
access_token | string | Yes | Merchant number, assigned merchant number | 29901 |
ciphertext | string | Yes | The merchant encrypte JSON with the public key to obtain ciphertext |
ciphertext encapsulated content | Type | Required | Describe | Example e.g. |
---|---|---|---|---|
deductcurrency | string | No | Deduction currency | USD |
receivingcurrency | string | No | Collection currency | CNY |
walletamt | string | No | Deduction amount | 100 |
timestamp | string | Yes | Time stamp (GMT time seconds since January 1, 1970) | 1536131800 |
Return example:
{
"deductcurrency": "USDT",
"receivingcurrency": "CNY",
"walletamt": "100",
"feerate": "10.0000",
"amount": "612.33"
}
Response value | Describe | Type |
---|---|---|
deductcurrency | Deduction currency | string |
receivingcurrency | Collection currency | string |
walletamt | Deduction amount | string |
amount | Collection amount(Transferred Amount, can be used for submit proxy payment) | string |
feerate | Commission charge | string |
Request mode: GET
Request address:/tools.php
Details:
On-line encryption and decryption interface is used to replace the original encryption and decryption class for on-line encryption and decryption when it is inconvenient or impossible to use the original source code for RSA encryption and decryption in some language environments. (For example, ASP, please refer to ASP Demo of our company)
Encryption Request Sample
cmd=1&pubkey=-----BEGIN%20PUBLIC%20KEY-----%5CnMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCxZFhu7Yp4T3PS%2Fiech%2FafqyCA%5CnTQhypE2dacgY2wDepP6S1xe1s4RDhrfYl1LnN5VaSrl1w8SXqZkXVl9P3Qj9MAon%5CnhBCH1NdHekLdcKxCcOW9Vjd6HSsTGVxvi5Tjug%2BIh66mtNHkC0ZxcagpgfyarJeQ%5CnhI5So1g1a8C7C6eoqwIDAQAB%5Cn-----END%20PUBLIC%20KEY-----&key1=value1&key2=value2&key3=value3
Decryption Request Sample
cmd=2&pubkey=-----BEGIN%20PUBLIC%20KEY-----%5CnMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCxZFhu7Yp4T3PS%2Fiech%2FafqyCA%5CnTQhypE2dacgY2wDepP6S1xe1s4RDhrfYl1LnN5VaSrl1w8SXqZkXVl9P3Qj9MAon%5CnhBCH1NdHekLdcKxCcOW9Vjd6HSsTGVxvi5Tjug%2BIh66mtNHkC0ZxcagpgfyarJeQ%5CnhI5So1g1a8C7C6eoqwIDAQAB%5Cn-----END%20PUBLIC%20KEY-----&ciphertext=fcoJYQ%2BVG3xs9fTrvSGwkSlfjL8yTkTLN695bT96Y646PR%5C%2F2rADftdkyB0j3%5C%2FhbNjAljwv2P%5C%2FvJlunfu8KZBNYYxm1tTr9O75vy3GOI3vDT%2BWzzrf0ZJ8b9%5C%2FcxoRrIZ%5C%2FcBaRqCcx%2Batzcrjjy32x0kkxP0JicMWJwN1vSCKMnB0%3D
Received value | Describe | Type |
---|---|---|
pubkey | Merchant public key (UrlEncode processing required) | string |
cmd | Operation type, optional [1, 2]. 1. Encryption; Step 2.Decrypt | number |
key=value | When cmd=1: data to be encrypted, all fields except pubkey and cmd are regarded as data to be encrypted, and the POST parameter transfer rule is followed | string |
ciphertext | When Cmd=2: Ciphertext to be decrypted, required when operation type is decryption. (UrlEncode processing required) | string |
Request method: POST
Request address:/tools/encryption
Details:
On-line encryption and decryption interface is used to replace the original encryption and decryption class for on-line encryption and decryption when it is inconvenient or impossible to use the original source code for RSA encryption and decryption in some language environments. (For example, ASP, please refer to ASP Demo of our company)
Encryption Request Sample
cmd=1&pubkey=LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlHZk1BMEdDU3FHU0liM0RRRUJBUVVBQTRHTkFEQ0JpUUtCZ1FDKzJ5UVZQQ0RzT0Exa3ViTjIwWXVLNTlWVgpNT0pQOGpWcXNBMEY4ZUFkb3NnTHQvWVFDRGRXdWlLMERMRytxanoyd2dVVFdNMDM5MVRSWGhkVVBGcUNHaFY5CjBpamJaOWEwQmJJMmZHWHNrMXpEall2TlRBeUg0Ui9ibWc0ejFucEE3UWJacEl2NjNFNFcvMUpyOW8xT2VQQTMKTVViRkQwcDJudVBMRXE5RW9RSURBUUFCCi0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLQ==&plaintext=dGVzdA==
Decryption Request Sample
cmd=2&pubkey=LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlHZk1BMEdDU3FHU0liM0RRRUJBUVVBQTRHTkFEQ0JpUUtCZ1FDKzJ5UVZQQ0RzT0Exa3ViTjIwWXVLNTlWVgpNT0pQOGpWcXNBMEY4ZUFkb3NnTHQvWVFDRGRXdWlLMERMRytxanoyd2dVVFdNMDM5MVRSWGhkVVBGcUNHaFY5CjBpamJaOWEwQmJJMmZHWHNrMXpEall2TlRBeUg0Ui9ibWc0ejFucEE3UWJacEl2NjNFNFcvMUpyOW8xT2VQQTMKTVViRkQwcDJudVBMRXE5RW9RSURBUUFCCi0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLQ==&ciphertext=TjV3SkpZVDR3STlXcEQ5UzhuVG1pdkxwaHVwbU9uM21Tb0p5S3BWeEdtY3FuaGlKV2hLOHhYbHp2VktOQzJLZTVIbXdCRDZaQjYzK0JUYTZUNzlrQlIwb0ZlWThNNGJxM2poRHB5U3VrQ2hnMGVuNitxc0lwNGtqS0ptckNnYXlhTnUyMVoxdXl2R1ZKYlREU3dRbVVwbnRqdWVCTVFZSVBQcTh0czNneDVRPQ==
Received value | Describe | Type |
---|---|---|
pubkey | Merchant public key(Base64 encoding is required) | string |
cmd | Operation type,optional [1, 2]. 1.Encryption; Step 2 Decrypt | number |
plaintext | When cmd=1: plaintext to be encrypted, required when cmd is 1 (Base64 encoding is required) | string |
ciphertext | When cmd=2: Ciphertext to be decrypted, required when cmd is 2 (Base64 encoding is required) | string |