{
"success": true,
"data": {
"bin": "456789",
"is_valid": true,
"reason": null,
"is_blacklisted": false,
"scheme": {
"name": "Visa",
"is_luhn": true,
"is_prepaid": false,
"is_commercial": 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",
"name": "AL RAJHI BANKING AND INVESTMENT CORP.",
"city": "Riyadh",
"url": "https://www.alrajhibank.com.sa",
"phone": "+96611211600",
"latitude": "25",
"longitude": "45"
},
"country": {
"alpha2": "SA",
"name": "Saudi Arabia",
"code": "966",
"numeric": "682",
"emoji": "🇸🇦",
"continent": "Asia",
"language_code": "ar",
"language_native": "العربية"
}
},
"execution_ms": 2
}
{
"success": false,
"code": 101,
"type": "invalid_key",
"description": "The API Key is missing or invalid."
}
BIN lookup
curl --request GET \
--url https://v2.greipapi.com/lookup/bin/{bin} \
--header 'Authorization: Bearer <token>'import requests
url = "https://v2.greipapi.com/lookup/bin/{bin}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://v2.greipapi.com/lookup/bin/{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://v2.greipapi.com/lookup/bin/{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://v2.greipapi.com/lookup/bin/{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://v2.greipapi.com/lookup/bin/{bin}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://v2.greipapi.com/lookup/bin/{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{
"success": true,
"data": {
"bin": "456789",
"is_valid": true,
"reason": null,
"is_blacklisted": false,
"scheme": {
"name": "Visa",
"is_luhn": true,
"is_prepaid": false,
"is_commercial": 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",
"name": "AL RAJHI BANKING AND INVESTMENT CORP.",
"city": "Riyadh",
"url": "https://www.alrajhibank.com.sa",
"phone": "+96611211600",
"latitude": "25",
"longitude": "45"
},
"country": {
"alpha2": "SA",
"name": "Saudi Arabia",
"code": "966",
"numeric": "682",
"emoji": "🇸🇦",
"continent": "Asia",
"language_code": "ar",
"language_native": "العربية"
}
},
"execution_ms": 2
}
{
"success": false,
"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.
{
"success": true,
"data": {
"bin": "456789",
"is_valid": true,
"reason": null,
"is_blacklisted": false,
"scheme": {
"name": "Visa",
"is_luhn": true,
"is_prepaid": false,
"is_commercial": 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",
"name": "AL RAJHI BANKING AND INVESTMENT CORP.",
"city": "Riyadh",
"url": "https://www.alrajhibank.com.sa",
"phone": "+96611211600",
"latitude": "25",
"longitude": "45"
},
"country": {
"alpha2": "SA",
"name": "Saudi Arabia",
"code": "966",
"numeric": "682",
"emoji": "🇸🇦",
"continent": "Asia",
"language_code": "ar",
"language_native": "العربية"
}
},
"execution_ms": 2
}
{
"success": false,
"code": 101,
"type": "invalid_key",
"description": "The API Key is missing or invalid."
}
GET
/
lookup
/
bin
/
{bin}
BIN lookup
curl --request GET \
--url https://v2.greipapi.com/lookup/bin/{bin} \
--header 'Authorization: Bearer <token>'import requests
url = "https://v2.greipapi.com/lookup/bin/{bin}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://v2.greipapi.com/lookup/bin/{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://v2.greipapi.com/lookup/bin/{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://v2.greipapi.com/lookup/bin/{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://v2.greipapi.com/lookup/bin/{bin}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://v2.greipapi.com/lookup/bin/{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{
"success": true,
"data": {
"bin": "456789",
"is_valid": true,
"reason": null,
"is_blacklisted": false,
"scheme": {
"name": "Visa",
"is_luhn": true,
"is_prepaid": false,
"is_commercial": 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",
"name": "AL RAJHI BANKING AND INVESTMENT CORP.",
"city": "Riyadh",
"url": "https://www.alrajhibank.com.sa",
"phone": "+96611211600",
"latitude": "25",
"longitude": "45"
},
"country": {
"alpha2": "SA",
"name": "Saudi Arabia",
"code": "966",
"numeric": "682",
"emoji": "🇸🇦",
"continent": "Asia",
"language_code": "ar",
"language_native": "العربية"
}
},
"execution_ms": 2
}
{
"success": false,
"code": 101,
"type": "invalid_key",
"description": "The API Key is missing or invalid."
}
Authentication
Include your API key in theAuthorization header:
Authorization: Bearer <api_key>
Path parameters
string
required
The BIN/IIN of the card (min: 6 digits).Sample value:
456789, 456789XXXXXX1234, or 4567891234567890.Query parameters
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 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
Optional label for your own analytics or support correlation (for example a product or channel name).
string
The user_id 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.
Response properties
boolean
required
true when the request succeeded; false on error.object
required
Hide properties
Hide properties
string
required
The BIN/IIN digits from the request (up to 8 digits).
boolean
required
Whether the card number prefix passes structural validation. Use
is_blacklisted for blocklist outcomes.string
Human-readable validation message when
is_valid is false, or null on success.boolean
required
Indicates if the BIN is on your blocklists or matched custom rules (Premium plans and above).
object
Card scheme details when a known issuer is detected;
null when the scheme is unknown.Hide properties
Hide properties
string
required
Card scheme name (for example
Visa, Mastercard).boolean
required
Whether Luhn checksum validation applies to this scheme.
boolean
Whether the card is prepaid when known; otherwise
null.boolean
Whether the card is commercial when known; otherwise
null.string
Card type (
debit, credit, etc.) when known.string
Card brand when known.
string
Card currency when known.
string
Issuer prefix digits used to detect the scheme.
object
Card number formatting rules for the detected scheme.
object
required
Issuing bank details when available.
Hide properties
Hide properties
object
required
Country associated with the issuing bank.
integer
required
Time taken to process the request (milliseconds).
Was this page helpful?