Want to skip the docs? Use the MCP Server
Endpoint availability: Standard and aboveLearn more
{
"data": {
"reason": "",
"isValid": true,
"blacklisted": false,
"bin": "456789",
"info": {
"scheme": {
"name": "Visa",
"coName": "Mada",
"isLuha": true,
"isPrepaid": false,
"isCommercial": false,
"type": "debit",
"brand": "Traditional",
"currency": "SAR"
},
"detected_digits": "4",
"syntax": {
"gaps": [4, 8, 12],
"lengths": [16, 18, 19],
"code": {
"name": "CVV",
"size": 3
}
},
"bank": {
"id": "588847",
"identifier": "80",
"name": "AL RAJHI BANKING AND INVESTMENT CORP.",
"city": "Riyadh",
"url": "https://www.alrajhibank.com.sa",
"phone": "+96611211600",
"logo": "https://greip.io/img/banks/al-rajhi.jpg",
"latitude": "25",
"longitude": "45"
},
"country": {
"alpha2": "SA",
"name": "Saudi Arabia",
"code": "966",
"numeric": "682",
"emoji": "🇸🇦",
"continent": "Asia",
"languageCode": "ar",
"languageNative": "العربية"
}
},
"custom_rules_applied": {
"total": 0,
"rules": []
}
},
"status": "success",
"executionTime": 2
}
{
"status": "error",
"code": 101,
"type": "invalid_key",
"description": "The API Key is missing or invalid."
}
BIN/IIN Lookup
curl --request GET \
--url https://greipapi.com/lookup/bin \
--header 'Authorization: Bearer <token>'import requests
url = "https://greipapi.com/lookup/bin"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://greipapi.com/lookup/bin', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://greipapi.com/lookup/bin",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://greipapi.com/lookup/bin"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://greipapi.com/lookup/bin")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://greipapi.com/lookup/bin")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"reason": "",
"isValid": true,
"blacklisted": false,
"bin": "456789",
"info": {
"scheme": {
"name": "Visa",
"coName": "Mada",
"isLuha": true,
"isPrepaid": false,
"isCommercial": false,
"type": "debit",
"brand": "Traditional",
"currency": "SAR"
},
"detected_digits": "4",
"syntax": {
"gaps": [4, 8, 12],
"lengths": [16, 18, 19],
"code": {
"name": "CVV",
"size": 3
}
},
"bank": {
"id": "588847",
"identifier": "80",
"name": "AL RAJHI BANKING AND INVESTMENT CORP.",
"city": "Riyadh",
"url": "https://www.alrajhibank.com.sa",
"phone": "+96611211600",
"logo": "https://greip.io/img/banks/al-rajhi.jpg",
"latitude": "25",
"longitude": "45"
},
"country": {
"alpha2": "SA",
"name": "Saudi Arabia",
"code": "966",
"numeric": "682",
"emoji": "🇸🇦",
"continent": "Asia",
"languageCode": "ar",
"languageNative": "العربية"
}
},
"custom_rules_applied": {
"total": 0,
"rules": []
}
},
"status": "success",
"executionTime": 2
}
{
"status": "error",
"code": 101,
"type": "invalid_key",
"description": "The API Key is missing or invalid."
}
Data Lookup
BIN/IIN Lookup
Utilize this module to effortlessly retrieve comprehensive information associated with a debit or credit card.
The API provides details such as card type (debit or credit), scheme (Visa, Mastercard, etc.), brand (gold, platinum, etc.), and bank information.
This data is invaluable for various applications, including verifying customer payment details, detecting fraudulent transactions, and delivering personalized services to enhance user experiences.
Want to skip the docs? Use the MCP Server
Endpoint availability: Standard and aboveLearn more
{
"data": {
"reason": "",
"isValid": true,
"blacklisted": false,
"bin": "456789",
"info": {
"scheme": {
"name": "Visa",
"coName": "Mada",
"isLuha": true,
"isPrepaid": false,
"isCommercial": false,
"type": "debit",
"brand": "Traditional",
"currency": "SAR"
},
"detected_digits": "4",
"syntax": {
"gaps": [4, 8, 12],
"lengths": [16, 18, 19],
"code": {
"name": "CVV",
"size": 3
}
},
"bank": {
"id": "588847",
"identifier": "80",
"name": "AL RAJHI BANKING AND INVESTMENT CORP.",
"city": "Riyadh",
"url": "https://www.alrajhibank.com.sa",
"phone": "+96611211600",
"logo": "https://greip.io/img/banks/al-rajhi.jpg",
"latitude": "25",
"longitude": "45"
},
"country": {
"alpha2": "SA",
"name": "Saudi Arabia",
"code": "966",
"numeric": "682",
"emoji": "🇸🇦",
"continent": "Asia",
"languageCode": "ar",
"languageNative": "العربية"
}
},
"custom_rules_applied": {
"total": 0,
"rules": []
}
},
"status": "success",
"executionTime": 2
}
{
"status": "error",
"code": 101,
"type": "invalid_key",
"description": "The API Key is missing or invalid."
}
GET
/
lookup
/
bin
BIN/IIN Lookup
curl --request GET \
--url https://greipapi.com/lookup/bin \
--header 'Authorization: Bearer <token>'import requests
url = "https://greipapi.com/lookup/bin"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://greipapi.com/lookup/bin', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://greipapi.com/lookup/bin",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://greipapi.com/lookup/bin"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://greipapi.com/lookup/bin")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://greipapi.com/lookup/bin")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"reason": "",
"isValid": true,
"blacklisted": false,
"bin": "456789",
"info": {
"scheme": {
"name": "Visa",
"coName": "Mada",
"isLuha": true,
"isPrepaid": false,
"isCommercial": false,
"type": "debit",
"brand": "Traditional",
"currency": "SAR"
},
"detected_digits": "4",
"syntax": {
"gaps": [4, 8, 12],
"lengths": [16, 18, 19],
"code": {
"name": "CVV",
"size": 3
}
},
"bank": {
"id": "588847",
"identifier": "80",
"name": "AL RAJHI BANKING AND INVESTMENT CORP.",
"city": "Riyadh",
"url": "https://www.alrajhibank.com.sa",
"phone": "+96611211600",
"logo": "https://greip.io/img/banks/al-rajhi.jpg",
"latitude": "25",
"longitude": "45"
},
"country": {
"alpha2": "SA",
"name": "Saudi Arabia",
"code": "966",
"numeric": "682",
"emoji": "🇸🇦",
"continent": "Asia",
"languageCode": "ar",
"languageNative": "العربية"
}
},
"custom_rules_applied": {
"total": 0,
"rules": []
}
},
"status": "success",
"executionTime": 2
}
{
"status": "error",
"code": 101,
"type": "invalid_key",
"description": "The API Key is missing or invalid."
}
Overview
The IIN (Issuer Identification Number), also known as the BIN (Bank Identification Number), is the first 6 digits of a debit or credit card number. These unique numbers are used to identify the issuing entity, such as the bank or financial institution that issued the card. One of the most common and critical use cases of this method is to detect and prevent fraud payments in your app or website. This is an essential task for any business that accepts online payments, as fraud can lead to significant financial losses and reputational damage. For example, based on of our case studies, if you notice a user from the UK purchasing large amounts of your product, and the card used for payment is issued by a bank located in the US, this could be a red flag. This may indicate that the user is using a stolen or fraudulent card to complete the checkout process. By flagging such transactions for review or rejection, you can prevent fraud and protect your business from financial loss.Query Parameters
string
required
The BIN/IIN of the card (min: 6 digits).Sample value:
456789, 456789XXXXXX1234, or 4567891234567890.string
default:"JSON"
The format command is used to get a response in a specific format.Expected values:
JSON, XML, CSV, or NewlineFor more information please refer to Response Format.string
default:"live"
The mode command is used to in the development stage to simulate the integration process before releasing it to the production environment.Expected values:
live, or test.For more information please refer to Development Environment.string
The userID command can be used to identify requests sent by specific users to monitor in the Events Page.Expected values: email address, phone number, user id, name, etc.For more information please refer to User Identifier.
string
The callback command can help you make the response as a JSONP format.Expected values: any name that can be used as a function name in Javascript, e.g:
myFunctionName.For more information please refer to JSONP Callback.Response properties
object
required
Hide properties
Hide properties
string
required
Reason for the validation result.
boolean
required
Validation result (
true or false).boolean
required
Indicates if the BIN is blacklisted due to applying custom
rules or were found in one of your
blacklists.
string
required
The BIN/IIN of the card you passed in the request.
object
required
Hide properties
Hide properties
object
required
Hide properties
Hide properties
object
required
Card scheme name.
object
required
Card company name.
boolean
required
Is the card issued by Luha?
boolean
required
Is the card prepaid?
boolean
required
Is the card commercial?
string
required
Card type (
debit, or credit).string
required
Card brand (
Traditional, Gold, Platinum, etc.).string
required
Card currency.
string
required
The digits used to detect the scheme details.
object
required
object
required
Hide properties
Hide properties
string
required
Bank ID.
string
required
Bank identifier.
string
required
The official bank name.
string
required
The city where the bank’s headquarters are located.
string
required
Bank URL of the official website.
string
required
Bank phone number for contact.
string
required
Bank logo URL (image).
string
required
Bank latitude coordinates of the country where the bank is
located.
string
required
Bank longitude coordinates of the country where the bank is
located.
object
required
Hide properties
Hide properties
string
required
Country code (in ISO 3166-1 alpha-2 format).
string
required
The Country name.
string
required
Country dialing code.
string
required
Country numeric code.
string
required
Country flag emoji.
string
required
Continent where the country is located.
string
required
Country language code (in ISO 639-1 format).
string
required
Country native language name.
object
The custom rules applied to this request, learn
more.
Hide properties
Hide properties
integer
required
The total number of custom rules applied to this request.
object
required
The custom rules applied to this request, learn
more.
string
required
Response status (
success, or error).integer
required
Time taken to process the data (in milliseconds).
Was this page helpful?
⌘I