# Card number (Luhn) and IBAN validator

Check a card number with the Luhn checksum and name its network, or check an IBAN by length and mod-97.

- Endpoint: `POST https://setget.net/v1/tools/luhn-iban-validate` with JSON `{"input": {...}}`
- MCP: `run_tool` with `slug` = `luhn-iban-validate`
- Page: https://setget.net/tools/luhn-iban-validate

## Inputs

- `value` (required, string): The card number or IBAN. Spaces and hyphens are ignored.
- `kind` (optional, string, one of `auto`, `card`, `iban`, default `"auto"`): What the value is. "auto" decides from its first characters.

## Example 1

```json
{"input":{"value":"GB82 WEST 1234 5698 7654 32"}}
```

Result:

```json
{"kind":"iban","valid":true,"country":"GB","check_digits":"82","bban":"WEST12345698765432","length":22,"expected_length":22,"checksum_valid":true,"formatted":"GB82 WEST 1234 5698 7654 32","problems":[]}
```

## Example 2: A well-known Visa test number

```json
{"input":{"value":"4111 1111 1111 1111"}}
```

Result:

```json
{"kind":"card","valid":true,"network":"Visa","length":16,"luhn_valid":true,"length_valid":true,"last4":"1111","masked":"************1111","problems":[]}
```

**Does a valid result mean the card or account exists?** No. It only means the number is well formed. Nothing is looked up and no bank or card network is contacted.

**Is my card number stored or shown?** The result repeats only the last four digits. Use published test numbers rather than a real card wherever you can.

**How is the network found?** From the first digits and the length. Ranges overlap in places, so treat it as a best guess.
