Get Games
This document describes the /api/v1/merchant-games/gameList endpoint, which
provides a list of games assigned to a merchant. The URL for this endpoint is
/api/v1/merchant-games/gameList.
Endpoint Overview
/api/v1/merchant-games/gameList
Purpose
The Get Game List endpoint retrieves a comprehensive list of games that have been assigned to a specific merchant. This is useful for merchants to see their available games and relevant details.
Parameters
| Parameter Name | Data Type | Description | Required/Optional |
|---|---|---|---|
| timestamp | long | UNIX time in milliseconds. | Required |
| merchantId | String | Merchant ID. | Required |
| hash | String | Hash signature for request verification. The hash is an HMAC SHA256 checksum used to verify the integrity and authenticity of the request. It is generated by concatenating the parameter values in the same order they appear in the request, without separators, and applying the HMAC SHA256 algorithm using the merchant’s secret key. The resulting hash is encoded as a lowercase hexadecimal string in UTF-8. This signature must match the hash field sent in the request and will be verified by HPGames using the merchant’s registered secret key. HMAC SHA256 Code Snippet | Required |
Request Example
Here is an example of a JSON request to this endpoint:
{
"timestamp": 1709289932725,
"merchantId": "1387a6cc-3651-4473-ae52-e415caea3395",
"hash": "9ed3d547f9a672ecd4884304e859af84263410d613ff2a2bb7d70a8221d7e544"
}
Signature Calculation Example
To ensure the integrity and authenticity of the request, calculate the hash
signature using the following method. Assuming the secret key is secretkey:
SHA256("1387a6cc-3651-4473-ae52-e415caea33951709289932725", secretkey);
Response Example
The response from the endpoint will include the following JSON structure, detailing the available games:
{
"timestamp": 1699367575250,
"hash": "2e658c7f84651be7230b3e278f62ce6e",
"games": [
{
"id": 700100,
"name": "Balloon Crash",
"title": "Balloon Crash",
"description": "<div>How high do you dare to go?! Climb into our balloon and reach for the sky. With this multiplayer game, you bet on the altitude the balloon will reach before it crashes. Cash out before the balloon reaches its peak altitude to collect your winnings.</div>",
"status": "ACTIVE",
"image": "https://cdn.hplay.games/lobby/images/700100/lobby_image.jpg",
"type": "CRASH",
"subType": "CRASH",
"stakeType": "STAKE_STEPS"
}
]
}
Ensure the hash parameter is removed from the received request before
calculating your own signature for comparison.
The response includes detailed information about each game, such as its status and image URL, providing a complete overview of the merchant's game offerings.