> ## Documentation Index
> Fetch the complete documentation index at: https://iso8583sim.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Codes

> Reference tables and lookups for ISO 8583 code values.

`iso8583sim.core.codes`

## Functions

### `detect_network_from_pan()`

```python theme={null}
def detect_network_from_pan(pan: str) -> CardNetwork | None
```

Detect the card network from a PAN's issuer identification prefix.

**Parameters**

<ResponseField name="pan" type="str" required>
  Primary Account Number (digits only)
</ResponseField>

<ResponseField name="Returns" type="CardNetwork | None">
  The matching CardNetwork, or None if the prefix is not recognised
</ResponseField>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.