---
title: "Card Number Validator"
method: POST
path: "/api/v1/tools/credit-card-validator"
tags: ["tools"]
---

# Card Number Validator

`POST /api/v1/tools/credit-card-validator`

## Request

- Base URL: `https://toolforte.com`
- URL: `https://toolforte.com/api/v1/tools/credit-card-validator`
- Auth: HTTP bearer

Check a payment card number the way a checkout form does: the Luhn checksum that every major network uses to catch a mistyped digit, and the scheme behind the prefix (Visa, Mastercard, Amex, Discover, JCB, Diners). It is a format check and nothing more: it says nothing about whether a card exists, is active or has funds. The number is never logged, stored or returned, and the result shows at most the last four digits.

## Request body

- object
  - `cardNumber` string

## Response `200`

Successful result

- object
  - `ok` boolean
  - `data` object
    - `valid` boolean
    - `luhnValid` boolean
    - `scheme` string
    - `length` integer
    - `masked` string
    - `note` string

## Other responses

- `400`: Missing or invalid request fields
- `401`: Invalid or missing API key
- `429`: Monthly plan limit reached

---

[API](https://skmtc.dev/toolforte/apis/toolforte-api.md) · [All operations](https://skmtc.dev/toolforte/apis/toolforte-api/llms.txt) · [OpenAPI document](https://skmtc.dev/toolforte/apis/toolforte-api/revisions/4d814d484dfc?raw)
