Validation

Validate a credit card number

Checks the Luhn checksum and detects the network (Visa, Mastercard, Amex, Discover, Diners, JCB). An invalid card is still a successful call (valid=false). The number is never stored or logged.

Costs 1 credit per call.

post/validate-card

Request

  • Base URL: https://api.cofferdock.com
  • URL: https://api.cofferdock.com/validate-card
  • Auth: API key in header x-api-key

Request body

numberstring required

The card number to check, as a string. Spaces and hyphens are ignored. A valid number has 12 to 19 digits (up to 40 characters accepted).

Response

Result.

successboolean
validboolean
networkstring nullable
lengthinteger

Changes

No recorded changes to this operation across all 1 revision of this API.