Guides

Create Key

Used to obtain a device-signing-key using the shared private key. This is then used to digitally sign all the subsequent messages. See device initialisation for more information.

Method: CreateKey

Request

ParameterTypeLengthDescription
x_merchant_idUnicode string10Merchant identifier as defined by humm
x_device_idUnicode string64POS terminal device ID generated by POS terminal.
x_device_tokenUnicode string64Humm generated GUDID for this terminal
x_operator_idUnicode string64ID of POS/terminal operator
x_firmware_versionUnicode string64Current firmware version of POS device
x_pos_vendorUnicode string100POS company name
tracking_data optionalAssociative arrayMax 1000000A map that can be populated with additional tracking/state information that will get passed back in the response
signatureHex string case-insensitive200Payload that is signed using HMAC-SHA256 using a shared private key

Response

ParameterTypeDescription
x_statusUnicode stringSuccess/Failure/Error
x_codeUnicode stringA code that maps to a specific reason
x_messageUnicode stringA string explaining the status/code above
x_keyHex stringDevice-signing-key for the POS terminal. This should be stored securely
tracking_dataAssociative arrayEchoes tracking_data sent on the request
signatureHex string case-insensitivePayload that is signed using HMAC-SHA256 using a shared private key

Testing

The following describes dummy API requests that return a predictable response. Please contact [email protected] to get access to the test/dummy APIs.

Request -> x_device_tokenResponse -> x_statusResponse -> x_code
01######SuccessSCRK01
10######FailedFCRK01
11######FailedFCRK02
30######ErrorEVAL01
31######ErrorEAUT01
any other valueErrorEISE01

📘

Info

"#" signifies an alphanumeric digit

Testing Assumptions To generate the signature, use the supplied device token as the device signing key. A invalid signature will cause an ESIG01 Error.