Skip to main content

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.
Pair them with IP Lookup to compare the card or IBAN country with the country of the shopper’s IP, then map the result to allow, challenge, or block.
A valid BIN or a valid IBAN only proves the number is well formed and matches a known issuer or country format. It does not prove that the card or bank account belongs to the person paying or being paid, that it is open, or that it has funds. Use 3-D Secure for cards, and your bank’s payee verification (for example Verification of Payee or Confirmation of Payee where available) or micro-deposits for bank accounts.

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:
  1. 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.
  2. Call BIN Lookup and IP Lookup (with params=security) in parallel.
  3. Compare data.country.alpha2 from BIN Lookup with data.geo.country_code from IP Lookup, and with the billing country you collected.
  4. Map the result to allow, challenge, or block, then call your processor.
Typical IBAN flow (payouts, SEPA Direct Debit, bank transfer checkout):
  1. Normalize the IBAN the customer entered (spaces are accepted).
  2. Call IBAN Validation and IP Lookup in parallel.
  3. Stop if data.is_valid is false. Otherwise compare data.country.iso3166 with the IP country and the customer’s declared country.
  4. Map the result to allow, challenge, or block before you create the mandate or send money.
Send only the BIN (first 6 to 8 digits), not the full card number. BIN Lookup accepts 6 or more digits, and the response returns at most 8 digits in data.bin. Keeping full card numbers out of your fraud checks reduces the card data your own systems handle.

Request shape

All requests use Bearer auth in the Authorization 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) vs data.geo.country_code (IP Lookup)
  • IBAN: data.country.iso3166 (IBAN Validation) vs data.geo.country_code (IP Lookup)
Also compare both with the billing or declared country you collect. All three values are ISO 3166-1 alpha-2 codes, so compare them in uppercase. A mismatch is a signal, not a verdict. Travelers, expats, cross-border shoppers, and customers of digital banks that issue IBANs from another country all create honest mismatches. The mismatch becomes strong when it stacks with other signals, such as a VPN or proxy, a prepaid card, a new account, or a high order value.
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.
BIN Lookup and IP Lookup are available on the Standard plan and above. IBAN Validation is available on the Premium plan and above. A request for a feature your plan does not include returns an error such as 117 (feature_not_available). Errors return success: false with a code, so always check success before you read data. See error codes and plans.

Example: card BIN vs IP country

Example: IBAN vs IP country

Wire the returned 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 review is 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.