Guides
Log In
Guides

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:

  • this value has been reached

  • or PCI reboot is about to take place

  • or transaction is cancelled by POS

  • or transaction is cancelled by cardholder

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

ElementTypeDescriptionSizeRequired
apiVersionStringAPI version numberV20Required
statusCodeStringStatus code for the overall transaction requestV4Required
statusStringDescription of the statusCodeV50Required
dataIdStringMerchant defined unique identifier for the data objectV50Required
dataTimestampStringDate and time of the request (YYYY-MM-DD HH:MM:SS)F19Required
dataObjectObject that contains all transaction requests
responseArrayContains data applicable to transaction request
idempotencyKeyStringUnique transaction identifier to avoid duplicate requestV50Required
linkIdStringID used to group related transactionsV50Required
actionString"getHash"V50Required
statusCodeStringStatus code for individual requestV4Required
statusStringDescription of the individual statusCodeV50Required
tenderTypeStringPayment type: Credit, Debit, OtherV50Required
cardTypeStringCard Type: V, M, P, AX etcV2Conditional
cardNameStringCard Name: Visa, MasterCard, Interac, Amex etcV25Conditional
maskedPanStringMasked Primary Account Number (PAN)V21Conditional
hashValueStringThe string of characters that uniquely identifies the card presented at the terminalF64Required
hashValueSecondaryStringThis is a backup hash valueF64Optional
gracePeriodRemainingStringIndicates the number of days during which the terminal would return two HASH valuesV2Conditional
completedString"true" or "false"V5Required
entryModeStringValid values are Insert, Swipe, TapV21Conditional
terminalIdStringDestination Terminal IDF8Optional
{
   "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.