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

NameTypeDescription

Content-Type *

String

application/json

Request Body

NameTypeDescription

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:

nametyperequiredexampleDescription

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

NameTypeDescription

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.

nametyperequiredexampleDescription

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

NameTypeDescription

Content-Type*

String

application/json

Request Body

NameTypeDescription

app_id*

String

Merchant AppKey

sign*

String

Signature

data*

String

time*

String

{
    "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":""      
}

The following are the parameters involved in rsa encryption:

nametyperequiredexampleDescription

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

NameTypeDescription

Content-Type *

String

application/json

Request Body

NameTypeDescription

appKey*

String

Merchant AppKey

orderNum*

String

Platform side order number

token

String

Authorized token

{
        "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
}

parameters :

nametyperequiredexampleDescription

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

NameTypeDescription

Content-Type *

String

application/json

Request Body

NameTypeDescription

app_id*

String

Merchant AppKey

sign*

String

Signature

data*

String

time*

String

{
  "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
            }
        ]
    }

The following are the parameters involved in rsa encryption:

nametyperequiredexampleDescription

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

NameTypeDescription

Content-Type *

String

application/json

Request Body

NameTypeDescription

app_id*

String

Merchant AppKey

time*

String

data*

String

sign*

String

{
    // Response
}

The following are the parameters involved in rsa encryption:

nametyperequiredexampleDescription

orderNum

String

YES

10000001

订单编号

Last updated