Home > Uncategorized > #bin number lookup in c#

#bin number lookup in c#

credit-card-perspective

The first six digits of a credit card (BIN) indicate the issuing bank and country. You can use
this to assist in fraud detection, or determine what country a customer is from – although
people do sometimes carry foreign cards.

Here is an example from NeutrinoAPI that allows you look up a card BIN number in c# – you’ll need your own username and key

[HttpGet]
public ActionResult CheckBinNumber(string binNumber)
{
var strUrl = “https://neutrinoapi.com/bin-lookup?”;
strUrl += “bin-number={0}”;
strUrl += “&customer-ip=8.8.8.8”; // Google’s IP address.
strUrl += “&user-id={{your username}}”;
strUrl += “&api-key={{your key}}”;
strUrl = string.Format(strUrl, binNumber);
var wc = new WebClient();
var strRaw = wc.DownloadString(strUrl);
return Content(strRaw, “application/json”);
}

…. and you get the following json

{
“country”:“IRELAND”,
“country-code”:“IE”,
“card-brand”:“MASTERCARD”,
“ip-city”:“Mountain View”,
“ip-blocklists”:[
“dshield”
],
“ip-country”:“United States”,
“issuer”:“BANK OF IRELAND”,
“issuer-website”:http://www.bankofireland.com/contact-us/”,
“ip-region”:“California”,
“valid”:true,
“card-type”:“CREDIT”,
“ip-blocklisted”:true,
“card-category”:“”,
“issuer-phone”:“1890 365 100 OR 353 1 404 4001”,
“ip-matches-bin”:false,
“ip-country-code”:“US”
}

Advertisement
Categories: Uncategorized
  1. February 5, 2020 at 2:31 pm

    Thank you very much! It save my life.

    Like

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: