Skip to content

Femi-lawal/card-validation-api

Repository files navigation

CARD VALIDATION API

This is a NodeJS API for validating cards.

Requirements

  • NodeJS 14.15.1 or higher
  • Yarn
  • Copy the contents of env.example into a .env file
  • Ensure the token and client headers are contained in the request

To Run

$ cp .env.example .env
$ yarn install
$ yarn run dev

Documentation

Request

{
    "creditCardNumber": "5500 0000 0000 0004",
    "expirationDate": "08/23",
    "cvv2": "123",
    "email": "femilawal76@gmail.com",
    "mobile": "07015234553",
    "phoneNumber": "+2347015234553"
}

Response

{
    "valid": true,
    "errorCodes": [],
    "issuer": "mastercard"
}

About

NodeJS API for validating cards.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published