NPay for en
1. Buy
1.1 Interface description
1.1.1 Request url
1.1.2 Request method
POST request、form-data format
1.2 Buy request
use:Create order return: Jump url and other information
1.2.1 Params description
order_id
String
Yes
32
sole number
20201030_12345678
order_amount
String
Yes
40
unit: Yuan
10000
sys_no
String
Yes
255
merchant number
610001
user_id
String
Yes
50
Customer unique identification, prevent customers from repeatedly click into the golden brush order
998877
order_ip
String
Yes
50
IP address where the customer placed the order
192.32.85.1
order_time
Date
Yes
32
Order request time
2022-10-30 17:56:45
sign
String
Yes
32
Signature. For details, see Signature specifications
308ae218753596c9ec37a9e8b58fe4d8
pay_user_name
String
Yes
32
Pay name
zhang san
1.2.2 Signature specification
sign = md5(order_amount&order_id&order_ip&order_time&pay_user_name&sys_no&user_id+signKey)
**Notice:
Parameters are sorted in ascending order
urlencodeis applied to thevalueof all parametersParameters are concatenated using
&,signKeyconcatenates directly at the end without&signKeyis theaccess keyin the API interface of the merchant background**
1.2.3 Signature example
signKey:
8b026795f25458920ec1ce2249ef3sa4
Params:
The concatenated string to be encrypted:
The value after md5:
308ae218753596c9ec37a9e8b58fe4d8
1.2.4 Request example(JS)
Successful return:
2. callback
2.1 Receive callback description
2.1.1 Request url
商户后台API接口——>接口设置——>设置成功和取消的回调接收地址(如有疑问请联系客服)
2.1.2 Request method
POST传参、form-data格式
2.2 Cancel pay
2.2.1 Params description
bill_no
String
Yes
32
The unique order number, the order_id sent to the merchant when placing the order
20201030_12345678
bill_status
Int
Yes
1
Order status:1= order cancel;2= order activated
1
sys_no
String
Yes
32
Merchant number
610001
sign
String
Yes
32
Signature, refer to the signature inspection specification
5c37d8e60817409aedd356b3356d21a4
2.2.2 Inspection specification
sign = md5(bill_no&bill_status&sys_no+signKey)
Tips:
1.Parameters are sorted in ascending order
2.Performs urlencode on the value of all arguments
3.Parameters are concatenated with &, signKey is concatenated directly at the end without &
4.signKey is the callback key in the API interface of the merchant background
2.2.3 Check sample
signKey:
8b026795f25458920ec1ce2249efasd9
Parameters:
String to be encrypted after concatenation:
md5 value:
5c37d8e60817409aedd356b3356d21a4
The merchant needs to respond to the request: true return:success false return:fail
2.3 Successful payment
2.3.1 Parameter Description
bill_no
String
yes
32
Unique order number,The order_id sent by the merchant when placing an order
20221030_1667123805
amount
String
yes
11
Order amount
1000
amount_usdt
String
yes
11
Usdt Number
135.1351
sys_no
String
yes
32
Merchant number
610001
sign
String
yes
32
signature,Refer to the visa inspection specification
de195748b75941daa1f2e8e82d52e7d4
2.3.2 Inspection specification
sign = md5(bill_no+signKey)
attention:
1.Parameters are sorted in ascending order
2.Parameters are concatenated with &, signKey is concatenated directly at the end without &
3.’signKey’ is the ‘callback key’ in the API interface of the merchant background
2.3.3 Sample check
signKey:
8b026795f25458920ec1ce2249efasd9
Parameter:
The concatenated string to be encrypted:
md5 value:
de195748b75941daa1f2e8e82d52e7d4
The merchant needs to respond to the request: true return:success false return:fail
3. Sell
3.1 Instance instructions
3.1.1 Requst address
3.1.2 Request type
POST、form-data
3.2 Sell request
3.2.1 Parameters instructions
data
Array
yes
5000
[{user_name:张三……},{user_name:李四……},{}]
user_name
String
yes
real name
张三
bankcard_no
String
yes
card number
123456
serial_no
String
no
order number
1234
bank_address
String
yes
card address
XX银行xx支行
amount
String
yes
amount
10000
sys_no
String
yes
6
sys_no
610001
sign
String
yes
32
signatures for sample
42052bbef7854537fff49db5d2861cd0
3.2.2 Signatures rule
sign = md5(data + sys_no + signKey)
**1.signKey is the access key obtained in the background API interface of the merchant
2.Parameters are directly concatenated
**
3.2.3 Signatures example
key:
1200f9e06e4cbbb34bf0c5c5ec78deedParmaters:
Befor MD5 value:
After MD5 value:
42052bbef7854537fff49db5d2861cd0
require success return:
3.2.4 require example(JS)
Last updated