Get Hash (IM30 Device Only)
Overview
The Get Hash transaction is used to obtain the hash value from a card. Instead of storing raw card details, merchants use the hash as a token to reference the card securely. The hash ensures the card data is not exposed during authorization, reducing the risk of interception.
NOTE
- Masked PAN will always be first 6 and last 4 digits for get hash transactions.
- hashValueSecondary will only be present in the response during the grace period and when newHash (optional) is not present or set to false.
- Other is any card type that is not recognized by the terminal. For example, Gift or any card plan that is supported by the app but not enabled through the synchronization with Moneris host.
- This field is always returned when the optional filed "hashValueSecondary" is returned in the response
Request Structure
Element | Type | Description | Size | Required |
|---|---|---|---|---|
apiVersion | String | API version number | V20 | Required |
istConfigCode | String | Moneris provided integration configuration code | V50 | Required |
dataId | String | Merchant defined unique identifier for the data object | V50 | Required |
dataTimestamp | String | Date and time of the request (YYYY-MM-DD HH:MM:SS) | F19 | Required |
data | Object | Object that contains all transaction requests | — | — |
request | Array | Contains data applicable to transaction request | — | — |
idempotencyKey | String | Unique transaction identifier to avoid duplicate request | V50 | Required |
linkId | String | ID used to group related transactions | V50 | Optional |
terminalId | String | Destination Terminal ID | F8 | Optional |
action | String | "getHash" | V50 | Required |
progressStatus | String | If value is set to ‘True’, terminal will return progress to POS. Note: This feature is only available on Direct Integration. | V5 | Optional |
newHash | String | ‘true’ or ‘false’ | V5 | Optional |
displayMessage | String | Message to be displayed. Use “\n” to introduce a new line in the message Note: Merchants must validate how the message is displayed on the screen. Messages longer than 5 lines may not display correctly on the terminal | V200 | Optional |
timeout | String | The timeout value (in seconds) for the getHash command. The terminal will timeout and go back to the idle state if:
Maximum value: 86400 (24hours) Minium value: 30 (Default) Note: Value must be a multiple of 30 | V5 | Optional |
{
"apiVersion":"3.0",
"istConfigCode":"example_istConfigCode",
"dataId":"example_dataId",
"dataTimestamp":"1969-12-31 23:59:59",
"data":{
"request":[
{
"idempotencyKey":"example_idempotencyKey",
"action":"getHash"
}
]
}
}
Response Structure
| Element | Type | Description | Size | Required |
|---|---|---|---|---|
| apiVersion | String | API version number | V20 | Required |
| statusCode | String | Status code for the overall transaction request | V4 | Required |
| status | String | Description of the statusCode | V50 | Required |
| dataId | String | Merchant defined unique identifier for the data object | V50 | Required |
| dataTimestamp | String | Date and time of the request (YYYY-MM-DD HH:MM:SS) | F19 | Required |
| data | Object | Object that contains all transaction requests | — | — |
| response | Array | Contains data applicable to transaction request | — | — |
| idempotencyKey | String | Unique transaction identifier to avoid duplicate request | V50 | Required |
| linkId | String | ID used to group related transactions | V50 | Required |
| action | String | "getHash" | V50 | Required |
| statusCode | String | Status code for individual request | V4 | Required |
| status | String | Description of the individual statusCode | V50 | Required |
| tenderType | String | Payment type: Credit, Debit, Other | V50 | Required |
| cardType | String | Card Type: V, M, P, AX etc | V2 | Conditional |
| cardName | String | Card Name: Visa, MasterCard, Interac, Amex etc | V25 | Conditional |
| maskedPan | String | Masked Primary Account Number (PAN) | V21 | Conditional |
| hashValue | String | The string of characters that uniquely identifies the card presented at the terminal | F64 | Required |
| hashValueSecondary | String | This is a backup hash value | F64 | Optional |
| gracePeriodRemaining | String | Indicates the number of days during which the terminal would return two HASH values | V2 | Conditional |
| completed | String | "true" or "false" | V5 | Required |
| entryMode | String | Valid values are Insert, Swipe, Tap | V21 | Conditional |
| terminalId | String | Destination Terminal ID | F8 | Optional |
{
"apiVersion":"3.0",
"statusCode":"example_statusCode",
"status":"example_status",
"dataId":"example_dataId",
"dataTimestamp":"1969-12-31 23:59:59",
"data":{
"response":[
{
"transactionId":"example_transactionId",
"statusCode":"example_statusCode",
"status":"example_status",
"idempotencyKey":"example_idempotencyKey",
"completed":"true",
"tenderType":"example_tenderType",
"cardType":"example_cardType",
"authCode":"example_authCode",
"maskedPan":"example_maskedPan",
"hashValue":"example_hashValue",
"entryMode":"example_entryMode",
"action":"getHash",
"terminalId":"example_terminalId"
}
]
}
}
Errors
If your response contains errors, visit the Errors page for a detailed description of each one.

