Skip to main content

Check Card Installment Support

Flow

Description:

  • Merchant sends bank code and card BIN prefix to Baokim to check.
  • Merchant needs to check the list of supported BINs from the "Retrieve banks and installment loan packages" API response, get the longest BIN prefix length, and send the customer's BIN prefix according to that length.
  • Baokim returns whether the card supports installment.

API Information

Method: POST

Request

(Parameters sent by merchant)

Main Parameters Table

No.Field NameData TypeRequiredDescription
1request_idString(100)Unique ID of the request from Merchant to Baokim
2request_timeString(20)Request sent time. Format: YYYY-MM-DD H:i:s
3merchant_codeString(50)Unique merchant identifier
4bank_noString(6)Unique bank code on Baokim
5binString(12)Card BIN prefix

Request Example

{
"request_id": "MERCHANT050015588AXE00",
"request_time": "2020-08-05 09:00:00",
"merchant_code": "MERCHANT",
"bank_no": "970436",
"bin": "5339682111"
}

Response

(Parameters Baokim returns)

Main Parameters Table

No.Field NameData TypeRequiredDescription
1codeNumber(3)Baokim error code
2messageString(200)Error message
3dataObjectData returned

Data Information

No.Field NameData TypeRequiredDescription
1bank_nameString(255)Full bank name
2bank_short_nameString(20)Bank short name
3bank_noString(6)Bank code on Baokim
4bank_logoString(255)Bank logo
5binString(50)Card BIN prefix

Response Example

{
"code": 0,
"message": "Issuer identification number is supported",
"data": {
"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",
"bin": "5339682111"
}
}

Error Codes

Error CodeDescription
200Success
11Failure
101Baokim system error
102Basic auth authentication error
103Signature authentication error
104Validation error: Invalid RequestId
105Validation error: Invalid RequestTime
106Validation error: Invalid PartnerCode
107Validation error: Invalid CustomerName
108Validation error: Invalid CustomerPhone
109Validation error: Invalid CustomerEmail
110Validation error: Invalid BankCode
112Validation error: Invalid ClientIdNo
113Validation error: Invalid AuthCode
114Validation error: Invalid CardNo
118Validation error: Invalid ReferenceId
122Validation error: Invalid ConversionMoney
123Validation error: Invalid PayPerMonth
124Validation error: Invalid InstallmentAmount
125Validation error: Invalid TotalPaymentAmount
126Installment bank and card issuer bank do not match
127Validation error: Invalid Operation
142Invalid status
157Card BIN does not support installment
159Invalid start time (fromTime)
160Invalid end time (toTime)
168Invalid installment term
170Loan package not configured on Baokim
171Transaction cancellation not supported
174Invalid cancellation time
176Invalid payment time
177Invalid cancellation reason