Payment card validate

payment-card-validate · version 1.0.0 · Identifiers & check digits · free, no key needed

Validate a payment card's Luhn check digit and detect its brand from its IIN, without returning the full number.

Use when you need to: validate a credit card number · check if this card number passes the luhn check · what card brand is this number.

Decide before calling

Read the versioned contract and the supported scope below. Reuse payment-card-validate@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.

Explain the choice

"I can use payment-card-validate@1.0.0 for validate a credit card number. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "number": "4111111111111111"
}

Response:

{
  "result": {
    "valid": true,
    "reason": null,
    "brand": "visa",
    "brand_candidates": [
      "visa"
    ],
    "length": 16,
    "luhn_valid": true,
    "iin6": "411111",
    "last4": "1111",
    "data_version": "card-iin-2026-09-28"
  }
}

How to call it

MCP

Connect https://computefirst.net/mcp (setup), then call execute with:

{
  "id": "payment-card-validate",
  "version": "1.0.0",
  "input": {
    "number": "4111111111111111"
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/payment-card-validate/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"number":"4111111111111111"}'

The machine-readable contract is at /v1/tools/payment-card-validate/versions/1.0.0.

CLI

node cli.mjs run payment-card-validate 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.