# Order IDs

Every POS payment gets a unique **Order ID** that identifies where, who, and when the payment was created.

## Format

```
POS-{terminalCode}-{cashierCode}-{timestamp}
```

### Components

| Part           | Description                                     | Example         |
| -------------- | ----------------------------------------------- | --------------- |
| `POS`          | Fixed prefix indicating a point-of-sale payment | `POS`           |
| `terminalCode` | The terminal's short code                       | `R1`            |
| `cashierCode`  | The cashier's short code                        | `JD`            |
| `timestamp`    | Millisecond timestamp (epoch)                   | `1707842400000` |

### Example

```
POS - R1 - JD - 1707842400000
 |     |    |    |
 |     |    |    └── Timestamp: Feb 13, 2024 at 16:00:00 UTC
 |     |    └─────── Cashier: JD (John Doe)
 |     └──────────── Terminal: R1 (Register 1)
 └────────────────── POS payment
```

### Breakdown

| Part     | Value           | Meaning                   |
| -------- | --------------- | ------------------------- |
| Prefix   | `POS`           | It's a POS payment        |
| Terminal | `R1`            | Terminal "Register 1"     |
| Cashier  | `JD`            | Cashier "John Doe"        |
| Time     | `1707842400000` | Feb 13, 2024 at 16:00 UTC |

## Why It Matters

The Order ID creates an **accountability trail**:

* **Which terminal?** The terminal short code tells you which register/location.
* **Which cashier?** The cashier short code tells you who processed the payment.
* **When?** The timestamp gives the exact moment of creation.

## Using Order IDs

### In the Dashboard

Order IDs appear in:

* Payment history list
* Payment detail views
* Search results (you can search by Order ID)

### For Auditing

Filter or search payments by:

* Terminal code (e.g., find all payments from `R1`)
* Cashier code (e.g., find all payments by `JD`)
* Date range using the timestamp portion

### For Customer Support

If a customer has a payment issue, ask for their Order ID. It immediately tells you:

* Which terminal processed it
* Which cashier was responsible
* The exact time of the transaction

## Uniqueness

Order IDs are guaranteed unique because:

* The timestamp is in milliseconds
* Combined with terminal + cashier codes, collisions are practically impossible
* Each payment also has a separate system-generated `paymentId` (UUIDv7) as a primary identifier


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.makapay.io/point-of-sale-pos/order-ids.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
