API Documentation

Integrate TxChk's powerful BIN and IP checking capabilities into your applications.

Getting Started

The TxChk API allows you to check BIN numbers and IP addresses to prevent fraud and ensure secure transactions. All API requests should be made to the base URL:

https://txchk-api.samirdjelal.com/api/v1

All requests require the following headers:

--header 'Content-Type: application/json'
--header 'Authorization: Bearer YOUR_TOKEN'

Authentication

Before making API requests, you need to obtain an authentication token. The token will be active for 30 days.

Request

POST /auth/login

Example

curl --request POST \
  --url 'https://txchk-api.samirdjelal.com/api/v1/auth/login' \
  --header 'Content-Type: application/json' \
  --data '{"username": "user", "password": "pass123"}'

Response

FieldTypeDescription
JWT TokenstringA JSON Web Token (JWT) that contains encoded user information and should be included in the Authorization header for all subsequent requests. The token will be active for 30 days.

BIN/IP Check and Match

Check both BIN number and IP address, and determine if they match.

Request

GET /bincode/check?ip=109.70.100.2&bin=450105

Example

curl --request GET \
--url 'https://txchk-api.samirdjelal.com/api/v1/bincode/check?ip=109.70.100.2&bin=450105' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_TOKEN'

Response

FieldTypeNullableDescription
statusstringNoStatus of the request. Either "success" or "failed".
messagestringYesAdditional message about the request result.
data.bin_codeobjectYesInformation about the BIN number.
data.bin_code.bank_namestringYesName of the bank that issued the card.
data.bin_code.bank_phonestringYesPhone number of the bank.
data.bin_code.bank_urlstringYesURL of the bank's website.
data.bin_code.binstringYesThe BIN number.
data.bin_code.card_brandstringYesBrand of the card (e.g., VISA, MASTERCARD).
data.bin_code.card_levelstringYesLevel of the card (e.g., CLASSIC, GOLD, PLATINUM).
data.bin_code.card_typestringYesType of the card (e.g., CREDIT, DEBIT).
data.bin_code.country_code_a2stringYesTwo-letter country code of the card issuer.
data.bin_code.country_code_a3stringYesThree-letter country code of the card issuer.
data.bin_code.country_namestringYesName of the country of the card issuer.
data.ip_addressobjectYesInformation about the IP address.
data.ip_address.asnobjectYesAutonomous System Number information.
data.ip_address.countryobjectYesCountry information for the IP address.
data.ip_address.is_torbooleanYesWhether the IP address is a Tor exit node.
data.ip_bin_matchbooleanYesWhether the country of the IP address matches the country of the BIN number.
errorsobjectYesErrors that occurred during the request, if any.

BIN Check

Check BIN number details.

Request

GET /bincode/check?bin=450105

Example

curl --request GET \
--url 'https://txchk-api.samirdjelal.com/api/v1/bincode/check?bin=450105' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_TOKEN'

Response

FieldTypeNullableDescription
statusstringNoStatus of the request. Either "success" or "failed".
messagestringYesAdditional message about the request result.
data.bin_codeobjectYesInformation about the BIN number.
data.bin_code.bank_namestringYesName of the bank that issued the card.
data.bin_code.bank_phonestringYesPhone number of the bank.
data.bin_code.bank_urlstringYesURL of the bank's website.
data.bin_code.binstringYesThe BIN number.
data.bin_code.card_brandstringYesBrand of the card (e.g., VISA, MASTERCARD).
data.bin_code.card_levelstringYesLevel of the card (e.g., CLASSIC, GOLD, PLATINUM).
data.bin_code.card_typestringYesType of the card (e.g., CREDIT, DEBIT).
data.bin_code.country_code_a2stringYesTwo-letter country code of the card issuer.
data.bin_code.country_code_a3stringYesThree-letter country code of the card issuer.
data.bin_code.country_namestringYesName of the country of the card issuer.
data.ip_addressobjectYesInformation about the IP address (null for BIN-only checks).
data.ip_bin_matchbooleanYesWhether the country of the IP address matches the country of the BIN number (null for BIN-only checks).
errorsobjectYesErrors that occurred during the request, if any.

IP Check

Check IP address details.

Request

GET /bincode/check?ip=8.8.8.8

Example

curl --request GET \
--url 'https://txchk-api.samirdjelal.com/api/v1/bincode/check?ip=8.8.8.8' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_TOKEN'

Response

FieldTypeNullableDescription
statusstringNoStatus of the request. Either "success" or "failed".
messagestringYesAdditional message about the request result.
data.bin_codeobjectYesInformation about the BIN number (null for IP-only checks).
data.ip_addressobjectYesInformation about the IP address.
data.ip_address.asnobjectYesAutonomous System Number information.
data.ip_address.asn.as_numbernumberYesThe Autonomous System Number.
data.ip_address.asn.countrystringYesTwo-letter country code of the ASN.
data.ip_address.asn.ipnumberYesThe IP address as a number.
data.ip_address.asn.ownerstringYesThe owner of the ASN.
data.ip_address.asn.prefix_lennumberYesThe prefix length of the ASN.
data.ip_address.countryobjectYesCountry information for the IP address.
data.ip_address.country.currencystringYesCurrency code of the country.
data.ip_address.country.iso_code_a2stringYesTwo-letter country code.
data.ip_address.country.iso_code_a3stringYesThree-letter country code.
data.ip_address.country.iso_code_numberstringYesNumeric country code.
data.ip_address.country.iso_code_stringstringYesISO code string for the country.
data.ip_address.country.namestringYesName of the country.
data.ip_address.country.regionstringYesRegion of the country.
data.ip_address.country.sub_regionstringYesSub-region of the country.
data.ip_address.is_torbooleanYesWhether the IP address is a Tor exit node.
data.ip_bin_matchbooleanYesWhether the country of the IP address matches the country of the BIN number (null for IP-only checks).
errorsobjectYesErrors that occurred during the request, if any.