# Validate IBAN (`validate.iban`)

Check an IBAN's format, country length and mod-97 check digits (80 countries). Computed locally; it does not prove the account exists.

- **Route:** `POST /v1/run/validate.iban`
- **Price:** $0.0002 per request ($0.20 per 1,000) · `cost_usd` on every response
- **Source:** GetAllAPIs compute (`compute`) · failover: no
- **Measured latency:** p50 0 ms · p95 0 ms · p99 0 ms (1 calls, 30d)
- **Heavy response:** no

## Input

| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| `iban` | string | yes |  | IBAN, spaces allowed |

## Output (`output` in the run envelope)

| Field | Meaning |
|---|---|
| `valid` | True when format, length and check digits are correct. |
| `country` | ISO country code. |
| `check_digits` | The two check digits. |
| `bban` | Country-specific account part. |
| `formatted` | IBAN in groups of four. |
| `reason` | Why it is valid or not. |

## Example

```bash
curl -s -X POST https://getallapis.com/v1/run/validate.iban \
  -H "Authorization: Bearer $GETALLAPIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"iban":"DE89 3704 0044 0532 0130 00"}'
```

```python
from getallapis_client import Client
client = Client()  # reads GETALLAPIS_API_KEY
result = client.run('validate.iban', {'iban': 'DE89 3704 0044 0532 0130 00'})
print(result['cost_usd'], result['output'])
```

```bash
getallapis run validate.iban '{"iban":"DE89 3704 0044 0532 0130 00"}'
```

Quote first (free, validates input): `POST /v1/quote/validate.iban` with the same body.
