Query Order
Process
Description:
- Merchant calls this API to retrieve detailed information about an order.
API Information
Method: POST
URL: /b2b/core/api/ext/mm/order/get-order
Request
Main Parameters
| No | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| 1 | request_id | String | ✅ | Request ID |
| 2 | request_time | Datetime | ✅ | Request time. Format: YYYY-MM-DD H:m:s |
| 3 | master_merchant_code | String(50) | ❌ | Master merchant code provided by Baokim |
| 4 | sub_merchant_code | String(50) | ❌ | Sub merchant code provided by Baokim |
| 5 | mrc_order_id | String | ✅ | Merchant order ID |
Request Example
{
"request_id": "7T53RI2IDS5JWAF",
"request_time": "2023-08-18 10:00:00",
"master_merchant_code": "BAOKIMMASTERMERCHANT",
"sub_merchant_code": "BAOKIMSUBMERCHANT",
"mrc_order_id": 24121706176582
}
Response
Main Parameters
| No | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| 1 | code | Integer | ✅ | Result code |
| 2 | message | String | ✅ | Status message |
| 3 | data | Object | ✅ | Response data |
Order Information (data.order)
| No | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| 1 | id | Integer | ✅ | Baokim order ID |
| 2 | mrc_order_id | String | ✅ | Merchant order ID |
| 3 | total_amount | Integer | ✅ | Order amount |
| 4 | payment_method | Integer | ✅ | Payment method |
| 5 | status | Integer | ✅ | Order status (see table below) |
| 6 | completed_at | Datetime | ✅ | Success time |
| 7 | created_at | Datetime | ✅ | Creation time |
| 8 | updated_at | Datetime | ✅ | Last update time |
Order Status Information (data.order.status)
| Value | Status |
|---|---|
| 0 | Created |
| 1 | Success |
| 2 | Rejected |
| 3 | Pending approval |
| 4 | Pending FX conversion |
| 5 | Processing |
| 6 | Pending prepayment |
| 7 | Expired |
| 8 | Refunding |
| 9 | Refunded |
Transaction Information (data.transactions)
| No | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| 1 | id | Integer | ✅ | Baokim transaction ID |
| 2 | type | Integer | ✅ | Transaction type: 1 = Payment, 2 = Refund |
| 3 | payment_method | Integer | ✅ | Payment method |
| 4 | sub_merchant_fee | Integer | ✅ | Sub merchant fee |
| 5 | master_merchant_fee | Integer | ✅ | Master merchant fee |
| 6 | master_merchant_model | Integer | ✅ | Master merchant model |
| 7 | user_fee | Integer | ✅ | User fee |
| 8 | total_amount | Integer | ✅ | Total amount customer pays after fees |
| 9 | amount | Integer | ✅ | Amount of sub merchant balance change |
| 10 | description | String | ✅ | Transaction content |
| 11 | status | Integer | ✅ | Status: 0 = Created, 1 = Success, 2 = Failed, 3 = Pending |
| 12 | bnpl | Object | ❌ | BNPL information (if applicable) |
| 13 | installment | Object | ❌ | Installment information (if applicable) |
| 14 | completed_at | Datetime | ✅ | Success time |
| 15 | created_at | Datetime | ✅ | Creation time |
| 16 | updated_at | Datetime | ✅ | Last update time |
Transaction BNPL Information (data.transactions.bnpl)
| No | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| 1 | payment_per_month | Integer | ❌ | Monthly payment amount |
| 2 | paylater_amount | Integer | ❌ | Pay later amount |
| 3 | down_payment | Integer | ❌ | Down payment amount |
| 4 | provider | Integer | ❌ | BNPL provider |
Transaction Installment Information (data.transactions.installment)
| No | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| 1 | card_brand | Integer | ❌ | Card brand |
| 2 | period | Integer | ❌ | Installment period |
| 3 | payment_per_period | Integer | ❌ | Payment per period |
| 4 | bank_code | Integer | ❌ | Bank code |
Error Codes
| Error Code | Description |
|---|---|
| 102 | Provider error |
| 104 | Authentication error |
| 710 | Sub merchant does not exist |
| 711 | Master merchant does not exist |
| 712 | Sub merchant is not active |
| 713 | Master merchant is not active |
| 714 | Sub merchant does not belong to master merchant |