# DataAegis Software Pvt Ltd — Middleware Terminal Specifications

## Version History

| Version | Author | Date       | Comments              |
|---------|--------|------------|-----------------------|
| V1.0    | Kasi   | 10-09-2025 | Initial draft         |
| V1.1    | Kasi   | 21-11-2025 | Updated for certification |

---

## Table of Contents

1. [Boot up sequence / Logon](#1-boot-up-sequence--logon)
2. [Key Exchange — TMK](#2-key-exchange--tmk)
3. [Key Exchange — Working Key](#3-key-exchange--working-key)
4. [Logoff](#4-logoff)
5. [Pre-Authorization](#5-pre-authorization)
6. [Pre-Authorization Completion](#6-pre-authorization-completion)
7. [Sale](#7-sale)
8. [Refund](#8-refund)
9. [Void](#9-void)
10. [Reversal](#10-reversal)
11. [Field Definitions](#11-field-definitions)

---

## 1. Boot up sequence / Logon

### Request — MTI 800

| DE (Field) | Name                                         | M/C/O | Max Len | Data Type | Bytes | Comments |
|-----------|----------------------------------------------|-------|---------|-----------|-------|----------|
| MTI       | Message type 800                             | M     | 4       | n         | 2     |          |
|           | Bit map, primary                             | M     | 64      | b         | 8     |          |
| 1         | Bit map, extended                            | M     | 64      | b         | 8     |          |
| 3         | Processing Code                              | M     | 6       | n         | 3     | 910000   |
| 7         | Transmission date and time                   | M     | 10      | n         | 5     | UTC format |
| 11        | System Trace Audit Number (STAN)             | M     | 6       | n         | 3     | 000001   |
| 24        | NII                                          | C     | 3       | n         | 1.5   | 782      |
| 41        | Card Acceptor Terminal Identification (CATID)| M     | 8       | an        | 8     | 12341234 |
| 42        | Card acceptor ID (CAID)                      | M     | 15      | an        | 15    | 123451234512345 |
| 63        | Reserved Data                                | M     | 999     | ans       | VAR   | `{"DeviceSN": "98250623730002", "Model": "MF919 S10", "AppName": "Shukria", "Version": "3.7"}` |
| 70        | Network management information code         | M     | 3       | N         | 1.5   | 001 – logon |

### Response — MTI 810

| DE (Field) | Name                                         | M/C/O | Max Len | Data Type | Bytes | Comments |
|-----------|----------------------------------------------|-------|---------|-----------|-------|----------|
| MTI       | Message type 810                             | M     | 4       | n         | 2     |          |
|           | Bit map, primary                             | M     | 64      | b         | 8     |          |
| 1         | Bit map, extended                            | C     | 64      | b         | 8     |          |
| 3         | Processing Code                              | M     | 6       | N         | 3     | 910000   |
| 7         | Transmission date and time                   | M     | 10      | n         | 5     | UTC format |
| 11        | System Trace Audit Number (STAN)             | M     | 6       | n         | 3     | 000001   |
| 12        | Local transaction date and time              | M     | 12      | n         | 6     | UTC format |
| 19        | NII                                          | C     | 3       | n         | 1.5   | 782      |
| 39        | Response Code                                | M     | 2       | an        | 2     | 00       |
| 41        | Card Acceptor Terminal Identification (CATID)| M     | 8       | ans       | 8     | 12341234 |
| 42        | Card acceptor ID (CAID)                      | M     | 15      | ans       | 15    | 1234512345 |
| 62        | Reserved Data                                | M     | 999     | ans       | VAR   | List of Banks. Each Bank will have Bank Name, ID, BaseKey Slot and Key Exchange Flow ID. `{"Bank": [{"Id": 1, "Name": "YSP", "BaseKeySlot": 1, "KeyExchangeFlowI": 1}]}` |
| 70        | Network management information code         | M     | 3       | N         | 1.5   | 001 – logon |

---

## 2. Key Exchange — TMK

### Request — MTI 820 (Processing Code 921000)

| DE (Field) | Name                                         | M/C/O | Max Len | Data Type | Bytes | Comments |
|-----------|----------------------------------------------|-------|---------|-----------|-------|----------|
| MTI       | Message type 820                             | M     | 4       | n         | 2     |          |
|           | Bit map, primary                             | M     | 64      | b         | 8     |          |
| 1         | Bit map, extended                            | C     | 64      | b         | 8     |          |
| 3         | Processing Code                              | M     | 6       | N         | 3     | 921000   |
| 7         | Transmission date and time                   | M     | 10      | n         | 5     | UTC format |
| 11        | System Trace Audit Number (STAN)             | M     | 6       | n         | 3     | 000002   |
| 24        | NII                                          | C     | 3       | n         | 1.5   | 782      |
| 41        | Card Acceptor Terminal Identification (CATID)| M     | 8       | ans       | 8     | 12341234 |
| 42        | Card acceptor ID (CAID)                      | O     | 15      | ans       | 15    | 123451234512345 |
| 61        | Reserved Data                                | M     | 999     | ans       | VAR   | `{"BankId": 1, "BaseKeyKcv": "ABABAB"}` |
| 63        | Reserved Data                                | M     | 999     | ans       | VAR   | `{"DeviceSN": "98250623730002", "Model": "MF919 S10", "AppName": "Shukria", "Version": "3.7"}` |
| 70        | Network management information code         | M     | 3       | N         | 1.5   | 101 – Key change |

### Response — MTI 820 (Processing Code 921000)

| DE (Field) | Name                                         | M/C/O | Max Len | Data Type | Bytes | Comments |
|-----------|----------------------------------------------|-------|---------|-----------|-------|----------|
| MTI       | Message type 820                             | M     | 4       | n         | 2     |          |
|           | Bit map, primary                             | M     | 64      | b         | 8     |          |
| 1         | Bit map, extended                            | C     | 64      | b         | 8     |          |
| 3         | Processing Code                              | M     | 6       | N         | 3     | 921000   |
| 7         | Transmission date and time                   | M     | 10      | n         | 5     | UTC format |
| 11        | System Trace Audit Number (STAN)             | M     | 6       | n         | 3     | 000002   |
| 24        | NII                                          | C     | 3       | n         | 1.5   | 782      |
| 39        | Response Code                                | M     | 2       | an        | 2     | 00       |
| 41        | Card Acceptor Terminal Identification (CATID)| M     | 8       | ans       | 8     | 12341234 |
| 42        | Card acceptor ID (CAID)                      | O     | 15      | ans       | 15    | 123451234512345 |
| 62        | Reserved Data                                | M     | 999     | ans       | VAR   | `{"Keys": [{"Key": "1234567812345678", "Kcv": "AABBCC", "Slot": 2, "KeyType": "TMK"}]}` |
| 70        | Network management information code         | M     | 3       | N         | 1.5   | 101 – Key change |

---

## 3. Key Exchange — Working Key

### Request — MTI 820 (Processing Code 922000)

| DE (Field) | Name                                         | M/C/O | Max Len | Data Type | Bytes | Comments |
|-----------|----------------------------------------------|-------|---------|-----------|-------|----------|
| MTI       | Message type 820                             | M     | 4       | n         | 2     |          |
|           | Bit map, primary                             | M     | 64      | b         | 8     |          |
| 1         | Bit map, extended                            | C     | 64      | b         | 8     |          |
| 3         | Processing Code                              | M     | 6       | N         | 3     | 922000   |
| 7         | Transmission date and time                   | M     | 10      | n         | 5     | UTC format |
| 11        | System Trace Audit Number (STAN)             | M     | 6       | n         | 3     | 000003   |
| 24        | NII                                          | C     | 3       | n         | 1.5   | 782      |
| 41        | Card Acceptor Terminal Identification        | M     | 8       | ans       | 8     | 12341234 |
| 42        | Card acceptor ID                             | O     | 15      | ans       | 15    | 123451234512345 |
| 61        | Reserved Data                                | M     | 999     | ans       | VAR   | `{"BankId": 1, "TmkKeyKcv": "ABCDEF"}` |
| 63        | Reserved Data                                | M     | 999     | ans       | VAR   | `{"DeviceSN": "98250623730002", "Model": "MF919 S10", "AppName": "Shukria", "Version": "3.7"}` |
| 70        | Network management information code         | M     | 3       | N         | 1.5   | 101 – Key change |

### Response — MTI 830

| DE (Field) | Name                                         | M/C/O | Max Len | Data Type | Bytes | Comments |
|-----------|----------------------------------------------|-------|---------|-----------|-------|----------|
| MTI       | Message type 830                             | M     | 4       | n         | 2     |          |
|           | Bit map, primary                             | M     | 64      | b         | 8     |          |
| 1         | Bit map, extended                            | C     | 64      | b         | 8     |          |
| 3         | Processing Code                              | M     | 6       | N         | 3     | 921000   |
| 7         | Transmission date and time                   | M     | 10      | n         | 5     | UTC format |
| 11        | System Trace Audit Number (STAN)             | M     | 6       | n         | 3     |          |
| 24        | NII                                          | C     | 3       | n         | 1.5   |          |
| 39        | Response Code                                | M     | 2       | an        | 2     |          |
| 41        | Card Acceptor Terminal Identification (CATID)| M     | 8       | ans       | 8     |          |
| 42        | Card acceptor ID (CAID)                      | O     | 15      | ans       | 15    | Merchant number |
| 62        | Reserved Data                                | M     | 999     | ans       | VAR   | `{"Keys": [{"Key": "1234567812345678", "Kcv": "AABBCC", "Slot": 2, "KeyType": "PIN"}]}` |
| 70        | Network management information code         | M     | 3       | N         | 1.5   | 101 – Key change |

---

## 4. Logoff

### Request — MTI 820 (Processing Code 910000)

| DE (Field) | Name                                         | M/C/O | Max Len | Data Type | Bytes | Comments |
|-----------|----------------------------------------------|-------|---------|-----------|-------|----------|
| MTI       | Message type 820                             | M     | 4       | N         | 2     |          |
|           | Bit map, primary                             | M     | 64      | B         | 8     |          |
| 1         | Bit map, extended                            | M     | 64      | B         | 8     |          |
| 3         | Processing Code                              | M     | 6       | N         | 3     | 910000   |
| 7         | Transmission date and time                   | M     | 10      | N         | 5     | UTC format |
| 11        | System Trace Audit Number (STAN)             | M     | 6       | N         | 3     |          |
| 12        | Local transaction date and time              | M     | 12      | N         | 6     |          |
| 24        | NII                                          | C     | 3       | N         | 1.5   |          |
| 63        | Reserved Data                                | M     | 999     | ans       | VAR   | `{"DeviceSN": "98250623730002", "Model": "MF919 S10", "AppName": "Shukria", "Version": "3.7"}` |
| 70        | Network management information code         | M     | 3       | N         | 1.5   | 002 – logoff |

### Response — MTI 830

| DE (Field) | Name                                         | M/C/O | Max Len | Data Type | Bytes | Comments |
|-----------|----------------------------------------------|-------|---------|-----------|-------|----------|
| MTI       | Message type 830                             | M     | 4       | n         | 2     |          |
|           | Bit map, primary                             | M     | 64      | b         | 8     |          |
| 1         | Bit map, extended                            | C     | 64      | b         | 8     |          |
| 3         | Processing Code                              | M     | 6       | N         | 3     |          |
| 7         | Transmission date and time                   | M     | 10      | n         | 5     | UTC format |
| 11        | System Trace Audit Number (STAN)             | M     | 6       | n         | 3     |          |
| 12        | Local transaction date and time              | M     | 12      | n         | 6     |          |
| 24        | NII                                          | C     | 3       | n         | 1.5   |          |
| 39        | Response Code                                | M     | 2       | an        | 2     |          |
| 41        | Card Acceptor Terminal Identification (CATID)| M     | 8       | ans       | 8     |          |
| 42        | Card acceptor ID (CAID)                      | M     | 15      | ans       | 15    | Merchant number |
| 70        | Network management information code         | M     | 3       | N         | 1.5   | 002 – logoff |

---

## 5. Pre-Authorization

### Request — MTI 100

| Field | Name                                         | M/C/O | Max Len | Data Type | Bytes | Comments |
|-------|----------------------------------------------|-------|---------|-----------|-------|----------|
| MTI   | Message type 100                             | M     | 4       | n         | 2     |          |
|       | Bit map primary                              | M     | 64      | b         | 8     |          |
| 2     | Primary Account Number (PAN)                 | C     | 19      | n         | VAR   | Only present for Manual PAN entry |
| 3     | Processing code                              | M     | 6       | n         | 3     | 000000   |
| 4     | Transaction amount                           | M     | 12      | n         | 6     | Requested amount (excludes fees) |
| 7     | Transmission date and time                   | M     | 10      | n         | 5     | UTC format |
| 11    | System Trace Audit Number (STAN)             | M     | 6       | n         | 3     |          |
| 12    | Local transaction date and time              | M     | 12      | n         | 6     |          |
| 14    | Expiry date                                  | C     | 4       | n         | 2     | Only present for Manual PAN entry |
| 22    | POS data                                     | M     | 3       | n         | 1.5   |          |
| 23    | Card Seq Number                              | C     | 3       | n         | 1.5   |          |
| 24    | NII                                          | M     | 3       | n         | 1.5   |          |
| 25    | POS Condition Code                           | M     | 2       | n         | 1     |          |
| 35    | Track 2 data                                 | C     | 37      | z         | VAR   | Only present for magnetic stripe read |
| 41    | Card Acceptor Terminal Identification (CATID)| M     | 8       | ans       | 8     |          |
| 42    | Card acceptor ID (CAID)                      | M     | 15      | ans       | 15    | Merchant number |
| 46    | Amounts fee                                  | O     | 999     | ans       | VAR   | `{"TaxAmount": "12.00", "ConvenienceAmount": "1.00"}` |
| 47    | Additional data – Private                    | C     | 999     | ansp      | VAR   | `{"CCV": "123", "CCI": "1", "PinKsn": "98250516990001000002"}` |
| 49    | Transaction currency code                    | O     | 3       | n         | 1.5   | 784      |
| 52    | Personal Identification Number (PIN) data    | C     | 64      | b         | 8     | Only required if PIN was entered |
| 55    | ICC data                                     | C     | 999     | b         | VAR   | Present for ICC processing |
| 57    | Cash Amount                                  | C     | 12      | n         | 6     |          |
| 64    | Message Authentication Code                  | O     | 64      | b         | 8     | Present only if DE128 is not present |

---

## 6. Pre-Authorization Completion

### Response — MTI 1110

| Field | Name                                         | M/C/O | Max Len | Data Type | Bytes | Comments |
|-------|----------------------------------------------|-------|---------|-----------|-------|----------|
| MTI   | Message type 1110                            | M     | 4       | n         | 2     |          |
|       | Primary bit map                              | M     | 64      | b         | 8     |          |
| 1     | Extended bit map                             | C     | 64      | b         | 8     | Present if DE65–128 present |
| 3     | Processing code                              | M     | 6       | n         | 3     | Same as request |
| 4     | Transaction amount                           | M     | 12      | n         | 6     | Same as request |
| 7     | Transmission date and time                   | M     | 10      | n         | 5     | UTC format |
| 11    | System Trace Audit Number (STAN)             | M     | 6       | n         | 3     | Same as request |
| 12    | Local transaction date and time              | M     | 12      | n         | 6     | Same as request |
| 15    | Reconciliation date                          | M     | 4       | n         | 2     | MMDD     |
| 24    | NII                                          | C     | 3       | n         | 1.5   | Same as request |
| 37    | Retrieval reference number                   | C     | 12      | anp       | 12    | May be absent if transaction declined |
| 38    | Approval Code                                | C     | 6       | anp       | 6     | Only present if transaction approved |
| 39    | Response Code                                | M     | 2       | an        | 2     |          |
| 41    | Card Acceptor Terminal Identification (CATID)| M     | 8       | ans       | 8     |          |
| 42    | Card acceptor ID (CAID)                      | M     | 15      | ans       | 15    | Merchant number |
| 46    | Amounts fee                                  | O     | 204     | ans       | VAR   |          |
| 55    | ICC data                                     | C     | 999     | b         | VAR   | Present processing ICC |
| 58    | Reserved National                            | O     | 4999    | ans       | VAR   | Receipt Details (see [DE58](#de58--reserved-national--receipt-details)) |
| 60    | Reserved, AdditionalData                     | C     | 999     | ans       | VAR   | `{"schemeReferencedata": "12345678", "mastercardReferenceData": "123123", "token": "ABCD178993", "CCV": "M"}` |
| 64    | Message Authentication Code                  | O     | 64      | b         | 8     | Present only if DE128 is not present |

---

## 7. Sale

### Request — MTI 220

| Field | Name                                         | M/C/O | Max Len | Data Type | Bytes | Comments |
|-------|----------------------------------------------|-------|---------|-----------|-------|----------|
| MTI   | Message type 220                             | M     | 4       | n         | 2     |          |
|       | Bit map primary                              | M     | 64      | b         | 8     |          |
| 2     | Primary Account Number (PAN)                 | C     | 19      | n         | VAR   | Only present for Manual PAN entry |
| 3     | Processing code                              | M     | 6       | n         | 3     | 000000   |
| 4     | Transaction amount                           | M     | 12      | n         | 6     | Requested amount (excludes fees) |
| 7     | Transmission date and time                   | M     | 10      | n         | 5     | UTC format |
| 11    | System Trace Audit Number (STAN)             | M     | 6       | n         | 3     |          |
| 12    | Local transaction date and time              | M     | 12      | n         | 6     |          |
| 14    | Expiry date                                  | C     | 4       | n         | 2     | Only present for Manual PAN entry |
| 22    | POS data                                     | M     | 3       | n         | 1.5   |          |
| 23    | Card Seq Number                              | C     | 3       | n         | 1.5   |          |
| 24    | NII                                          | M     | 3       | n         | 1.5   |          |
| 25    | POS Condition Code                           | M     | 2       | n         | 1     |          |
| 35    | Track 2 data                                 | C     | 37      | z         | VAR   | Only present for magnetic stripe read |
| 41    | Card Acceptor Terminal Identification (CATID)| M     | 8       | ans       | 8     |          |
| 42    | Card acceptor ID (CAID)                      | M     | 15      | ans       | 15    | Merchant number |
| 46    | Amounts fee                                  | O     | 204     | ans       | VAR   | `{"TaxAmount": "12.00", "ConvenienceAmount": "1.00"}` |
| 47    | Additional data                              | C     | 9999    | ansp      | VAR   | `{"CCV": "123", "CCI": "1", "Schemereference": "123456", "PinKsn": "98250516990001000002"}` |
| 49    | Transaction currency code                    | O     | 3       | n         | 1.5   |          |
| 52    | Personal Identification Number (PIN) data    | C     | 64      | b         | 8     | Only required if PIN was entered |
| 55    | ICC data                                     | C     | 999     | b         | VAR   | Present for ICC processing |
| 57    | Cash Amount                                  | C     | 12      | n         | 6     |          |
| 64    | Message Authentication Code                  | C     | 64      | b         | 8     | Present only if DE128 is not present |

### Response — MTI 230

| Field | Name                                         | M/C/O | Max Len | Data Type | Bytes | Comments |
|-------|----------------------------------------------|-------|---------|-----------|-------|----------|
| MTI   | Message type 230                             | M     | 4       | n         | 2     |          |
|       | Primary bit map                              | M     | 64      | b         | 8     |          |
| 1     | Extended bit map                             | C     | 64      | b         | 8     | Present if DE65–128 present |
| 3     | Processing code                              | M     | 6       | n         | 3     | Same as request |
| 4     | Transaction amount                           | M     | 12      | n         | 6     | Same as request |
| 7     | Transmission date and time                   | M     | 10      | n         | 5     | UTC format |
| 11    | System Trace Audit Number (STAN)             | M     | 6       | n         | 3     | Same as request |
| 12    | Local transaction date and time              | M     | 12      | n         | 6     | Same as request |
| 15    | Reconciliation date                          | M     | 4       | n         | 2     | MMDD     |
| 24    | NII                                          | C     | 3       | n         | 1.5   | Same as request |
| 37    | Retrieval reference number                   | C     | 12      | anp       | 12    | May be absent if transaction declined |
| 38    | Approval Code                                | C     | 6       | anp       | 6     | Only present if transaction approved |
| 39    | Response Code                                | M     | 2       | an        | 2     |          |
| 41    | Card Acceptor Terminal Identification (CATID)| M     | 8       | ans       | 8     |          |
| 42    | Card acceptor ID (CAID)                      | M     | 15      | ans       | 15    | Merchant number |
| 55    | ICC data                                     | C     | 999     | b         | VAR   | Present processing ICC |
| 58    | Reserved National                            | O     | 4999    | ans       | VAR   | Receipt Details (see [DE58](#de58--reserved-national--receipt-details)) |
| 60    | Reserved AdditionalData                      | C     | 999     | ans       | VAR   | `{"schemeReferencedata": "12345678", "mastercardReferenceData": "123123", "token": "ABCD178993"}` |
| 64    | Message Authentication Code                  | C     | 64      | b         | 8     | Present only if DE128 is not present |

---

## 8. Refund

### Request — MTI 200 (Processing Code 200000)

| Field | Name                                         | M/C/O | Max Len | Data Type | Bytes | Comments |
|-------|----------------------------------------------|-------|---------|-----------|-------|----------|
| MTI   | Message type 200                             | M     | 4       | n         | 2     |          |
|       | Bit map primary                              | M     | 64      | b         | 8     |          |
| 2     | Primary Account Number (PAN)                 | C     | 19      | n         | VAR   | Only present for Manual PAN entry |
| 3     | Processing code                              | M     | 6       | n         | 3     | 200000   |
| 4     | Transaction amount                           | M     | 12      | n         | 6     | Requested amount (excludes fees) |
| 7     | Transmission date and time                   | M     | 10      | n         | 5     | UTC format |
| 11    | System Trace Audit Number (STAN)             | M     | 6       | n         | 3     |          |
| 12    | Local transaction date and time              | M     | 12      | n         | 6     |          |
| 14    | Expiry date                                  | C     | 4       | n         | 2     | Only present for Manual PAN entry |
| 22    | POS data                                     | M     | 3       | n         | 1.5   |          |
| 23    | Card Seq Number                              | C     | 3       | n         | 1.5   |          |
| 24    | NII                                          | M     | 3       | n         | 1.5   |          |
| 25    | POS Condition Code                           | M     | 2       | n         | 1     |          |
| 35    | Track 2 data                                 | C     | 37      | z         | VAR   | Only present for magnetic stripe read |
| 41    | Card Acceptor Terminal Identification (CATID)| M     | 8       | ans       | 8     |          |
| 42    | Card acceptor ID (CAID)                      | M     | 15      | ans       | 15    | Merchant number |
| 46    | Amounts fee                                  | O     | 204     | ans       | VAR   | `{"TaxAmount": "12.00", "ConvenienceAmount": "1.00"}` |
| 47    | Additional data – Private                    | C     | 9999    | ansp      | VAR   | `{"CCV": "123", "CCI": "1", "Schemereference": "123456", "PinKsn": "98250516990001000002"}` |
| 49    | Transaction currency code                    | O     | 3       | n         | 1.5   | 784      |
| 52    | Personal Identification Number (PIN) data    | C     | 64      | b         | 8     | Only required if PIN was entered |
| 55    | ICC data                                     | C     | 999     | b         | VAR   | Present for ICC processing |
| 57    | Cash Amount                                  | C     | 12      | n         | 6     |          |
| 64    | Message Authentication Code                  | C     | 64      | b         | 8     | Present only if DE128 is not present |

### Response — MTI 210

| Field | Name                                         | M/C/O | Max Len | Data Type | Bytes | Comments |
|-------|----------------------------------------------|-------|---------|-----------|-------|----------|
| MTI   | Message type 210                             | M     | 4       | n         | 2     |          |
|       | Primary bit map                              | M     | 64      | b         | 8     |          |
| 1     | Extended bit map                             | C     | 64      | b         | 8     | Present if DE65–128 present |
| 3     | Processing code                              | M     | 6       | n         | 3     | Same as request |
| 4     | Transaction amount                           | M     | 12      | n         | 6     | Same as request |
| 7     | Transmission date and time                   | M     | 10      | n         | 5     | UTC format |
| 11    | System Trace Audit Number (STAN)             | M     | 6       | n         | 3     | Same as request |
| 12    | Local transaction date and time              | M     | 12      | n         | 6     | Same as request |
| 15    | Reconciliation date                          | M     | 4       | n         | 2     | MMDD     |
| 24    | NII                                          | C     | 3       | n         | 1.5   | Same as request |
| 37    | Retrieval reference number                   | C     | 12      | anp       | 12    | May be absent if transaction declined |
| 38    | Approval Code                                | C     | 6       | anp       | 6     | Only present if transaction approved |
| 39    | Response Code                                | M     | 2       | an        | 2     |          |
| 41    | Card Acceptor Terminal Identification (CATID)| M     | 8       | ans       | 8     |          |
| 42    | Card acceptor ID (CAID)                      | M     | 15      | ans       | 15    | Merchant number |
| 55    | ICC data                                     | C     | 999     | b         | VAR   | Present processing ICC |
| 58    | Reserved National                            | O     | 4999    | ans       | VAR   | Receipt Details (see [DE58](#de58--reserved-national--receipt-details)) |
| 60    | Reserved AdditionalData                      | C     | 999     | ans       | VAR   | `{"schemeReferencedata": "12345678", "mastercardReferenceData": "123123", "token": "ABCD178993"}` |
| 64    | Message Authentication Code                  | C     | 64      | b         | 8     | Present only if DE128 is not present |

---

## 9. Void

### Request — MTI 200 (Processing Code 200000)

| Field | Name                                         | M/C/O | Max Len | Data Type | Bytes | Comments |
|-------|----------------------------------------------|-------|---------|-----------|-------|----------|
| MTI   | Message type 200                             | M     | 4       | n         | 2     |          |
|       | Bit map primary                              | M     | 64      | b         | 8     |          |
| 2     | Primary Account Number (PAN)                 | C     | 19      | n         | VAR   | Only present for Manual PAN entry |
| 3     | Processing code                              | M     | 6       | n         | 3     | 200000   |
| 4     | Transaction amount                           | M     | 12      | n         | 6     | Requested amount (excludes fees) |
| 7     | Transmission date and time                   | M     | 10      | n         | 5     | UTC format |
| 11    | System Trace Audit Number (STAN)             | M     | 6       | n         | 3     |          |
| 12    | Local transaction date and time              | M     | 12      | n         | 6     |          |
| 14    | Expiry date                                  | C     | 4       | n         | 2     | Only present for Manual PAN entry |
| 22    | POS data                                     | M     | 3       | n         | 1.5   |          |
| 23    | Card Seq Number                              | C     | 3       | n         | 1.5   |          |
| 24    | NII                                          | M     | 3       | n         | 1.5   |          |
| 25    | POS Condition Code                           | M     | 2       | n         | 1     |          |
| 35    | Track 2 data                                 | C     | 37      | z         | VAR   | Only present for magnetic stripe read |
| 41    | Card Acceptor Terminal Identification (CATID)| M     | 8       | ans       | 8     |          |
| 42    | Card acceptor ID (CAID)                      | M     | 15      | ans       | 15    | Merchant number |
| 46    | Amounts fee                                  | O     | 204     | ans       | VAR   | `{"TaxAmount": "12.00", "ConvenienceAmount": "1.00"}` |
| 47    | Additional data                              | C     | 9999    | ansp      | VAR   | `{"CCV": "123", "CCI": "1", "Schemereference": "123456", "PinKsn": "98250516990001000002"}` |
| 49    | Transaction currency code                    | O     | 3       | n         | 1.5   |          |
| 52    | Personal Identification Number (PIN) data    | C     | 64      | b         | 8     | Only required if PIN was entered |
| 55    | ICC data                                     | C     | 999     | b         | VAR   | Present for ICC processing |
| 64    | Message Authentication Code                  | C     | 64      | b         | 8     | Present only if DE128 is not present |

### Response — MTI 210

| Field | Name                                         | M/C/O | Max Len | Data Type | Bytes | Comments |
|-------|----------------------------------------------|-------|---------|-----------|-------|----------|
| MTI   | Message type 210                             | M     | 4       | n         | 2     |          |
|       | Primary bit map                              | M     | 64      | b         | 8     |          |
| 1     | Extended bit map                             | C     | 64      | b         | 8     | Present if DE65–128 present |
| 3     | Processing code                              | M     | 6       | n         | 3     | Same as request |
| 4     | Transaction amount                           | M     | 12      | n         | 6     | Same as request |
| 7     | Transmission date and time                   | M     | 10      | n         | 5     | UTC format |
| 11    | System Trace Audit Number (STAN)             | M     | 6       | n         | 3     | Same as request |
| 12    | Local transaction date and time              | M     | 12      | n         | 6     | Same as request |
| 15    | Reconciliation date                          | M     | 4       | n         | 2     | MMDD     |
| 24    | NII                                          | C     | 3       | n         | 1.5   | Same as request |
| 37    | Retrieval reference number                   | C     | 12      | anp       | 12    | May be absent if transaction declined |
| 38    | Approval Code                                | C     | 6       | anp       | 6     | Only present if transaction approved |
| 39    | Response Code                                | M     | 2       | an        | 2     |          |
| 41    | Card Acceptor Terminal Identification (CATID)| M     | 8       | ans       | 8     |          |
| 42    | Card acceptor ID (CAID)                      | M     | 15      | ans       | 15    | Merchant number |
| 55    | ICC data                                     | C     | 999     | b         | VAR   | Present processing ICC |
| 58    | Reserved National                            | O     | 4999    | ans       | VAR   | Receipt Details (see [DE58](#de58--reserved-national--receipt-details)) |
| 60    | Reserved AdditionalData                      | C     | 999     | ans       | VAR   | `{"schemeReferencedata": "12345678", "mastercardReferenceData": "123123", "token": "ABCD178993"}` |
| 64    | Message Authentication Code                  | C     | 64      | b         | 8     | Present only if DE128 is not present |

---

## 10. Reversal

### Request — MTI 420

| Field | Name                                         | M/C/O | Max Len | Data Type | Bytes | Comments |
|-------|----------------------------------------------|-------|---------|-----------|-------|----------|
| MTI   | Message type 420                             | M     | 4       | n         | 2     |          |
|       | Bit map primary                              | M     | 64      | b         | 8     |          |
| 2     | Primary Account Number (PAN)                 | C     | 19      | n         | VAR   | Only present for Manual PAN entry |
| 3     | Processing code                              | M     | 6       | n         | 3     | 000000   |
| 4     | Transaction amount                           | M     | 12      | n         | 6     | Requested amount (excludes fees) |
| 7     | Transmission date and time                   | M     | 10      | n         | 5     | UTC format |
| 11    | System Trace Audit Number (STAN)             | M     | 6       | n         | 3     |          |
| 12    | Local transaction date and time              | M     | 12      | n         | 6     |          |
| 14    | Expiry date                                  | C     | 4       | n         | 2     | Only present for Manual PAN entry |
| 22    | POS data                                     | M     | 3       | n         | 1.5   |          |
| 23    | Card Seq Number                              | C     | 3       | n         | 1.5   |          |
| 24    | NII                                          | M     | 3       | n         | 1.5   |          |
| 25    | POS Condition Code                           | M     | 2       | n         | 1     |          |
| 35    | Track 2 data                                 | C     | 37      | z         | VAR   | Only present for magnetic stripe read |
| 41    | Card Acceptor Terminal Identification (CATID)| M     | 8       | ans       | 8     |          |
| 42    | Card acceptor ID (CAID)                      | M     | 15      | ans       | 15    | Merchant number |
| 46    | Amounts fee                                  | O     | 204     | ans       | VAR   | `{"TaxAmount": "12.00", "ConvenienceAmount": "1.00"}` |
| 47    | Additional data                              | C     | 9999    | ansp      | VAR   | `{"CCV": "123", "CCI": "1", "Schemereference": "123456", "PinKsn": "98250516990001000002"}` |
| 49    | Transaction currency code                    | O     | 3       | n         | 1.5   |          |
| 64    | Message Authentication Code                  | C     | 64      | b         | 8     | Present only if DE128 is not present |

### Response — MTI 430

| Field | Name                                         | M/C/O | Max Len | Data Type | Bytes | Comments |
|-------|----------------------------------------------|-------|---------|-----------|-------|----------|
| MTI   | Message type 430                             | M     | 4       | n         | 2     |          |
|       | Primary bit map                              | M     | 64      | b         | 8     |          |
| 1     | Extended bit map                             | C     | 64      | b         | 8     | Present if DE65–128 present |
| 3     | Processing code                              | M     | 6       | n         | 3     | Same as request |
| 4     | Transaction amount                           | M     | 12      | n         | 6     | Same as request |
| 7     | Transmission date and time                   | M     | 10      | n         | 5     | UTC format |
| 11    | System Trace Audit Number (STAN)             | M     | 6       | n         | 3     | Same as request |
| 12    | Local transaction date and time              | M     | 12      | n         | 6     | Same as request |
| 15    | Reconciliation date                          | M     | 4       | n         | 2     | MMDD     |
| 24    | NII                                          | C     | 3       | n         | 1.5   | Same as request |
| 37    | Retrieval reference number                   | C     | 12      | anp       | 12    | May be absent if transaction declined |
| 38    | Approval Code                                | C     | 6       | anp       | 6     | Only present if transaction approved |
| 39    | Response Code                                | M     | 2       | an        | 2     |          |
| 41    | Card Acceptor Terminal Identification (CATID)| M     | 8       | ans       | 8     |          |
| 42    | Card acceptor ID (CAID)                      | M     | 15      | ans       | 15    | Merchant number |
| 55    | ICC data                                     | C     | 999     | b         | VAR   | Present processing ICC |
| 58    | Reserved National                            | O     | 4999    | ans       | VAR   | Receipt Details (see [DE58](#de58--reserved-national--receipt-details)) |
| 60    | Reserved AdditionalData                      | C     | 999     | ans       | VAR   | `{"schemeReferencedata": "12345678", "mastercardReferenceData": "123123", "token": "ABCD178993"}` |
| 64    | Message Authentication Code                  | C     | 64      | b         | 8     | Present only if DE128 is not present |

---

## 11. Field Definitions

### DE3 — Processing Code

**Financial Transactions**

| Position | Contents            | Description |
|----------|---------------------|-------------|
| 1–2      | 00                  | Goods/Services |
| 1–2      | 01                  | Cash Withdrawal |
| 1–2      | 09                  | Goods and services with cash disbursement |
| 1–2      | 20                  | Returns/Refunds |
| 1–2      | 33                  | Account Verification |
| 3–4      | 10                  | Savings Account |
| 3–4      | 20                  | Cheque Account |
| 3–4      | 30                  | Credit Account |
| 5–6      | 00                  | Filler |

**Administration Transactions**

| Position | Contents | Description |
|----------|----------|-------------|
| 1–2      | 91       | Logon/Logoff |
| 1–2      | 92       | Key Exchange |
| 3–4      | 00       | Logon/Logoff |
| 3–4      | 10       | TMK Key |
| 3–4      | 20       | Working Key |
| 5–6      | 00       | Filler |

---

### DE4 — Amount, Transaction
- Attributes: n 12
- Funds requested by the cardholder in the local currency of the acquirer. An amount of `000000000000` is used for Account Verification messages (MTI 0100, Processing Code 333000).

### DE7 — Transmission Date and Time
- Attributes: n 10
- GMT. Format: `MMddHHmmss`

### DE11 — System Trace Audit Number (STAN)
- Attributes: n 6
- Assigned by the message initiator. Remains unchanged for all messages throughout the life of the transaction.

### DE12 — Time, Local Transaction
- Attributes: n 6
- Format: `HHmmss`

### DE13 — Date, Local Transaction
- Attributes: n 4
- Format: `MMdd`

### DE14 — Date, Expiry
- Attributes: n 4
- Format: `YYMM`
- Optional on inbound Card Present messaging. Extracted from DE35 Track 2 where available; only required if DE35 is absent.

### DE15 — Date, Settlement
- Attributes: n 4
- Format: `MMdd`

### DE22 — POS Entry Mode
- Attributes: n 3

| Position | Value | Description |
|----------|-------|-------------|
| 1–2      | 01    | Manual Card Entry |
| 1–2      | 02    | Magnetic stripe |
| 1–2      | 05    | Integrated circuit card (EMV) |
| 1–2      | 07    | Contactless EMV |
| 1–2      | 80    | Fallback to mag. stripe when ICC read failed |
| 3        | 1     | PIN entry capable |
| 3        | 2     | Terminal not capable of PIN entry |
| 3        | 8     | Terminal PIN capable but no PIN entered [RFU] |
| 3        | 9     | PIN verified by terminal [RFU] |

### DE23 — Card Sequence Number
- Attributes: n 3

### DE24 — NII (Network Identification)
- Attributes: n 3

### DE25 — POS Condition Code
- Attributes: n 2

| Code | Description | Code | Description |
|------|-------------|------|-------------|
| 00   | Normal presentment | 01 | Customer not present |
| 02   | Unattended machine able to retain card | 03 | Merchant suspicious |
| 04   | Electronic cash register interface | 05 | Customer present, card not present |
| 06   | Pre-authorised request | 07 | Telephone device request |
| 08   | Mail and/or telephone order | 09 | Security alert |
| 10   | Customer identity verified | 11 | Suspected fraud |
| 12   | Security reason | 13 | Representation of item |
| 14   | Public utility terminal | 15 | Customer terminal (home terminal) |
| 16   | Administration terminal | 17 | Returned item (Charge back) |
| 18   | No cheque in envelope/all returned | 19 | Deposit out-of-balance/all returned |
| 20   | Payment out-of-balance/all returned | 21 | Manual reversal |
| 22   | Terminal error/counted | 23 | Terminal error/not counted |
| 24   | Deposit out-of-balance/applied contents | 25 | Payment out-of-balance/applied contents |
| 26   | Withdrawal had error/reversed | 27 | Unattended terminal unable to retain card |
| 28–40 | Reserved for ISO use | 41 | Cash dispensing machine |
| 42   | Electronic payment terminal | 43 | Card activated fuel dispenser |
| 44   | Travel ticket vending machine | 45 | Vending machine, undefined |
| 46–50 | Reserved for National use | 51–99 | Reserved for Private use |

### DE35 — Track-2 Data
- Attributes: z ..37
- Required for card-present transactions only.

### DE37 — Retrieval Reference Number
- Attributes: an 12

### DE38 — Authorisation Identification Response
- Attributes: an 6

### DE39 — Response Code
- Attributes: an 2
- Absence of DE39 is equivalent to value `00`. Approved Advices (0120/0220) and reversals (0420) will not contain DE39.

| Code | Meaning | Action |
|------|---------|--------|
| 00   | Approval | Approved |
| 01   | Declined – Call auth centre | Decline & call centre |
| 02   | Referral | Call Auth Centre |
| 03   | Invalid merchant number | Contact Merchant Business |
| 04   | Declined – Pick up card | Treat as Decline |
| 05   | Declined | Decline |
| 06   | Error | Contact Acquirer |
| 07   | Pick up card special condition | Treat as Decline |
| 08   | Approve with signature | Approved |
| 12   | Invalid transaction | Treat as Decline & Advise customer |
| 13   | Invalid amount | Amount is invalid |
| 14   | Invalid card number | Advise customer |
| 15   | Invalid issuer | Advise customer |
| 19   | Re-enter transaction | Resend transaction |
| 21   | No action taken | Non-matching reversal. Do not resend |
| 25   | Unable to locate record on file | Advise customer |
| 30   | Format error | Advise your technical department |
| 31   | Invalid card type | Not valid – contact ACQUIRER |
| 33   | Expired card | Decline |
| 34   | Suspected fraud | Treat as Decline |
| 35   | Card acceptor contact acquirer | Contact ACQUIRER |
| 36   | Restricted card | Treat as Decline |
| 38   | Allowable PIN tries exceeded | Treat as decline |
| 41   | Lost card | Advise ACQUIRER Auth Centre |
| 43   | Stolen card | Advise ACQUIRER Auth Centre |
| 51   | Insufficient funds | Decline |
| 54   | Expired card | Decline |
| 55   | Incorrect PIN | Treat as decline |
| 57   | Invalid transaction for card | Advise ACQUIRER Auth Centre |
| 58   | Invalid transaction for terminal | Advise customer |
| 59   | Suspected fraud | Treat as Decline |
| 60   | Card acceptor contact acquirer | Contact ACQUIRER |
| 61   | Withdrawal limit exceeded | Advise customer |
| 62   | Restricted card | Advise customer |
| 63   | Security violation | Advise ACQUIRER Auth Centre |
| 65   | Activity count limit exceeded | Advise Customer |
| 75   | Allowable PIN tries exceeded | Treat as decline |
| 82   | Volume parameters exceeded | Transaction exceeded – advise customer |
| 91   | Host unavailable | Resend later |
| 92   | Unable to route transaction | Resend later |
| 94   | Duplicate transmission detected | Contact ACQUIRER |
| 96   | System error | Contact ACQUIRER |
| 98   | MAC error | Contact ACQUIRER |

### DE41 — Card Acceptor Terminal Identification (CATID)
- Attributes: ans 8
- Unique code identifying the terminal at a card acceptor location.

### DE42 — Card Acceptor Identification Code (CAID)
- Attributes: ans 15
- Merchant number. Supplied during boot-up.

---

### DE46 — Additional Amount (Amounts Fee)

JSON sub-elements:

| Tag                | Description                        | Sample Value |
|--------------------|------------------------------------|--------------|
| TaxAmount          | Tax Amount (with decimal)          | `4.00`       |
| ConvenienceAmount  | Convenience Amount (with decimal)  | `3.00`       |
| CashBackAmount     | Cash Amount (with decimal)         | `2.00`       |
| TipAmount          | Tip Amount (with decimal)          | `1.00`       |

---

### DE47 — Additional Data – Private

JSON sub-elements:

| Tag        | Description                                          | Sample Value |
|------------|------------------------------------------------------|--------------|
| CCV        | Card Check Value                                     | `123` |
| CCI        | Card Check Indicator                                 | See enum below |
| CCT        | Card Check Type                                      | See enum below |
| ECM        | E-Commerce and Mail Order/Telephone Order Indicator  | See enum below |
| SLI        | Security Level Indicator                             | See enum below |
| XID        | Transaction ID (Visa Only)                           | Length 20/40 |
| CAV        | Cardholder Authentication Value                      | Length 20/28/40 |
| CAR        | Cardholder Authentication Results                    | See enum below |
| OrigMti    | Original Transaction Type                            | `0200` |
| OrigDate   | Original Date                                        | `20250630` |
| OrigTime   | Original Time                                        | `151617` |
| OrigStan   | Original STAN                                        | `000121` |

#### CCI — Card Check Indicator

| Value | Description |
|-------|-------------|
| 0     | CCV value is deliberately bypassed or not provided by the card acceptor |
| 1     | CCV value is present |
| 2     | CCV value is on the card but illegible |
| 9     | Cardholder states the card has no CCV imprint |

#### CCT — Card Check Type

| Value | Description |
|-------|-------------|
| 0     | Only the normal response code in DE39 should be returned |
| 1     | The normal response code in DE39 and CCV tag shall be returned |

#### CCV — Card Check Value Response

| Value | Description |
|-------|-------------|
| M     | CVV Matched |
| N     | CVV Not Matched |
| P     | CVV Not Processed |
| S     | Suspicious |
| U     | Issuer Not Registered |

#### ECM — Electronic Commerce Indicator (1st Position)

| Value | Description |
|-------|-------------|
| 0     | Unknown/Not Applicable |
| 1     | Telephone order |
| 2     | Mail order |
| 3     | Internet order |

#### ECM — Recurring Transaction Indicator (2nd Position)

| Value | Description |
|-------|-------------|
| 0     | Unknown/Not Applicable |
| 1     | Single transaction |
| 2     | Recurring Transaction |
| 3     | Installment payment |

#### SLI — Security Level Indicator

| Value | Description |
|-------|-------------|
| 00    | Not Applicable |
| 04    | Mastercard Digital Secure Remote Payment transaction |
| 05    | Secure Ecommerce Transaction certificate (VbV/SecureCode) |
| 06    | Non-authenticated E-Commerce (VbV/SecureCode supported by merchant, not cardholder) |
| 07    | Non-authenticated E-Commerce (channel encrypted transaction) |
| 08    | Non-secure transaction in the clear over network |
| 09    | Non-authenticated security transaction, card acceptor is SET Capable |

#### CAR — Cardholder Authentication Result

| Value | Description |
|-------|-------------|
| 0     | CAVV Authentication results invalid |
| 1     | CAVV Failed validation – authentication |
| 2     | CAVV Passed validation – authentication |
| 3     | CAVV Passed validation – attempt |

---

### DE58 — Reserved National (Receipt Details)

Attributes: ans ....4999

Receipt is delivered as a JSON structure. Example:

```json
{
  "receipt": {
    "type": "Sale",
    "elements": [
      { "logo-space": {} },
      {
        "text": {
          "lineFeed": 1,
          "font-size": "3:3",
          "bold": true,
          "align": "CENTER",
          "value": "JPOS PAYMENT SYSTEM"
        }
      },
      { "text": { "align": "LEFT", "value": "MID: 123456789012345" } },
      { "text": { "align": "LEFT", "value": "TID: 12345671" } },
      { "text": { "align": "LEFT", "value": "DATE/TIME: 2025-11-06 08:26:51" } },
      { "text": { "lineFeed": 1, "align": "LEFT", "value": "TRACE NO: 000004" } },
      { "text": { "font-size": "2:2", "bold": true, "align": "CENTER", "value": "SALE" } },
      { "text": { "align": "CENTER", "value": "VISA" } },
      {
        "text": {
          "lineFeed": 1,
          "font-size": "3:3",
          "bold": true,
          "align": "CENTER",
          "value": "Amount: $ 5.00"
        }
      },
      { "text": { "align": "LEFT", "value": "REF NO: 082648000004" } },
      { "text": { "lineFeed": 2, "align": "LEFT", "value": "RESPONSE: 00 - APPROVED" } },
      {
        "text": {
          "lineFeed": 1,
          "align": "CENTER",
          "value": "Thank you for your business",
          "font": "BOLD"
        }
      },
      { "paper-cut": {} }
    ]
  }
}
```

---

### DE60 — Additional Data

| Tag                    | Description                                      | Sample Value   |
|------------------------|--------------------------------------------------|----------------|
| CCV                    | CCV Response (see CCV enum)                      |                |
| SchemeReferencedata    | Scheme reference from card association (Visa/MC/Amex) | `123456`  |
| MastercardReferenceData| MasterCard specific reference data               | `MC123456`     |
| Token                  | Token for follow-up transaction                  |                |
| BankStan               | STAN sent to host                                | `000012`       |
| BankTxnRefNumber       | Reference number transceived with host           | `123456789012` |
| BankBatchNumber        | Batch number sent to host                        | `000025`       |
| BankTxnTime            | Time sent to host (HHmmss)                       | `182535`       |
| BankTxnDate            | Date sent to host (YYYYMMdd)                     | `20250824`     |

---

### DE61 — Additional Data

| Tag         | Description                  | Sample Value |
|-------------|------------------------------|--------------|
| BaseKeyKcv  | KCV of BaseKey               | `ABCDEF`     |
| TmkKeyKcv   | KCV of Terminal Master Key   | `ABABAB`     |
| BankId      | Bank ID in middleware         | `1`          |

---

### DE62 — Additional Data

| Tag                  | Description                              | Sample Value         |
|----------------------|------------------------------------------|----------------------|
| Bank[].BankId        | Bank ID in middleware                    | `1`                  |
| Bank[].BaseKeySlot   | Slot to store the key                    | `1`                  |
| Bank[].KeyExchangeFlowId | ID referring the key storing process | `1`                  |
| Keys[].Slot          | Slot to store the key                    | `2`                  |
| Keys[].Key           | PIN/MAC key encrypted by base key        | `1234567812345670`   |
| Keys[].Kcv           | KCV of the key                           | `123456`             |
| Keys[].KeyType       | Key type: `PIN` / `MAC` / `LINE`         |                      |

---

### DE63 — Additional Data (Device Information)

| Tag      | Description                    | Sample Value         |
|----------|--------------------------------|----------------------|
| DeviceSN | Device Serial Number           | `123-123-123`        |
| Model    | Model Number                   | `MF919`              |
| Version  | Software version of application| `1.0.0`              |
| AppName  | Application name               | `Shukria`            |
| BankId   | Bank ID                        | `1`                  |

Example:
```json
{
  "DeviceSN": "98250623730002",
  "Model": "MF919 S10",
  "AppName": "Shukria",
  "Version": "3.7"
}
```

---

### DE70 — Network Management Information Code

| Value | Description   |
|-------|---------------|
| 001   | Logon         |
| 002   | Logoff        |
| 101   | Key Exchange  |
| 301   | Echo          |
