Cancel Installment Transaction
Process
Description:
- If the order is in pending conversion status → the order will be cancelled immediately.
- If the order has already been transferred to the bank → Baokim records the cancellation request and notifies when the order is successfully cancelled.
API Information
Method: POST
Request
(Parameters sent by the partner)
Main Parameters Table
| No. | Field Name | Data Type | Required | Description |
|---|---|---|---|---|
| 1 | request_id | String(100) | ✅ | Unique ID of the request from Merchant to Baokim |
| 2 | request_time | String(20) | ✅ | Request sent time. Format: YYYY-MM-DD H:i:s |
| 3 | merchant_code | String(50) | ✅ | Unique merchant identifier |
| 4 | mrc_order_id | String(50) | ✅ | Unique transaction code sent by the partner (generated by the partner, can be considered as order code) |
| 5 | reason | Text | ✅ | Reason for cancelling order |
Request Example
{
"request_id": "MERCHANT050015588AXE014",
"request_time": "2020-08-11 14:41:00",
"merchant_code": "MERCHANT",
"mrc_order_id": "BK2231383795A6021334",
"reason": "yêu cầu hủy đơn trả góp"
}
Response
(Parameters returned by Baokim)
Main Parameters Table
| No. | Field Name | Data Type | Required | Description |
|---|---|---|---|---|
| 1 | code | Number(3) | ✅ | Baokim error code |
| 2 | message | String(200) | ✅ | Error code message |
| 3 | data | Object | ✅ | Data returned |
Data Information
| No. | Field Name | Data Type | Required | Description |
|---|---|---|---|---|
| 1 | mrc_order_id | String(50) | ✅ | Merchant order code |
| 2 | order_id | Integer | ✅ | Unique order code created by Baokim |
| 3 | status | Integer | ✅ | Status: Waiting to send cancellation request / Cancellation request sent |
| 4 | created_at | String(20) | ✅ | Order creation time |
| 5 | updated_at | String(20) | ✅ | Order update time |
Response Example
{
"code": 0,
"message": "Success",
"data": {
"order_id": 45467,
"mrc_order_id": "VLAD_1753867524",
"status": 1,
"created_at": "2020-08-11 14:41:00",
"updated_at": "2020-08-11 15:41:00"
}
}
Error Codes
| Error Code | Description |
|---|---|
| 200 | Success |
| 11 | Failure |
| 101 | Baokim system error |
| 102 | Basic auth authentication error |
| 103 | Signature authentication error |
| 104 | Validation error: Invalid RequestId |
| 105 | Validation error: Invalid RequestTime |
| 106 | Validation error: Invalid PartnerCode |
| 107 | Validation error: Invalid CustomerName |
| 108 | Validation error: Invalid CustomerPhone |
| 109 | Validation error: Invalid CustomerEmail |
| 110 | Validation error: Invalid BankCode |
| 112 | Validation error: Invalid ClientIdNo |
| 113 | Validation error: Invalid AuthCode |
| 114 | Validation error: Invalid CardNo |
| 118 | Validation error: Invalid ReferenceId |
| 122 | Validation error: Invalid ConversionMoney |
| 123 | Validation error: Invalid PayPerMonth |
| 124 | Validation error: Invalid InstallmentAmount |
| 125 | Validation error: Invalid TotalPaymentAmount |
| 126 | Installment bank and card issuer bank do not match |
| 127 | Validation error: Invalid Operation |
| 142 | Invalid status |
| 157 | Card BIN does not support installment |
| 159 | Invalid start time (fromTime) |
| 160 | Invalid end time (toTime) |
| 168 | Invalid installment term |
| 170 | Loan package not configured on Baokim |
| 171 | Transaction cancellation not supported |
| 174 | Invalid cancellation time |
| 176 | Invalid payment time |
| 177 | Invalid cancellation reason |