> ## 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.

# Samples

> Valid sample messages for tests and demos.

`iso8583sim.core.samples`

## Functions

### `sample_message()`

```python theme={null}
def sample_message(
    message_type: str = 'auth',
    network: CardNetwork | None = None,
    pan: str | None = None,
    amount_minor_units: int = 1000,
    currency: str = '840',
    stan: str = '123456',
) -> ISO8583Message
```

Create a valid 1987 test message.

**Parameters**

<ResponseField name="message_type" type="str" default="'auth'">
  "auth" (0100), "financial" (0200) or "echo" (0800)
</ResponseField>

<ResponseField name="network" type="CardNetwork | None" default="None">
  Card network. Detected from the PAN when omitted.
</ResponseField>

<ResponseField name="pan" type="str | None" default="None">
  Card number. A well-known test PAN for the network is used when omitted.
</ResponseField>

<ResponseField name="amount_minor_units" type="int" default="1000">
  Amount in minor units (1000 = 10.00)
</ResponseField>

<ResponseField name="currency" type="str" default="'840'">
  ISO 4217 numeric currency code
</ResponseField>

<ResponseField name="stan" type="str" default="'123456'">
  System trace audit number
</ResponseField>

<ResponseField name="Returns" type="ISO8583Message">
  The message, ready to build
</ResponseField>


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