Retrieve Banks and Installment Loan Packages
Flow
Description:
- Merchant sends a request to Baokim.
- Baokim returns a list of banks and corresponding installment packages.
API Information
Method: GET
Request
(Parameters sent by merchant)
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 | bank_no | String(6) | ❌ | Unique bank code on Baokim |
Request Example
{
"request_id": "MERCHANT050015588AXE00",
"request_time": "2020-08-11 14:41:00",
"merchant_code": "MERCHANT"
}
Response
(Parameters Baokim returns)
Main Parameters Table
| No. | Field Name | Data Type | Required | Description |
|---|---|---|---|---|
| 1 | code | Number(3) | ✅ | Baokim error code |
| 2 | message | String(200) | ✅ | Error message |
| 3 | data | Object | ✅ | Data returned |
Data Information
| No. | Field Name | Data Type | Required | Description |
|---|---|---|---|---|
| 1 | items | Array | ✅ | List of bank and loan package information objects |
Items Information
| No. | Field Name | Data Type | Required | Description |
|---|---|---|---|---|
| 1 | bank_name | String(255) | ✅ | Full bank name |
| 2 | bank_short_name | String(20) | ✅ | Bank short name |
| 3 | bank_no | String(6) | ✅ | Unique bank code on Baokim |
| 4 | bank_logo | String(255) | ✅ | Bank logo |
| 5 | list_bin_accept | Array | ✅ | Array of accepted card BIN prefixes for lending |
| 6 | list_card_scheme_accept | Array | ✅ | Array of accepted card types: VISA / MASTERCARD / JCB |
| 7 | minimum_require | Integer | ✅ | Minimum loan amount |
| 8 | loan_packages | Array | ✅ | List of loan package objects |
loan_packages Information
| No. | Field Name | Data Type | Required | Description |
|---|---|---|---|---|
| 1 | loan_pack_id | Integer | ✅ | Loan package ID on Baokim system |
| 2 | package_name | String(255) | ✅ | Loan package name |
| 3 | grace_period | Integer | ✅ | Installment term |
| 4 | conversion_fee | Decimal | ✅ | Installment conversion fee |
Response Example
{
"code": 0,
"message": "Success",
"data": {
"items": [
{
"bank_name": "Ngân hàng TMCP Việt Nam Thịnh Vượng",
"bank_short_name": "VPBANK",
"bank_no": "970432",
"bank_logo": "https://public-cdn.baokim.vn/statics/img/banks/VPBANK.png",
"list_bin_accept": ["51896601", "5189660", "524083"],
"list_card_scheme_accept": ["VISA", "MASTERCARD", "JCB"],
"minimum_require": 3000000,
"loan_packages": [
{
"loan_pack_id": 638,
"package_name": "Gói vay kỳ hạn 6 tháng",
"grace_period": 6,
"conversion_fee": 2.0
},
{
"loan_pack_id": 639,
"package_name": "Gói vay kỳ hạn 9 tháng",
"grace_period": 9,
"conversion_fee": 3.5
}
]
},
{
"bank_name": "Ngân hàng TMCP Ngoại thương Việt Nam",
"bank_short_name": "VIETCOMBANK",
"bank_no": "970436",
"bank_logo": "https://public-cdn.baokim.vn/statics/img/banks/VIETCOMBANK.png",
"list_bin_accept": ["625124", "625154", "41297666"],
"minimum_require": 2000000,
"loan_packages": [
{
"loan_pack_id": 643,
"package_name": "Gói vay kỳ hạn 6 tháng",
"grace_period": 6,
"conversion_fee": 2.0
},
{
"loan_pack_id": 644,
"package_name": "Gói vay kỳ hạn 9 tháng",
"grace_period": 9,
"conversion_fee": 3.5
}
]
}
]
}
}
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 |