It is necessary to package the data in the parameter table into JSON strings and use rsa for parameter encryption and signature as data and sign in the body
Headers
Name
Type
Description
Content-Type *
String
application/json
Request Body
Name
Type
Description
app_id*
String
Merchant AppKey
sign*
String
data*
String
time*
String
{"code": "",//Return code "msg": "",//Success or failure message "data": "","sign": ""}data:{"orderNum":"xxxx"//Order Number }
The following are the parameters involved in rsa encryption:
name
type
required
example
Description
appOrderId
String
YES
11321
Merchant Order ID
openId
String
YES
2ae04ed9165624419bad68e9e0f3f29fbd
Paying user's unique ID: payerUserId
userId
String
YES
22033390
Paying user's UID (either UID or OpenID must exist, OpenID takes priority if both exist): payerUid
orderAmount
String
YES
10
amount
orderSceneType
String
NO
1000011
Scene type of the order, numerical enumeration
payCoinSymbol
String
YES
BTC
Payment currency, capitalized as BTCappKey
returnPage
String
YES
https://www.google.com
Front-end jump to merchant's page
notifyPage
String
YES
https://www.google.com
Address for back-office notification to merchants
token
String
NO
2ae04ed9165624419bad68e9e0f3f29fbd
Authorized token
goods
String
NO
Product description information, can not be passed, passed must be legal json format, otherwise the order creation failure; json in the subfield for name : product name desc: product description Example: [{"name": "Product 1", "desc": "Product information 123balabala"},{"name": "Product 2", "desc":" Product information 23balabala"},{"name": "Product 3", "desc": "Product information 33balabala"}]
Platform number payer openId, must be the order creator
openId
String
payer openId, must be the order creator
userId
String
Payment user uid (one must exist with openid)
token
String
Authorized token
parameters:
Either UID or OpenID is required.
name
type
required
example
Description
orderNum
String
YES
1000000009
Platform number payer openId, must be the order creator
openId
String
NO
2ae04ed9165624419bad68e9e0f3f29fbd
payer openId, must be the order creator
userId
String
NO
2023203
Payment user uid (one must exist with openid)
token
String
NO
2ae04ed9165624419bad68e9e0f3f29fbd
Authorized token
Step 3
Payment result callback interface
POSThttps://service.xxx.com/notifyPage
The interface URL is provided by the docking merchant, and the parameter passed in the first step of creating the order: notifyPage After the payment is completed, the payment result will be notified through the URL corresponding to the notifyPage
It is necessary to package the data in the parameter table into JSON strings and use rsa for parameter encryption and signature as data and sign in the body
Headers
Name
Type
Description
Content-Type*
String
application/json
Request Body
Name
Type
Description
app_id*
String
Merchant AppKey
sign*
String
Signature
data*
String
time*
String
The following are the parameters involved in rsa encryption:
name
type
required
example
Description
outOrderId
String
YES
1000000009
Merchant side order number
orderNum
String
YES
10000000002
Open Platform Order Number
orderStatus
String
YES
1
Order status (1 Pending payment; 2 Payment failed; 3 Payment successful; 0 Closed)
It is necessary to package the data in the parameter table into JSON strings and use rsa for parameter encryption and signature as data and sign in the body
It is necessary to package the data in the parameter table into JSON strings and use rsa for parameter encryption and signature as data and sign in the body
Headers
Name
Type
Description
Content-Type *
String
application/json
Request Body
Name
Type
Description
app_id*
String
Merchant AppKey
sign*
String
Signature
data*
String
time*
String
The following are the parameters involved in rsa encryption:
name
type
required
example
Description
orderType
String
YES
1
Order type (1=payment order; 11=transfer order), do not pass query all orders
day
String
YES
2099-01-01
Statistics of the date, the format: yyyy-MM-dd, does not match the format parameter exception; does not pass the query the order of the day
pageNum
String
YES
1
Query the first few pages, the same paging logic; do not pass to check all
pageSize
String
YES
200
The size of each page, the same paging logic; do not pass to check 2000 (the maximum is 2000, data more than 2000 please paging query)
Cancel Pending Orders
Cancel Pending Orders
POSThttps://service.xxx.com/opay/cancelOrder
It is necessary to package the data in the parameter table into JSON strings and use rsa for parameter encryption and signature as data and sign in the body
Headers
Name
Type
Description
Content-Type *
String
application/json
Request Body
Name
Type
Description
app_id*
String
Merchant AppKey
time*
String
data*
String
sign*
String
The following are the parameters involved in rsa encryption:
{
"code": "", //Return code
"msg": "", //Success or failure message
"data": "",//The client receives the request and returns success, which means the request has been received
"sign":""
}
{
"totalAccount": [ // List of all accounts supported by the merchant
{
"accountName": "name", // Account name (displayed in the dropdown menu)
"accountType": 202001, // Account type (equivalent to the ID to be passed back to the backend)
"accountBalance": 1000.21 // Balance of the account for the payment user
},
{
"accountName": "name",
"accountType": 203001,
"accountBalance": 1000.21
}
],
"googleStatus": 1, // Whether Google verification is enabled; 0 - Disabled, 1 - Enabled
"appOrderId": "100000009", // Merchant order ID
"sign": "2ae04ed9165624419bad68e9e0f3f29fbdqws2ae04ed9165624419bad68e9e0f3f29fbd", // Signature
"orderNum": "12321", // Order number
"orderStatus": "1", // Order status (1 - Pending payment; 2 - Payment failed; 3 - Payment successful; 0 - Closed)
"userId": 230000, // User ID
"isOpenMobileCheck": "1", // Whether mobile SMS verification is enabled; 0 - Disabled, 1 - Enabled
"orderAmount": "20001.21", // Order amount
"payCoinSymbol": "btc", // Payment currency
"ctime": "20000000",
"appKey": "xxx_xxx",
"showPrecision": "8" // Display precision
}
{
"code": "",
"msg": "",
"data": "",
"sign: ""
}
data
{
"count": 1000, // Total number of records for the day
"list": [
{
"merchantUserId": 23000, // Merchant's receiving user ID
"appOrderId": "100000019", // Merchant's order ID
"payCoinSymbol": "btc", // Payment currency used
"orderAmount": 10, // Order amount
"orderType": 1, // Order type (1 - Payment order; 11 - Transfer (refund) order)
"userId": 230000, // Payer's user ID
"openId": "2ae04ed9165624419bad68e9e0f3f29fbd", // Payer's OpenID
"createTime": "11200321123", // Order creation time in milliseconds
"payTime": "320012321" // Actual payment completion time in milliseconds
},
{
"merchantUserId": 23000, // Merchant's receiving user ID
"appOrderId": "100000019", // Merchant's order ID
"payCoinSymbol": "btc", // Payment currency used
"orderAmount": 10, // Order amount
"orderType": 1, // Order type (1 - Payment order; 11 - Transfer (refund) order)
"userId": 230000, // Payer's user ID
"openId": "2ae04ed9165624419bad68e9e0f3f29fbd", // Payer's OpenID
"createTime": "11200321123", // Order creation time in milliseconds
"payTime": "320012321" // Actual payment completion time in milliseconds
}
]
}