0151 355 4555



Checks a credit card number for validity.

You can use Credit Card Validation in one of two ways:

  • Without specifying the CreditCardType - If you pass in a CreditCardType of Unknown then we will automatically detect the brand of credit card from the number (e.g. Visa, Mastercard, American Express), and then use the relevant rules for validating that card against the number you have supplied. The CreditCardType will be returned in the result. This can be very useful for speeding up transactions as you do not need to ask the user to specify their CreditCardType.
  • Specifying the CreditCardType - If you pass in any CreditCardType other than Unknown then we will only check your card against the rules relevant for that credit card.

The system performs checks on the number range and a checksum calculation to ensure no typographical errors have been entered. It does not check with the bank that the card is live, has available credit and has not expired.

View all Credit Card Validation (part of the Bank Validation suite) methods

Code Samples

<!-- Import the Integr8 Ajax API -->
<!-- NOTE: Get your own API key to use in the following script tag from: -->
<!-- http://www.data-8.co.uk/integr8/Admin/Ajax.aspx -->
<script src="https://webservices.data-8.co.uk/Javascript/Loader.ashx?key=your-api-key" type="text/javascript">

<script type="text/javascript">

function loadIntegr8() {
  // Load the CreditCardValidation Integr8 service

function IsValid(request) {
  /// <param name="request">data8.creditcardvalidationrequest. Set up the CreditCardType, CreditCardNumber properties before calling this method.</param>
  var creditcardvalidation = new data8.creditcardvalidation();

function showIsValidResult(result) {
  // Check that the call succeeded, and show the error message if there was a problem.
  if (!result.Status.Success) {
    alert('Error: ' + result.Status.ErrorMessage);
  else {
    // TODO: Process method results here.
    // Results can be extracted from the following fields:
    // result.CreditCardType
    //   Contains a type to indicate what type of Credit Card the card was validated to
    // result.Valid
    //   Contains a status code indicating if the incoming credit card number and credit card type could be validated.