get https://api.sandbox.midtrans.com/v1/bins/
Obtain user's card properties information based on BIN (Bank Identification Number)
BIN API is called to get metadata for a particular BIN, such as card type (Credit or Debit), the card network provider (Visa, MasterCard), and so on. BIN API is available for in both Snap and Core API integrations.
BIN API Method
See sample on the right -- try it yourself!
HTTP Method | Endpoint | Definition |
---|---|---|
GET | BASE_URL/v1/bins/bin_number | Get Bin Metadata. |
BIN API Response
{
"data": {
"country_name": "Indonesia",
"country_code": "id",
"brand": "visa",
"bin_type": "credit",
"bin_class": "gold",
"bin": "45563300",
"bank_code": "bca",
"bank": "bank central asia"
}
}
JSON Attribute | Description | Type | Required | |
---|---|---|---|---|
data | Information about the card. | Object | Conditional | |
country_name | Name of the country from which the card is issued. For example, Indonesia . | String | Optional | |
country_code | The country code. For example, id . | String | Optional | |
brand | The card network provider. For example, visa . | String | Optional | |
bin_type | The type of BIN. For example, credit . | String | Required | |
bin_class | The class of BIN. For example, gold . | String | Optional | |
bin | Requested Bin number. For example, 455633 . | String | Required | |
bank_code | The three letter bank code. For example, bca . | String | Optional | |
bank | Name of the bank on the card. For example, Bank Central Asia . | String | Optional |
Authorization Header
The request is authorized using the same method as HTTP(S) Request. Either the Midtrans Client Key or Midtrans Server key can be used.
It is highly recommended to use Midtrans Client Key if the request is made from a browser or a mobile device.
Rate Limit
Bin requests are rate-limited by 100 requests per minute. If the number of attempted requests exceeds the limit, Midtrans API responds with 409
status code.
Response Codes
Code | Description |
---|---|
200 | OK. |
404 | Particular Bin does not exist. |
401 | Credential is empty or wrong. Please recheck the authorization configuration. |
409 | Request exceeds the rate limit. |
Response Object
JSON Attribute | Description | Type | Required | |
---|---|---|---|---|
bank | The name of the bank on the card. For example, Bank Central Asia . | String | Optional | |
bank_code | The bank code. For example, bca . | String | Optional | bca |
bin | The requested Bin number. For example, 455633 . | String | Required | |
bin_type | The type of payment card. For example, credit or debit . | String | Required | credit |
bin_class | Card Class. For example, gold . | String | Optional | |
brand | The name of the bank issuing the payment card. For example, visa . | String | Optional | |
country_name | Country issuing the payment card. For example, Indonesia . | String | Optional | |
country_code | Code name of the country issuing the payment card. For example, id . | String | Optional | |
registration_required | [DEPRECATED - please use with your own discretion as data from some banks might not be the most updated]Indicate which card needs to be registered with the bank provider for use in online transactions. For example, true , false or null | Boolean | Optional |