This is a NodeJS API for validating cards.
- 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
$ cp .env.example .env
$ yarn install
$ yarn run dev
{
"creditCardNumber": "5500 0000 0000 0004",
"expirationDate": "08/23",
"cvv2": "123",
"email": "[email protected]",
"mobile": "07015234553",
"phoneNumber": "+2347015234553"
}
{
"valid": true,
"errorCodes": [],
"issuer": "mastercard"
}