Credit Card Validation API

Overview

This API allows you to validate any credit card number and returns the provider if valid. THIS API DOES NOT STORE CARD NUMBERS

Base URL

https://api.msmc.cc/api

Endpoints

Validate a credit card

Endpoint: /creditcard/check
Method: GET or POST

GET Requests

Queries Parameters:

Example Request:

/creditcard/check?card=371449635398431

Example URL:

https://api.msmc.cc/api/creditcard/check?card=371449635398431
POST Requests

Body Parameters:

Example Body:

{
  "card": "371449635398431"
}

Example Request:

curl -X POST https://api.msmc.cc/api/creditcard/check \
  -H "Content-Type: application/json" \
  -d '{"card":"371449635398431"}'
Example Response

{
  "card": "371449635398431",
  "valid": true,
  "provider": "American Express",
  "message": "card is valid"
}

Errors

Missing Query

This error will occur if you do not pas the card query in your request.

Example:

{
  "valid": false,
  "provider": null,
  "message": "no card number"
}

Invalid Card

This error will occur if you pass an invalid card number

Example:

{
  "card": "hsfuwefuwey",
  "valid": false,
  "provider": "unknown",
  "message": "card is invalid"
}

Support

For support, email [email protected]