Credit Card Validator API - Luhn Check & Brand Detection
Send a credit card number and get back whether it passes the Luhn checksum, which card network issued it (Visa, Mastercard, Amex, Discover, JCB, Diners Club, UnionPay), and whether it is a credit or debit card. The number is validated server-side and never stored or logged.
Code examples
curl -X POST https://api.botoi.com/v1/validate/credit-card \
-H "Content-Type: application/json" \
-d '{"number":"4111111111111111"}'When to use this API
Validate card numbers at checkout before charging
Run a quick Luhn check on the card number before sending it to your payment processor. This catches typos and fake numbers before they hit Stripe or Adyen, reducing declined transaction fees.
Show the correct card brand icon in your payment form
Detect whether the user entered a Visa, Mastercard, or Amex number as they type and display the matching logo. Reduces user confusion and builds trust during checkout.
Flag suspicious card numbers in fraud review queues
Batch-validate card numbers stored in your risk system. Cards that fail the Luhn check are guaranteed invalid; auto-flag them so analysts focus on the ambiguous cases.
Frequently asked questions
Does this API store or log the card numbers I send?
Can this API verify that a card is active and has funds?
What card brands are supported?
Does the number need to be formatted in a specific way?
Is the Luhn algorithm enough to prevent fraud?
Get your API key
Free tier includes 5 requests per minute with no credit card required. Upgrade for higher limits.