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.
statusisfailedwhen Glomo cannot reach a decision, for example when the BIN provider does not respond. The response is still200, and every field exceptbinisnull. Treat it as unknown, not as refused.- A BIN that matches no card network Glomo recognises returns
statussuccesswithnetwork,type,issuer_nameandissuer_countryset tonull, and both payment types unavailable withnetwork_not_supported. - In sandbox, look up the first 6 to 8 digits of a test card.
typeandissuer_nameare alwaysnullin sandbox. A BIN of a recognised network that is not a test card returnsstatusfailed. - Send only the BIN, never the full card number.
The first 6 to 8 digits of the card number. Send it as a string; a JSON number is rejected.
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.
Currency of amount, in ISO 4217 format, case-insensitive. Send amount and currency together, or neither.
- Production serverhttps://api.glomopay.com/api/v1/card-bins/lookup
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"
}'Success
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.
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.
Card type in lowercase as reported by the issuer, for example credit or debit. Always null in sandbox.
Name of the issuing bank. null when the provider does not return one. Always null in sandbox.
Whether Glomo can take the card for this payment type. null when status is failed.
{ "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 } }