Skip to content

Card BIN Lookup

Check, from a card's BIN, whether Glomo can take the card for a one-time payment and for a subscription, before you collect the full card details.

Look up a card BIN

Request

Tells you whether Glomo can take a card for a one-time payment and for a subscription, from the card's BIN alone. Use it on a server-to-server integration to ask your customer for another card before you collect the full card details, instead of after Create a payment fails.

The lookup applies the same card rules as Create a payment, for your account: card network, issuing country, the cards you accept and, when you send amount and currency, the card amount limits. No order or subscription is needed.

Notes:

  • The result is advisory. Create a payment checks the card again with the order or subscription amount, and can use a different BIN provider and further card checks. A card that is available here can still be refused there.
  • status is failed when Glomo cannot reach a decision, for example when the BIN provider does not respond. The response is still 200, and every field except bin is null. Treat it as unknown, not as refused.
  • A BIN that matches no card network Glomo recognises returns status success with network, type, issuer_name and issuer_country set to null, and both payment types unavailable with network_not_supported.
  • In sandbox, look up the first 6 to 8 digits of a test card. type and issuer_name are always null in sandbox. A BIN of a recognised network that is not a test card returns status failed.
  • Send only the BIN, never the full card number.
Security
JWT
Bodyapplication/jsonrequired
binstring, [ 6 .. 8 ] characters^\d{6,8}$required

The first 6 to 8 digits of the card number. Send it as a string; a JSON number is rejected.

Example:"453249"
amountinteger, >= 1

Payment amount in the smallest unit of currency, for example cents for USD. Optional. Send amount and currency together, or neither. With them, the result includes the card amount limits.

Example:2000000
currencystring, (iso-4217)

Currency of amount, in ISO 4217 format, case-insensitive. Send amount and currency together, or neither.

Enum:"USD""EUR""GBP""AED""SGD""AUD"
Example:"USD"
curl -i -X POST \
  https://api.glomopay.com/api/v1/card-bins/lookup \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "bin": "453249"
  }'

Responses

Success

Bodyapplication/json
binstringrequired

The BIN you sent.

Example:"453249"
statusstringrequired

success when Glomo reached a decision for the card. failed when it could not, for example when the BIN provider did not respond or returned no issuing country. On failed, every other field except bin is null.

Enum:"success""failed"
Example:"success"
networkstring or nullrequired

Card network in lowercase, for example visa, mastercard, amex, discover, jcb, diners_club, maestro, unionpay or hipercard. Treat it as an open set. A network Glomo does not take is usually unavailable with network_not_supported; see reason for the order of the checks. null when the lookup failed or the BIN matches no network Glomo recognises.

Example:"visa"
typestring or nullrequired

Card type in lowercase as reported by the issuer, for example credit or debit. Always null in sandbox.

Example:"credit"
issuer_namestring or nullrequired

Name of the issuing bank. null when the provider does not return one. Always null in sandbox.

Example:null
issuer_countrystring or nullrequired

Issuing country in ISO 3166-1 alpha-3 format.

Example:"USA"
one_timeobject or null(CardBinAvailability)required

Whether Glomo can take the card for this payment type. null when status is failed.

recurringobject or null(CardBinAvailability)required

Whether Glomo can take the card for this payment type. null when status is failed.

Response
{ "bin": "459727", "status": "success", "network": "visa", "type": null, "issuer_name": null, "issuer_country": "USA", "one_time": { "available": true, "reason": null }, "recurring": { "available": true, "reason": null } }