The object definitions which have been used in API endpoints.
API payload definitions
Request payload
POST HTTP/1.1
Content-Type: application/json
{
"merchantId": "string",
"method": "string",
"format": "string",
"charset": "string",
"encryptType": "string",
"signType": "string",
"sign": "string",
"timestamp": "Number",
"body": "<encrypted body string>" // the encrypted body string
}
Key | Type | Mandatory? | Length | Description | Example |
---|---|---|---|---|---|
merchantId | string | Yes | 18 | The merchant wallet ID which can be found at merchant wallet: Home->Merchant Information->BIEASES ID | B131567545069 |
method | string | Yes | - | The operation method, refer to Supported operation method for more information. | bieases.trade.create |
format | string | No | - | Supported value: - json (default) | json |
charset | string | No | - | the encoding charset for the request body Supported value: - utf-8 (default) | utf-8 |
encryptType | string | No | - | Message encryption type, supported value: - AES (default) | AES |
signType | string | No | - | The request signature type, supported value: - RSA (default) | RSA |
sign | string | Yes | - | The request body signature string. Refer to Sign a request and verify the signature | hcsZg0q6sLm4gR...PpIg== |
timestamp | Timestamp | Yes | 13 | The timestamp for the request. | 1706585572074 |
body | Object | Yes | - | The encrypted body object string is formatted as 'format' and encrypted with encryptType algorism. | K2AyShlt1...4Q7uWjcvzrvR |
Supported request method
Method Name | Description |
---|---|
bieases.trade.create | Create payment order |
bieases.trade.query | Query payment order |
bieases.trade.callback | Callback payment order |
bieases.trade.cancel | Cancel payment order |
bieases.trade.refund | Refund payment order |
Response payload
200 OK
Content-Type: "application/json"
{
"code": "string",
"msg": "string",
"data": {}
}
Key | Type | Length | Description | Example |
---|---|---|---|---|
code | Number | - | The request status code. Please refer to API Status Code for more information. | 20000 |
msg | String | - | The response status message Regarding the code. | |
data | Object | - | A JSON formatted object. Different requests will have different body definitions please refer to the corresponding API calls. |
Webhook callback payload
Callback payload
Key | Type | Mandatory? | Description | Example |
---|---|---|---|---|
id | GUID | Yes | The callback id for specific event. Each callback has a unique id. | "{432de57b-5ccf-4c66-8656-1f4c22e9ac56}" |
merchantId | string | Yes | The merchant wallet ID which can be found at merchant wallet: Home->Merchant Information->BIEASES ID | B131567545069 |
eventName | string | Yes | Refer to Webhook Event Names for more information | payment.order.success |
format | string | No | Supported value: - json (default) | json |
charset | string | No | the encoding charset for the request body Supported value: - utf-8 (default) | utf-8 |
encryptType | string | No | Message encryption type, supported value: - AES (default) | AES |
signType | string | No | The request signature type, supported value: - RSA (default) | RSA |
sign | string | Yes | The request body signature string. Refer to Sign a request and verify the signature | hcsZg0q6sLm4gR...PpIg== |
timestamp | Timestamp | Yes | The timestamp for the request. | 1706585572074 |
body | string | Yes | The encrypted payment result object string. Refer to Payment result object | K2AyShlt1...4Q7uWjcvzrvR |
Payment order status
Order status created via Create Payment
Status | Description | Note |
---|---|---|
pending | The payment order has been created successfully and waiting for the consumer to pay it. | This result will return synchronous or queried by the query API . |
timeout | The payment order created but hasn't been paid withing given period. | This result will return asynchronous by webhook callback or queried by the query API. |
confirming | The consumer has submitted the payment request but under system processing. | This result will return asynchronous by webhook callback or queried by the query API . |
failed | The payment of the payment order failed due to some reasons. | This result will return asynchronous by webhook callback or queried by the query API . |
success | The payment order paid successfully. | This result will return asynchronous by webhook callback or queried by the query API . |
Order status created via Cancel Payment
Order status created via Refund Payment
Status | Description | Note |
---|---|---|
refunding | The refund request has been submitted and under system processing. | This result will return synchronous or queried by the query API . |
refund_success | The refund request completed successfully. | This result will return asynchronous by webhook callback or queried by the query API . |
refund_failed | The refund request failed. | This result will return asynchronous by webhook callback or queried by the query API . |