Payments
Step 1
Create a payment order
POST
https://service.xxx.com/platformapi/chainup/open/opay/createThirdOrder
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 |
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"}] |
Step 2
Payment Page
GET
https://service.xxx.com/platform/pay.html
After the final payment page is assembled as: https://service.xxx.com/platform/pay.html?appKey=xxx&openId=xxx&token=xxx&orderNum=xxx
Query Parameters
Name | Type | Description |
---|---|---|
appKey | String | Merchant AppKey |
orderNum | String | 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
POST
https://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) |
payAmount | String | YES | 200 | Order amount |
returnUrl | String | YES | https://www.google.com | Synchronized notification page (order placement interface incoming) |
Query Payment Order
Query Payment Order
POST
https://service.xxx.com/platformapi/chainup/open/opay/orderDetail
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 |
---|---|---|
appKey* | String | Merchant AppKey |
orderNum* | String | Platform side order number |
token | String | Authorized token |
parameters :
name | type | required | example | Description |
---|---|---|---|---|
appKey | String | YES | xxx_xxx | Merchant AppKey |
orderNum | String | YES | 10000000002 | Platform side order number |
token | String | NO | 2ae04ed9165624419bad68e9e0f3f29fbd | Authorized token |
Merchant Daily Posting Statement
Merchant Daily Posting Statement
POST
https://service.xxx.com/platformapi/chainup/open/opay/merchantBillingDay
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
POST
https://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:
name | type | required | example | Description |
---|---|---|---|---|
orderNum | String | YES | 10000001 | 订单编号 |
Last updated