Credit Card

POST/v0/credit-card

Validates credit card numbers using the Luhn algorithm. Accepts cards from Visa, Mastercard, American Express, Discover, JCB, Diners Club, and UnionPay. The card number is sent in the request body to avoid logging sensitive data in server access logs.

Guides: Node.js · Python

Request Body

{
  "number": "4111111111111111"
}

Example Request

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.isvalid.dev/v0/credit-card"

Response Fields

FieldTypeDescription
validbooleanWhether the card number is valid
networkstringDetected card network (e.g. Visa, Mastercard, Amex)
lengthnumberNumber of digits in the card number
luhnbooleanWhether the number passes the Luhn checksum

Example Response

{
  "valid": true,
  "network": "Visa",
  "length": 16,
  "luhn": true
}