Overview
Stolen cards and mule bank accounts usually look normal until you compare them with the rest of the session. A card issued in one country, used from an IP in another country, with a billing address in a third, is a common pattern in card testing and account takeover. A bank account that does not exist, or that belongs to a country you never pay out to, is a common pattern in payout fraud. Greip gives you two fast pre-payment checks:- BIN / IIN Lookup returns the card scheme, card type, prepaid and commercial flags, issuing bank, and issuing country from the first digits of a card.
- IBAN Validation checks the IBAN structure and checksum and returns the IBAN country, SEPA and EU flags, and bank details when available.
Where to call Greip in the payment flow
Run these checks on your server, after the customer submits payment details and before you call your payment processor or release a payout. Typical card flow:- Read the first 6 to 8 digits of the card (the BIN) from your card form or your processor’s tokenization response. You do not need to send the full card number.
- Call BIN Lookup and IP Lookup (with
params=security) in parallel. - Compare
data.country.alpha2from BIN Lookup withdata.geo.country_codefrom IP Lookup, and with the billing country you collected. - Map the result to allow, challenge, or block, then call your processor.
- Normalize the IBAN the customer entered (spaces are accepted).
- Call IBAN Validation and IP Lookup in parallel.
- Stop if
data.is_validisfalse. Otherwise comparedata.country.iso3166with the IP country and the customer’s declared country. - Map the result to allow, challenge, or block before you create the mandate or send money.
Request shape
All requests use Bearer auth in theAuthorization header. API v2 does not accept the key in query parameters. See Authentication.
BIN Lookup
IBAN Validation
IP Lookup (for the country comparison)
BIN fields to use before payment
Example BIN response (trimmed):
IBAN fields to use before payment
Example IBAN response (trimmed):
The country mismatch check
Compare the payment instrument’s country with the IP country:- Card:
data.country.alpha2(BIN Lookup) vsdata.geo.country_code(IP Lookup) - IBAN:
data.country.iso3166(IBAN Validation) vsdata.geo.country_code(IP Lookup)
When
data.security.relay is true (for example Apple Private Relay), the IP location reflects the relay egress. Treat a country mismatch on relay traffic as a weaker signal.When to allow, challenge, or block
Treat these as starting points for your own policy, not hard-coded declines:
Combine signals in this order: block first (invalid, blacklisted, Tor, bot, unsupported rail), then challenge (mismatch, VPN or hosting, prepaid on risky orders), then allow.
Example: card BIN vs IP country
Example: IBAN vs IP country
action to your payment flow:
- allow: continue to authorization, mandate creation, or payout.
- challenge: run 3-D Secure for cards, or a payee verification or confirmation step for bank accounts. Hold the payment for review when
reviewis set or the step-up fails. - block: show a generic message, ask for a different payment method, and log the masked instrument and signals for your analysts. Never log full card numbers or full IBANs.
Related guides
- VPN/Proxy at checkout: IP security signals and the challenge versus block policy used above.
- Payment Fraud: full transaction scoring with Payment Fraud Detection.
- Chargeback Fraud: post-authorization patterns and BIN country checks.
- Blacklists: block card BINs or card countries you never want to accept.