---
updatedAt: 2025-10-27T06:39:58.000Z
agentTools:
  projectIndex: https://developer.2c2p.com/llms.txt
---

# Response Parameters

> 📘 Data Attribute Reference
>
> **Data Type**
>
> * A: Alphabet
> * AN: Alphanumeric
> * NT: NText
> * C: Characters
> * B: Boolean
> * D: Decimal
> * N: Numeric
>
> **Mandatory attributes**
>
> * M: Mandatory
> * C: Conditional
> * O: Optional

# Response Parameters

#### Response: PosResponse\<T>

All responses from the POS Lib return as a sealed class:

```kotlin
sealed class PosResponse<T>(val rspCode: String, val rspMsg: String) : Serializable
```

Sub Types

| Type            | Description                                              |
| --------------- | -------------------------------------------------------- |
| `Success<Unit>` | Response:  Completed successfully                        |
| `Failed<Unit>`  | Response:  failed. Use `rspCode`, `rspMsg` for debugging |

## Response Parameters

<HTMLBlock>{`
<style>
  table,
  th,
  td {
    border: 1px solid grey;
    border-collapse: collapse;
  }
  th,
  td {
    padding: 5px;
    text-align: left;
  }
  tr:nth-child(even) {
    background-color: #f2f2f2;
  }
</style>
<table style="width: 100%">
  <colgroup>
    <col style="width: 15%" />
    <col style="width: 15%" />
    <col style="width: 10%" />
    <col style="width: 10%" />
    <col style="width: 10%" />
    <col style="width: 40%" />
  </colgroup>
  <thead>
    <tr class="">
      <th class="" colspan="3">
        <div class="">
          <p>Parameter</p>
        </div>
      </th>
      <th class="">
        <div class="">
          <p>Data Type</p>
        </div>
      </th>
      <th class="">
        <div class="">
          <p>Mandatory</p>
        </div>
      </th>
      <th class="">
        <div class="">
          <p>Description</p>
        </div>
      </th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td class="" colspan="3">
        <p>rspCode</p>
      </td>
      <td class="">
        <p>C 4</p>
      </td>
      <td class="">
        <p>M</p>
      </td>
      <td class="">
        <p>Response code</p>
      </td>
    </tr>
    <tr>
      <td class="" colspan="3">
        <p>rspMsg</p>
      </td>
      <td class="">
        <p>C 255</p>
      </td>
      <td class="">
        <p>M</p>
      </td>
      <td class="">
        <p>Response description</p>
      </td>
    </tr>
    <tr>
      <td class="" colspan="3">TransactionResponse</td>
      <td class="">&nbsp;</td>
      <td class="">
        <p>O</p>
      </td>
      <td class="">Transaction Response Object</td>
    </tr>
    <tr>
      <td class="" colspan="">&nbsp;</td>
      <td class="" colspan="2">tranId</td>
      <td class="">C 255</td>
      <td class="">
        <p>O</p>
      </td>
      <td class="">Generated Unique Transaction ID</td>
    </tr>
    <tr>
      <td class="">&nbsp;</td>
      <td class="" colspan="2">trace</td>
      <td class="">C 255</td>
      <td class="">
        <p>O</p>
      </td>
      <td class="">Unique Trace ID Generated</td>
    </tr>
    <tr>
      <td class="">&nbsp;</td>
      <td class="" colspan="2">rrn</td>
      <td class="">C 255</td>
      <td class="">
        <p>O</p>
      </td>
      <td class="">Unique RRN generated by Payment Host</td>
    </tr>
    <tr>
      <td class="">&nbsp;</td>
      <td class="" colspan="2">tranType</td>
      <td class="">enum</td>
      <td class="">
        <p>O</p>
      </td>
      <td class="">
        <p>Transaction Type</p>
        <ul>
          <li>SALE</li>
          <li>VOID</li>
          <li>REFUND</li>
          <li>AUTH</li>
        </ul>
      </td>
    </tr>
    <tr>
      <td class="">&nbsp;</td>
      <td class="" colspan="2">tranStatus</td>
      <td class="">enum</td>
      <td class="">
        <p>O</p>
      </td>
      <td class="">
        <p>Transaction Status</p>
        <ul>
          <li>Approved</li>
          <li>Declined</li>
          <li>Processing</li>
          <li>Voided</li>
          <li>Reversed</li>
        </ul>
      </td>
    </tr>
    <tr>
      <td class="">&nbsp;</td>
      <td class="" colspan="2">approvalCode</td>
      <td class="">C 255</td>
      <td class="">
        <p>O</p>
      </td>
      <td class="">
        <p>Approval Code</p>
      </td>
    </tr>
    <tr>
      <td class="">&nbsp;</td>
      <td class="" colspan="2">
        <p>paymentMethod</p>
      </td>
      <td class="">
        <p>C 255</p>
      </td>
      <td class="">
        <p>O</p>
      </td>
      <td class="">
        <p>Payment Method that was used.</p>
      </td>
    </tr>
    <tr></tr>
    <tr>
      <td class="">&nbsp;</td>
      <td class="" colspan="2">
        <p>cardData</p>
      </td>
      <td class="">
        <p>C 255</p>
      </td>
      <td class="">
        <p>O</p>
      </td>
      <td class="">
        <p>Payment Method that was used.</p>
      </td>
    </tr>
    <tr>
      <td class="" colspan="2">&nbsp;</td>
      <td>aid</td>
      <td>C 255</td>
      <td>
        <p>O</p>
      </td>
      <td>Application AID</td>
    </tr>
    <tr>
      <td class="" colspan="2">&nbsp;</td>
      <td>appName</td>
      <td>C 255</td>
      <td>
        <p>O</p>
      </td>
      <td>EMV Application Name</td>
    </tr>
    <tr>
      <td class="" colspan="2">&nbsp;</td>
      <td>tc</td>
      <td>C 255</td>
      <td>
        <p>O</p>
      </td>
      <td>Transaction Certificate</td>
    </tr>
    <tr>
      <td class="" colspan="2">&nbsp;</td>
      <td>tsi</td>
      <td>C 255</td>
      <td>
        <p>O</p>
      </td>
      <td>Transaction Status Indicator</td>
    </tr>
    <tr>
      <td class="" colspan="2">&nbsp;</td>
      <td>tvr</td>
      <td>C 255</td>
      <td>
        <p>O</p>
      </td>
      <td>Terminal Verification Results</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td colspan="2">entryMode</td>
      <td>C 255</td>
      <td>
        <p>O</p>
      </td>
      <td>Entry Mode (e.g. NFC)</td>
    </tr>
    <tr></tr>
    <tr>
      <td>&nbsp;</td>
      <td colspan="2">maskedAccount</td>
      <td>C 255</td>
      <td>
        <p>O</p>
      </td>
      <td>Masked Account (e.g. **** **** **** 1234)</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td colspan="2">cvmPerformed</td>
      <td>C 255</td>
      <td>
        <p>O</p>
      </td>
      <td>CVM method being used</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td colspan="2">acqMid</td>
      <td>C 255</td>
      <td>
        <p>O</p>
      </td>
      <td>MID which processes this transaction</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td colspan="2">acqTid</td>
      <td>C 255</td>
      <td>
        <p>O</p>
      </td>
      <td>TID which processes this transaction</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td colspan="2">posMessageId</td>
      <td>AN 25</td>
      <td>
        <p>O</p>
      </td>
      <td>Unique reference ID generated by application</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td colspan="2">mchAddress</td>
      <td>C 255</td>
      <td>
        <p>O</p>
      </td>
      <td>Merchant address</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td colspan="2">mchName</td>
      <td>C 255</td>
      <td>
        <p>O</p>
      </td>
      <td>Merchant name</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td colspan="2">totalAmount</td>
      <td>D</td>
      <td>
        <p>O</p>
      </td>
      <td>Total transaction amount</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td colspan="2">createByName</td>
      <td>C 255</td>
      <td>
        <p>O</p>
      </td>
      <td>Name of the creator</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td colspan="2">createdAt</td>
      <td>C 255</td>
      <td>
        <p>O</p>
      </td>
      <td>Creation timestamp</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td colspan="2">updatedAt</td>
      <td>C 255</td>
      <td>
        <p>O</p>
      </td>
      <td>Update timestamp</td>
    </tr>
  </tbody>
</table>
`}</HTMLBlock>

