GET COUNTER
Last updated: 07-Apr-2025
This command retrieves the last counter used for a given MAC label.
Note
The COUNTER resets to 0 with each REGISTER command.
Device UI Required: No
Request Packet
Field | Rule | Type | Min | Max | Value | Comments |
---|---|---|---|---|---|---|
FUNCTION_TYPE | Required | Static Value |
|
|
ADMIN | Type of function |
COMMAND | Required | Static Value |
|
|
GET_COUNTER | Command name |
POS_RECON | Optional | Character | 1 | 30 | Ex: RetailPOS1 | POS reconciliation. NOTE: POS Reconciliation field to be echoed back in response to POS. |
MAC_LABEL | Required | Character | 1 | 50 | Ex: REG1 | Retrieve last counter used for this MAC label. NOTE: Do NOT send COUNTER with the GET_COUNTER request. |
Example
Following is an example of request packet
<TRANSACTION>
<FUNCTION_TYPE>ADMIN</FUNCTION_TYPE>
<COMMAND>GET_COUNTER</COMMAND>
<MAC_LABEL>REG1</MAC_LABEL>
</TRANSACTION>
Response Packet
Field | Type | Value | Description |
---|---|---|---|
RESPONSE_TEXT | Character | Processor response text. Example: Operation Successful | |
RESULT | Character | OK | This indicates the Result details. |
RESULT_CODE | Numeric | Expected result code: -1, 59002, 59005, 59045 | This indicates the result code. Refer to Result/Error Codes for details. |
TERMINATION_STATUS | Character | SUCCESS or FAILURE | This indicates the transaction termination status. This is the overall status of the transaction irrespective of approved or declined. Like, if the output is generated then the status is SUCCESS and if no output is generated then the status will be FAILURE. |
POS_RECON | Character | POS reconciliation field echoed back if sent in request. Example: RetailPOS1 | |
COUNTER | Numeric | Returns the Last counter used for the given MAC label. Example: 10 |
Transaction Performance Metric
Note
These fields are returned, if SCAPERFMETRIC parameter (Application Parameters) is enabled.
Field | Type | Value | Description |
---|---|---|---|
UI_TIME | Time | This indicates the time duration, for which the device screen is displayed (like error message, prompt screen, remove card screen) till any user action is performed in the command execution flow. This field is not applicable to capture the time for the Processing, Authorizing and transaction status screen. The format of the returned value would be S.sss, where S is seconds (this can be 0 to any positive integer) and sss is milliseconds. In case of any insignificant time or 0.000 value, will not be returned in the response. Example: <UI_TIME>44.028</UI_TIME> |
|
HOST_TIME | Time | This indicates the time taken for the Connection to the host, sending request and receives data from the host. This field also take the cumulative time for multiple requests which may sent to the host during the transaction including two legged transactions, timeout requests, Auto Last Tran requests, DCC, Credit app proxy. The format of the returned value would be S.sss, where S is seconds (this can be 0 to any positive integer) and sss is milliseconds. In case of any insignificant time or 0.000 value, will not be returned in the response. Example: <HOST_TIME>1.389</HOST_TIME> |
|
CMD_TIME | Time | This field indicates the total amount of time for a command, which is executed by the application from request received to the response sent. The format of the returned value would be S.sss, where S is seconds (this can be 0 to any positive integer) and sss is milliseconds. In case of any insignificant time or 0.000 value, will not be returned in the response. Example: <CMD_TIME>70.765</CMD_TIME> |
Example
<RESPONSE>
<RESPONSE_TEXT>Operation Successful</RESPONSE_TEXT>
<RESULT>OK</RESULT>
<RESULT_CODE>-1</RESULT_CODE>
<TERMINATION_STATUS>SUCCESS</TERMINATION_STATUS>
<COUNTER>1</COUNTER>
</RESPONSE>
Rate this article: