Skip to content

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

Parameter Type Length Description
x_merchant_id Unicode string 10 Merchant identifier as defined by humm
x_device_id Unicode string 64 POS terminal device ID generated by POS terminal.
x_device_token Unicode string 64 Humm generated GUDID for this terminal
x_operator_id Unicode string 64 ID of POS/terminal operator
x_firmware_version Unicode string 64 Current firmware version of POS device
x_pos_vendor Unicode string 100 POS company name
tracking_data optional Associative array Max 1000000 A map that can be populated with additional tracking/state information that will get passed back in the response
signature Hex string case-insensitive 200 Payload that is signed using HMAC-SHA256 using a shared private key

Response

Parameter Type Description
x_status Unicode string Success/Failure/Error
x_code Unicode string A code that maps to a specific reason
x_message Unicode string A string explaining the status/code above
x_key Hex string Device-signing-key for the POS terminal. This should be stored securely
tracking_data Associative array Echoes tracking_data sent on the request
signature Hex string case-insensitive Payload 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 pit@shophumm.com.au to get access to the test/dummy APIs.

Request -> x_device_token Response -> x_status Response -> x_code
01###### Success SCRK01
10###### Failed FCRK01
11###### Failed FCRK02
30###### Error EVAL01
31###### Error EAUT01
any other value Error EISE01

# 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.