Get Bet Slip and Validate Token
/betSlip
The Authentication API enables the HPGames system to verify the information received in the launch protocol. Only once the merchant approves this information game will be launched.
BetSlip Request
BetSlip is similar to Validate Token request from casino API with one additional filed for retriving Bet Slip
| Parameter Name | Data Type | Description | Required/Optional |
|---|---|---|---|
| merchantId | String | Merchant ID | Required |
| timestamp | long | Time representation in UNIX milliseconds format. | Required |
| authToken | String | Game session id | Required |
| hash | String | String To Encode: merchantId + timestamp HMAC SHA256 Code Snippet | Required |
Request example:
{
"merchantId": "21385394-6dda-4171-a003-02fa4a975643",
"timestamp": 1643727556,
"authToken": "b5e10b6b-4d88-475c-9496-a461052a8448",
"hash": "288db34c0f1eb6e9c11f38ff2feb90d0"
}
Signature calculation example:
(value of secret key used in all examples: secretkey)
SHA256("21385394-6dda-4171-a003-02fa4a9756431643727556", secretkey);
BetSlip Response
| Parameter Name | Data Type | Description | Required/Optional |
|---|---|---|---|
| playerId | String | Merchant’s unique identification for each player. | Required |
| balance | Decimal | Available money in the player’s wallet at the time of the request. The value will be presented in the currency of that session | Required |
| currency | String | The currency of the balance, Currency code (ISO 421) | Required |
| betSlip | List<Bet> | Bet Slip Item data, check Bet table | Required |
| username | String | Player’s username | Optional |
| nickname | String | Player nickname for games | Optional |
| firstName | String | Player’s first name | Optional |
| lastName | String | Player’s last name | Optional |
| gender | String | Player’s gender | Optional |
| String | Player’s email address | Optional | |
| phone | String | Player’s phone number | Optional |
| ipAddress | String | Ip address | Optional |
| language | String | Prefered user language. ISO 639-3 language code. Defaults to ENG | Optional |
| devicePlatform | String | Device platform (Desktop,Mobile..) | Optional |
| phone | String | Player’s phone number | Optional |
| address | String | Player’s address | Optional |
| city | String | Player’s city | Optional |
| country | String | Player’s country code (ISO 3166) | Optional |
| test | Boolean | Set to true for test users. Default false | Optional |
| errorCode | int | Error code, default 0 | Optional |
| errorMessage | String | Error message | Optional |
Bet:
| Parameter Name | Data Type | Description | Required/Optional |
|---|---|---|---|
| sportId | String | Unique identifier for the sport | Required |
| sportName | String | Name of the sport | Required |
| betSlipId | String | Unique identifier for the betSlip on merchant side | Optional |
| matchName | String | Name of the match | Required |
| matchId | String | Unique identifier for the match | Required |
| competitionId | String | Unique identifier for the competition | Required |
| competitionName | String | Name of the competition | Required |
| marketId | String | Unique identifier for the market | Required |
| marketName | String | Description of the betting market | Required |
| marketOptionId | String | Unique identifier for the market option | Required |
| marketOptionName | String | Name of the selected market option | Required |
| odd | Double | Betting odd for the selected market option | Required |
| margin | Double | Margin for the odds | Required for specific markets like over/under |
| homeTeam | String | Name of the home team | Required |
| awayTeam | String | Name of the away team | Required |
This table maps the attributes from your JSON object into a structured format.
Response example:
{
"errorCode": 0,
"errorMessage": "",
"playerId": "PL123456789",
"username": "john_doe",
"firstName": "John",
"lastName": "Doe",
"gender": "male",
"email": "john.doe@example.com",
"phone": "+1234567890",
"ipAddress": "192.168.1.1",
"language": "en",
"devicePlatform": "Mobile",
"address": "123 Main St",
"city": "New York",
"country": "US",
"test": false,
"balance": 250.75,
"currency": "USD",
"betSlip": [
{
"sportId": "1",
"sportName": "Football",
"betSlipId": "915259f2-0412-478d-bb32-b08d02f71a0c",
"matchName": "Monaco - Crvena Zvezda",
"matchId": "1234",
"competitionId": "10",
"competitionName": "UEFA - Champions League",
"marketId": "1",
"marketName": "The Match will end with Draw result",
"marketOptionId": "2",
"marketOptionName": "Draw",
"odd": 1.38,
"margin": null,
"homeTeam": "Monaco",
"awayTeam": "Crvena Zveda"
},
{
"sportId": "2",
"sportName": "Basketball",
"betSlipId": "a7f8a612-d391-4d9b-beb2-efa87f1b5a3d",
"matchName": "Lakers - Celtics",
"matchId": "5678",
"competitionId": "20",
"competitionName": "NBA - Finals",
"marketId": "3",
"marketName": "Total Points Over/Under",
"marketOptionId": "5",
"marketOptionName": "Over 215.5",
"odd": 1.95,
"margin": 215.5,
"homeTeam": "Lakers",
"awayTeam": "Celtics"
}
]
}