Transaction Details
Process
API Information
Method: POST
URL: /api/merchant-hosted/bank-transfer/detail
Request
(Parameters sent by the partner)
Main Parameters Table
| No. | Field Name | Data Type | Required | Description |
|---|---|---|---|---|
| 1 | request_id | String(50) | ✅ | Unique request ID. Suggested format: MerchantCode+YYYYMMDDHHIISS+UniqueId |
| 2 | request_time | String(19) | ✅ | Request sent time. Format: YYYY-MM-DD HH:II:SS |
| 3 | acc_no | String(30) | ✅ | VA account number |
| 4 | merchant_code | String(30) | ✅ | Merchant code |
| 5 | start_date | String(19) | ❌ | Transaction filter start time. Default: current time minus 1 day |
| 6 | end_date | String(19) | ❌ | Transaction filter end time |
Request Example
{
"request_id": "BK20250717140001",
"request_time": "2025-07-17 14:00:00",
"acc_no": "41313131131313",
"merchant_code": "PARTNER001"
}
Response
(Parameters returned by Baokim)
Main Parameters Table
| No. | Field Name | Data Type | Required | Description |
|---|---|---|---|---|
| 1 | code | String(50) | ✅ | Result code |
| 2 | message | String(200) | ✅ | Error code message |
| 3 | data | Object | ✅ | Data returned |
data.transaction Information
| No. | Field Name | Data Type | Required | Description |
|---|---|---|---|---|
| 1 | id | Integer | ✅ | Baokim transaction code |
| 2 | order_id | Integer | ✅ | Associated order ID |
| 3 | mrc_order_id | String(50) | ✅ | Merchant order code |
| 4 | type | Integer | ✅ | 1 = Payment, 2 = Refund |
| 5 | payment_method | Integer | ✅ | 1 = VA |
| 6 | merchant_fee | Integer | ✅ | Merchant fee |
| 7 | user_fee | Integer | ✅ | User fee |
| 8 | total_amount | Integer | ✅ | Total transaction amount after fees |
| 9 | amount | Integer | ✅ | Amount merchant receives |
| 10 | description | String | ❌ | Transaction description |
| 11 | status | Integer | ✅ | Status: 0 = Initialization, 1 = Success, 2 = Failure, 3 = Pending |
| 12 | completed_at | Datetime | ✅ | Success time |
| 13 | created_at | Datetime | ✅ | Creation time |
| 14 | updated_at | Datetime | ✅ | Update time |
data.va_info Information
| No. | Field Name | Data Type | Required | Description |
|---|---|---|---|---|
| 1 | bank_name | String(255) | ✅ | VA bank name |
| 2 | bank_branch | String(255) | ❌ | Bank branch |
| 3 | acc_no | String(50) | ✅ | Account identifier number |
| 4 | acc_name | String(255) | ✅ | Recipient name |
| 5 | qr_string | String | ✅ | QR code as text |
| 6 | qr_path | String | ✅ | QR image path |
Response Example
{
"code": 0,
"message": "Success",
"data": {
"transactions": {
"id": 555002,
"order_id": 987654322,
"mrc_order_id": "ORDER20250717_002",
"type": 1,
"payment_method": 1,
"merchant_fee": 10000,
"user_fee": 0,
"total_amount": 2000000,
"amount": 1990000,
"description": "Payment via virtual account (VA)",
"status": 1,
"bank_code": "VCB",
"completed_at": "2025-07-17 15:45:00",
"created_at": "2025-07-17 15:43:00",
"updated_at": "2025-07-17 15:45:00"
},
"va_info": {
"bank_name": "Ngân hàng TMCP Ngoại Thương Việt Nam (Vietcombank)",
"bank_branch": "Chi nhánh Hà Nội",
"acc_no": "0123456789012",
"acc_name": "Nguyen Van A",
"qr_string": "00020101021238550010A0000007270123000697040300000000000020386304C3A4",
"qr_path": "https://sandbox.baokim.vn/qr/BK987654322.png"
}
}
}
Error Codes
| code | message |
|---|---|
| 100 | Success |
| 101 | System error |
| 102 | Provider error |
| 104 | JWT authentication error |
| 105 | Invalid digital signature |
| 106 | Order amount is insufficient for refund |
| 107 | Order cannot be refunded |
| 108 | Order cannot be cancelled |
| 109 | Order does not exist |
| 110 | Merchant order code already exists |
| 422 | Validation error |