## Error Codes

| Result                       | Code | Message                                                                                                           |
| :--------------------------- | :--- | :---------------------------------------------------------------------------------------------------------------- |
| APPROVED                     | 0    | APPROVED                                                                                                          |
| ERR\_TIMEOUT                 | -1   | Transaction timeout                                                                                               |
| ERR\_INSECURITY\_DEVICE      | -2   | Device attestation error or security flaw                                                                         |
| ERR\_ACTIVATION\_CODE        | -3   | Invalid activation code                                                                                           |
| ERR\_CONNECT                 | -4   | Transaction connection error                                                                                      |
| ERR\_SEND                    | -5   | Transaction sending error                                                                                         |
| ERR\_RECEIVE                 | -6   | Transaction receiving error                                                                                       |
| ERR\_PACK                    | -7   | Transaction pack request message error                                                                            |
| ERR\_UNPACK                  | -8   | Transaction unpack response message error                                                                         |
| ERR\_NO\_ORIG\_TRANS         | -9   | Original transaction NOT exist                                                                                    |
| ERR\_ALREADY\_VOIDED         | -10  | Transaction has been voided                                                                                       |
| ERR\_REFUND\_UNSUPPORTED     | -11  | Not support refund                                                                                                |
| ERR\_VOID\_UNSUPPORTED       | -12  | Not support void                                                                                                  |
| ERR\_HOST\_DECLINED          | -13  | Host declined the transaction                                                                                     |
| ERR\_USER\_CANCEL            | -14  | User cancelled the transaction                                                                                    |
| ERR\_ABORTED                 | -15  | Transaction was aborted with some reasons,please try to get device status or do warmup                            |
| ERR\_AMOUNT                  | -16  | Transaction amount exceeds the allowed contactless transaction limit                                              |
| ERR\_CARD\_UNSUPPORTED       | -17  | The transaction is declined by the card and cannot perform the transaction                                        |
| ERR\_CARD\_INVALID           | -18  | Invalid card, please change another card and retry                                                                |
| ERR\_EMV\_DECLINED           | -19  | Invalid EMV parameters, please check EMV configurations                                                           |
| ERR\_NOT\_ACTIVATED          | -20  | Card reading incomplete, please tap and hold card steadily                                                        |
| ERR\_INVALID\_REQUEST        | -21  | Our service is temporally not available to process your payment,please check the payment status in backend portal |
| ERR\_NOT\_ACTIVATED          | -22  | Device not activated                                                                                              |
| ERR\_INVALID\_REQUEST        | -23  | Invalid request                                                                                                   |
| ERR\_CAN\_NOT\_DETECT\_MPOS  | -24  | Bluetooth can not detect MPOS D177 device, please check the MPOS D177 is available or not                         |
| ERR\_BT\_DISCONNECTED        | -25  | Bluetooth disconnected now, please check the MPOS D177 is available or not                                        |
| ERR\_BT\_DISABLED            | -26  | Bluetooth disabled now, please kindly to enable it                                                                |
| ERR\_BT\_PERMISSION\_MISSING | -27  | The location permission is missing now, please kindly to allow it                                                 |
| ERR\_UNEXPECTED              | -100 | Unexpected error, need to restart SoftPOS application by warmup                                                   |