GetAccount
GetAccount
Returns player details, such as unique ID, currency, and language.
The casino platform must confirm the validity of incoming game sessions and account IDs and return the user data
relevant for the session. If a retry or rollback request is sent regarding a request that the casino already responded
to, the account ID that is returned must be unique per player, and identical.
Request Parameters
| Parameter |
Data Type |
Mandatory |
Description |
accountid |
String(60) [0-9a-zA-Z] |
Required |
Account ID Example: 5179068 |
apiversion |
String |
Required |
The API version that will be used Example: 1.2 |
device |
String |
Required |
The device currently used by the player Valid values: desktop or mobile |
gamesessionid |
String(64) |
Required |
The game session id from the start game Example: 11_99d71938-c2d9-4844-b950-d598c2es |
request |
String |
Required |
Request method name Example: getaccount |
Request Example
/groove?request=getaccount&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&apiversion=1.2
Response Parameters
| Parameter |
Data Type |
Mandatory |
Description |
accountid |
String |
Required |
Account ID generated by the casino Example: 5179068 |
apiversion |
String |
Required |
The version of the API being used Example: 1.2 |
bonus_balance |
Decimal (32,10) |
Optional |
The player’s bonus balance Example: 50.0 |
city |
String(32) |
Required |
The city where the player logged in Examples: London, Tel Aviv |
code |
Integer |
Required |
Response code (See Appendix) Example: 200 |
country |
String |
Required |
Country code (ISO 3166-1 alpha-2) Examples: IL, UK, US |
currency |
String |
Required |
Currency code (ISO) Example: EUR |
game_mode |
Integer |
Optional* |
Combined real and bonus modes 1 = Real mode 2 = Bonus mode *Required for CMA-compliant games |
gamesessionid |
String(64) |
Required |
The ID for the game session Example: 11_99d71938-c2d9-4844-b950-d598c2es |
order |
String |
Optional* |
The type of order Valid values: cash_money, bonus_money *Required for CMA-compliant games |
real_balance |
Decimal (32,10) |
Required |
The player’s real balance Example: 100.0 |
status |
String |
Required |
The status of the response Example: Success |
Info
For Fugaso GP, the following cryptocurrencies are available: BTC, LTC, DOG, ETH, BCH
Response Example
Success Response
{
"code": 200,
"status": "Success",
"accountid": 8877,
"city": "aaa",
"country": "IL",
"currency": "EUR",
"gamesessionid": "aaaaa",
"real_balance": 100,
"bonus_balance": 50,
"game_mode": 1,
"order": "cash_money, bonus_money",
"apiversion": "1.2"
}
Error Codes
| Code |
Status |
Message |
| 1 |
Technical error |
Technical error |
| 1000 |
Not logged on |
Not logged on |
| 1003 |
Authentication failed |
Authentication failed |
GetBalance
GetBalance
Returns the current balance in the specific player account.
The casino platform must confirm the validity of the incoming game session ID and that it is connected to the given
account ID. The casino platform must also return the player’s current balance, both the bonus balance and the real
balance.
Request Parameters
| Parameter |
Data Type |
Mandatory |
Description |
accountid |
String(60) [0-9a-zA-Z] |
Required |
Account ID Example: 5179068 |
apiversion |
String |
Required |
The API version that will be used Example: 1.2 |
device |
String |
Required |
The device currently used by the player Valid values: desktop or mobile |
gamesessionid |
String(64) |
Required |
The game session id from the start game Example: 11_99d71938-c2d9-4844-b950-d598c2es |
nogsgameid |
String |
Required |
Groove game ID Note: Can contain letters and special characters Example: 80102, game_123, slot-abc |
request |
String |
Required |
Request method name Example: getbalance |
Request Example
/groove?request=getbalance&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&nogsgameid=80102&apiversion=1.2
Response Parameters
| Parameter |
Data Type |
Mandatory |
Description |
apiversion |
String |
Required |
The version of the API being used Example: 1.2 |
balance |
Decimal (32,10) |
Required |
The total balance amount (real + bonus) Examples: 500, 140.25 |
bonus_balance |
Decimal (32,10) |
Optional |
The player’s bonus balance Example: 50.0 |
code |
Integer |
Required |
Response code Example: 200 |
game_mode |
Integer |
Optional* |
Combined real and bonus modes 1 = Real mode 2 = Bonus mode *Required for CMA-compliant games |
order |
String |
Optional* |
The type of order Valid values: cash_money, bonus_money *Required for CMA-compliant games |
real_balance |
Decimal (32,10) |
Required |
The player’s real balance Example: 100.0 |
status |
String |
Required |
The status of the response Example: Success |
Response Examples
Success Response
{
"code": 200,
"status": "Success",
"balance": 100,
"bonus_balance": 50,
"real_balance": 50,
"game_mode": 1,
"order": "cash_money, bonus_money",
"apiversion": "1.2"
}
Error Response
{
"code": 1,
"status": "Technical error",
"message": "Technical error",
"apiversion": "1.2"
}
Error Codes
| Code |
Status |
Message |
| 1 |
Technical error |
Technical error |
Wager
Wager
The Wager method wagers, or bets, for a player and updates the player’s wallet balance on the casino’s platform.
Idempotency must be provided.
The casino platform must:
- Confirm that the incoming game session ID is valid and is connected with the given account ID. If this validation
fails, refuse the wager.
- Check that the transaction can be approved. Checks should include:
- Sufficient funds are available
- The player is within responsible gaming limits
- Determine whether the transactions have already been processed or not
- Check if a request with the same transactionid has been performed before:
- If any of the essential fields transactionid, accountid, or betamount mismatch, the error Transaction parameter
mismatch is returned
- If there are no mismatches, the original response with the status 200 Success - duplicate request is returned.
The only values that may change are the balance related parameters, since the player’s balance may have changed
- In order to handle future Result and Rollback calls, you must store the following parameters:
gamesessionid,
accountid, roundid, transactionid and betamount
Request Parameters
| Parameter |
Data Type |
Mandatory |
Description |
accountid |
String(60) [0-9a-zA-Z] |
Required |
Account ID Example: 5179068 |
apiversion |
String |
Required |
The API version that will be used Example: 1.2 |
betamount |
Decimal (32,10) |
Required |
The wager amount (total of real and bonus money) Note: Must be 0 for free round transactions when frbid is provided Examples: 2, 0.4, 0.01 (regular), 0 (free rounds) |
device |
String |
Required |
The device currently used by the player Valid values: desktop, mobile |
frbid |
String(255) |
Optional* |
Free Round Bonus ID - Must be the templateId from FRB assign response *Required for free round transactions Example: 123abc456 (the templateId from assign response) |
gameid |
String |
Required |
Groove game ID Note: Can contain letters and special characters Example: 80102, game_123, slot-abc |
gamesessionid |
String(64) |
Required |
The game session id from the start game Example: 11_99d71938-c2d9-4844-b950-d598c2es |
request |
String |
Required |
Request method name Example: wager |
roundid |
String(255) |
Required |
Round ID Example: 802d1812c32686748f2afbcacfcc82114cf |
transactionid |
String(255) |
Required |
Transaction ID Example: 7617edd0924c11e7abb2865556898ad0 |
Request Examples
Regular Wager (No Free Rounds)
/groove?request=wager&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&gameid=80102&apiversion=1.2&betamount=10.0&roundid=nc8n4nd87&transactionid=trx_id
Free Round Wager
/groove?request=wager&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&gameid=80102&apiversion=1.2&betamount=0&roundid=nc8n4nd87&transactionid=trx_id&frbid=123abc456
**Free Round Transactions:**
- `betamount` must be `0` when using free rounds
- `frbid` must be the `templateId` from the FRB assign response
- The same template can be assigned multiple times to the same player
Response Parameters
| Parameter |
Data Type |
Mandatory |
Description |
accounttransactionid |
String(50) |
Required |
The casino’s internal transaction ID Example: 7617edd0924c11e7abb2865556898ad0 |
apiversion |
String |
Required |
The version of the API being used Example: 1.2 |
balance |
Decimal (32,10) |
Required |
The total balance amount after the wager Examples: 500, 140.25 |
bonus_balance |
Decimal (32,10) |
Optional |
The player’s bonus balance Example: 50.0 |
bonusmoneybet |
Decimal (32,10) |
Required |
The bonus amount used in the bet If casino doesn’t work with bonuses, value must be 0 |
code |
Integer |
Required |
Response code Example: 200 |
game_mode |
Integer |
Optional* |
Combined real and bonus modes 1 = Real mode 2 = Bonus mode *Required for CMA-compliant games |
order |
String |
Optional* |
The type of order Valid values: cash_money, bonus_money *Required for CMA-compliant games |
real_balance |
Decimal (32,10) |
Required |
The player’s real balance Example: 100.0 |
realmoneybet |
Decimal (32,10) |
Required |
The real money amount used in the bet |
status |
String |
Required |
The status of the response Example: Success |
Warning
The sum of `bonusmoneybet` and `realmoneybet` must equal the `betamount` sent by the provider.
Response Example
Success Response
{
"code": 200,
"status": "Success",
"accounttransactionid": "aaaaaaa",
"balance": 100,
"bonusmoneybet": 0,
"realmoneybet": 10,
"bonus_balance": 50,
"real_balance": 50,
"game_mode": 1,
"order": "cash_money, bonus_money",
"apiversion": "1.2"
}
Error Codes
| Code |
Status |
Message |
| 1 |
Technical error |
Technical error |
| 110 |
Operation not allowed |
Reasons include: • Wager amount is less than 0 • User with specified accountId not found • AccountId doesn’t match sessionId |
| 400 |
Transaction operator mismatch |
Transaction operator mismatch |
| 409 |
Round closed or transaction ID exists |
Round closed or transaction ID exists |
| 1000 |
Not logged on |
Not logged on |
| 1006 |
Out of money |
Out of money |
| 1019 |
Gaming limit |
Loss limit exceeded or Overall bet limit exceeded |
| 1035 |
Account blocked |
Account blocked |
Result
Result
The game server uses this method to inform that the wager round is complete. The result 0 indicates that the player
lost. Idempotency must be provided.
Info
**Note:**
- Result requests may be received after the player goes offline
- Result requests may be received without a prior wager request for FRB (free round bonus) and tournament auto-payout
- For FRB results without a prior wager, the result represents the win from the free round
The casino platform must:
- Confirm that the incoming game session ID is valid and is connected with the given account ID
- Check if a request with the same transactionid has been performed before:
- If any of the essential fields transactionid, accountid, or betamount mismatch, the error Transaction parameter
mismatch is returned
- If there are no mismatches, the original response with the status 200 Success - duplicate request is returned.
The only values that may change are the balance related parameters, since the player’s balance may have changed
- Confirm that the incoming accountid and roundid match up with a previously placed wager. If this confirmation fails,
refuse the result
- A result must be accepted even if the game session has expired, since a result can be reported by the game server
later. Groove provides the game session for you as information in this call
- The only expected return code for a valid result call is success. All other return codes are unexpected and will
result in the result attempt being resent. Return code 1000 Not logged on is never a valid response to a result
call. The casino platform must accept the result even if the session has expired
Request Parameters
| Parameter |
Data Type |
Mandatory |
Description |
accountid |
String(60) [0-9a-zA-Z] |
Required |
Account ID Example: 5179068 |
apiversion |
String |
Required |
The API version that will be used Example: 1.2 |
device |
String |
Required |
The device currently used by the player Valid values: desktop, mobile |
frbid |
String(255) |
Optional* |
Free Round Bonus ID - Must be the templateId from FRB assign response *Required for free round result transactions Example: 123abc456 (the templateId from assign response) |
gameid |
String |
Required |
Groove game ID Note: Can contain letters and special characters Example: 80102, game_123, slot-abc |
gamesessionid |
String(64) |
Required |
The game session id from the start game Example: 11_99d71938-c2d9-4844-b950-d598c2es |
gamestatus |
String |
Required |
Game Status Valid values: completed, pending |
request |
String |
Required |
Request method name Example: result |
result |
Decimal (32,10) |
Required |
The amount of money won by the player If player did not win, value must be 0 Example: 2.25 |
roundid |
String(255) |
Required |
Round ID Example: 802d1812c32686748f2afbcacfcc82114cf |
transactionid |
String(255) |
Required |
Transaction ID Example: 7617edd0924c11e7abb2865556898ad0 |
Request Examples
Regular Result (After Wager)
/groove?request=result&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&gameid=80102&apiversion=1.2&result=10.0&roundid=nc8n4nd87&transactionid=trx_id&gamestatus=completed
Free Round Result (No Prior Wager)
/groove?request=result&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&gameid=80102&apiversion=1.2&result=10.0&roundid=nc8n4nd87&transactionid=trx_id&gamestatus=completed&frbid=123abc456
**Free Round Result without Wager:**
- Can be sent without a prior wager request
- Must include `frbid` (the templateId from assign response)
- The `result` amount represents the total win from the free round
Response Parameters
| Parameter |
Data Type |
Mandatory |
Description |
apiversion |
String |
Required |
The version of the API being used Example: 1.2 |
balance |
Decimal (32,10) |
Required |
The total balance amount after the result Examples: 500, 140.25 |
bonus_balance |
Decimal (32,10) |
Optional |
The player’s bonus balance Example: 50.0 |
bonusWin |
Decimal (32,10) |
Required |
The bonus amount won If casino doesn’t work with bonuses, value must be 0 |
code |
Integer |
Required |
Response code Example: 200 |
game_mode |
Integer |
Optional* |
Combined real and bonus modes 1 = Real mode 2 = Bonus mode *Required for CMA-compliant games |
order |
String |
Optional* |
The type of order Valid values: cash_money, bonus_money *Required for CMA-compliant games |
real_balance |
Decimal (32,10) |
Required |
The player’s real balance Example: 100.0 |
realMoneyWin |
Decimal (32,10) |
Required |
The real money amount won |
status |
String |
Required |
The status of the response Example: Success |
walletTx |
String(50) |
Required |
The wallet transaction ID Example: de73550e-0612-4a1b-8a0d-a5a3745b |
Warning
The sum of `bonusWin` and `realMoneyWin` must equal the `result` amount sent by the provider.
Response Example
Success Response
{
"code": 200,
"status": "Success",
"walletTx": "aaaaaaa",
"balance": 100,
"bonusWin": 0,
"realMoneyWin": 10,
"bonus_balance": 50,
"real_balance": 50,
"game_mode": 1,
"order": "cash_money, bonus_money",
"apiversion": "1.2"
}
Error Codes
| Code |
Status |
Message |
| 1 |
Technical error |
Technical error |
| 110 |
Operation not allowed |
Reasons include: • Result amount is less than 0 • User with specified accountId not found • AccountId doesn’t match sessionId • Game status is not pending or completed |
| 400 |
Transaction operator mismatch |
Transaction operator mismatch |
| 409 |
Round closed or transaction ID exists |
Round closed or transaction ID exists |
| 1000 |
Not logged on |
Not logged on |
Rollback
Rollback
This method either rolls back a wager or a wager that did not result in a result. For example, if a player places a
wager and the Result request fails, you can send a Rollback request to roll back the original wager.
The casino platform must confirm that the incoming accountid, roundid, and transactionid are identical to the latest
wager in the game round and not included in a result that has been issued for the relevant game round.
The casino platform may, but is not required to, verify that the bet amount in the relevant wager request is identical
to the rollback amount.
Info
**Note:** The rollback amount is not mandatory and can be null.
The casino platform must refuse the rollback if any of these assertions fail.
- Check if a request with the same transactionid has been performed before:
- If any of the essential fields transactionid, accountid, or betamount mismatch, the error Transaction parameter
mismatch is returned
- If there are no mismatches, the original response with the status 200 Success - duplicate request is returned.
The only values that may change are the balance related parameters, since the player’s balance may have changed
- A rollback can be issued by the game server later. Therefore, a rollback must be accepted even if the game session has
expired. Groove provides the game session for you as information in this call
- The only expected return code for a valid rollback call is 0 success
- If no matching wager is found, the code 102 Wager not found is returned
- If the rollback is incorrect, code 110 Operation not allowed is returned
- Return code 1000 Not logged on is never a valid response to a rollback call. The casino platform must accept the
rollback even if the session has expired
- All other return codes result in a resending of the rollback attempt
- The Casino must refund the player only if a successful wager was found. Do not refund the player in the case of a
failed wager or any other error
Request Parameters
| Parameter |
Data Type |
Mandatory |
Description |
accountid |
String(60) [0-9a-zA-Z] |
Required |
Account ID Example: 5179068 |
apiversion |
String |
Required |
The API version that will be used Example: 1.2 |
device |
String |
Required |
The device currently used by the player Valid values: desktop, mobile |
gameid |
String |
Required |
Groove game ID Note: Can contain letters and special characters Example: 80102, game_123, slot-abc |
gamesessionid |
String(64) |
Required |
The game session id from the start game Example: 11_99d71938-c2d9-4844-b950-d598c2es |
request |
String |
Required |
Request method name Example: rollback |
rollbackamount |
Decimal (32,10) |
Optional |
The betamount in the Wager request that you want to rollback Example: 0.10 In some cases rollback amount can be 0, then rollback amount should be taken from original wager |
roundid |
String(255) |
Optional |
Each casino needs to handle the rollback by transactionId, although sometimes the roundId is sent as well Example: 802d1812c32686748f2afbcacfcc82114cf |
transactionid |
String(255) |
Required |
Transaction ID Example: 7617edd0924c11e7abb2865556898ad0 |
Request Example
/groove?request=rollback&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&gameid=80102&apiversion=1.2&rollbackamount=10.0&roundid=nc8n4nd87&transactionid=trx_id
Response Parameters
| Parameter |
Data Type |
Mandatory |
Description |
accounttransactionid |
String(50) |
Required |
The casino’s internal transaction ID Example: 7617edd0924c11e7abb2865556898ad0 |
apiversion |
String |
Required |
The version of the API being used Example: 1.2 |
balance |
Decimal (32,10) |
Required |
The total balance amount after the rollback Examples: 500, 140.25 |
bonus_balance |
Decimal (32,10) |
Optional |
The player’s bonus balance Example: 50.0 |
code |
Integer |
Required |
Response code Example: 200 |
game_mode |
Integer |
Optional* |
Combined real and bonus modes 1 = Real mode 2 = Bonus mode *Required for CMA-compliant games |
order |
String |
Optional* |
The type of order Valid values: cash_money, bonus_money *Required for CMA-compliant games |
real_balance |
Decimal (32,10) |
Required |
The player’s real balance Example: 100.0 |
status |
String |
Required |
The status of the response Example: Success |
Response Example
Success Response
{
"code": 200,
"status": "Success",
"accounttransactionid": "aaaaaaa",
"balance": 100,
"bonus_balance": 50,
"real_balance": 50,
"game_mode": 1,
"order": "cash_money, bonus_money",
"apiversion": "1.2"
}
Error Codes
| Code |
Status |
Description |
| 1 |
Technical error |
Technical error |
| 102 |
Wager not found |
Reasons include: • A wager with the given transactionId is not found • The roundId in the rollback request is not the same as the roundId of a wager with the specified transactionId |
| 110 |
Operation not allowed |
Reasons include: • A win request was already received for the given wager |
Wager And Result
Wager And Result
Places a wager and sets the result amount at the same time. Idempotency must be provided, which means equal requests
should only be processed once. If a request is duplicated, that is, the requests have the same transactionid, the
original response must be sent with the status 200, Success - duplicate request status.
The same as in the separate Wager and Result requests.
Request Parameters
| Parameter |
Data Type |
Mandatory |
Description |
accountid |
String(60) [0-9a-zA-Z] |
Required |
Account ID Example: 5179068 |
apiversion |
String |
Required |
The API version that will be used Example: 1.2 |
betamount |
Decimal (32,10) |
Required |
The wager amount (total of real and bonus money) Note: Must be 0 for free round transactions when frbid is provided Examples: 2, 0.4, 0.01 (regular), 0 (free rounds) |
device |
String |
Required |
The device currently used by the player Valid values: desktop, mobile |
frbid |
String |
Optional* |
Free Round Bonus ID - Must be the templateId from FRB assign response *Required for free round transactions Example: 123abc456 (the templateId from assign response) Note: The FRB result can be sent without a separate wager |
gameid |
String |
Required |
Groove game ID Note: Can contain letters and special characters Example: 80102, game_123, slot-abc |
gamesessionid |
String(64) |
Required |
The game session id from the start game Example: 11_99d71938-c2d9-4844-b950-d598c2es |
gamestatus |
String |
Required |
Game Status Valid values: completed, pending |
request |
String |
Required |
Request method name Example: wagerAndResult |
result |
Decimal (32,10) |
Required |
The amount of money won by the player Example: 2.25 |
roundid |
String(255) |
Required |
Round ID Example: 802d1812c32686748f2afbcacfcc82114cf |
transactionid |
String(255) |
Required |
Transaction ID Example: 7617edd0924c11e7abb2865556898ad0 |
Request Examples
Regular Wager and Result (No Free Rounds)
/groove?request=wagerAndResult&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&gameid=80102&apiversion=1.2&result=10.0&betamount=5.0&roundid=nc8n4nd87&transactionid=trx_id&gamestatus=completed
Free Round Wager and Result
/groove?request=wagerAndResult&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&gameid=80102&apiversion=1.2&result=10.0&betamount=0&roundid=nc8n4nd87&transactionid=trx_id&gamestatus=completed&frbid=123abc456
**Free Round Transactions:**
- `betamount` must be `0` when using free rounds
- `frbid` must be the `templateId` from the FRB assign response
- The `result` amount represents the win from the free round
Response Parameters
| Parameter |
Data Type |
Mandatory |
Description |
apiversion |
String |
Required |
The version of the API being used Example: 1.2 |
balance |
Decimal (32,10) |
Required |
The total balance amount after the transaction Examples: 500, 140.25 |
bonus_balance |
Decimal (32,10) |
Optional |
The player’s bonus balance Example: 50.0 |
bonusmoneybet |
Decimal (32,10) |
Required |
The bonus amount used in the bet If casino doesn’t work with bonuses, value must be 0 |
bonusWin |
Decimal (32,10) |
Required |
The bonus amount won If casino doesn’t work with bonuses, value must be 0 |
code |
Integer |
Required |
Response code Example: 200 |
game_mode |
Integer |
Optional* |
Combined real and bonus modes 1 = Real mode 2 = Bonus mode *Required for CMA-compliant games |
order |
String |
Optional* |
The type of order Valid values: cash_money, bonus_money *Required for CMA-compliant games |
real_balance |
Decimal (32,10) |
Required |
The player’s real balance Example: 100.0 |
realmoneybet |
Decimal (32,10) |
Required |
The real money amount used in the bet |
realmoneyWin |
Decimal (32,10) |
Required |
The real money amount won |
status |
String |
Required |
The status of the response Example: Success |
walletTx |
String(50) |
Required |
The wallet transaction ID Example: de73550e-0612-4a1b-8a0d-a5a3745b |
Warning
- The sum of `bonusmoneybet` and `realmoneybet` must equal the `betamount` sent by the provider
- The sum of `bonusWin` and `realmoneyWin` must equal the `result` amount sent by the provider
Response Example
Success Response
{
"code": 200,
"status": "Success",
"walletTx": "aaaaaaa",
"balance": 100,
"bonusWin": 0,
"realmoneyWin": 0,
"bonusmoneybet": 0,
"realmoneybet": 5,
"bonus_balance": 50,
"real_balance": 50,
"game_mode": 1,
"order": "cash_money, bonus_money",
"apiversion": "1.2"
}
Error Codes
The error codes are the same that are used in separate Wager and Result requests.
Jackpot
Jackpot
Groove Gaming sends this request as a Result call when the player wins a jackpot. Idempotency must be provided, which
means the same request should only be processed once. If a request is duplicated, the original response must be sent
with status 200, Success - duplicate request status.
Request Parameters
| Parameter |
Data Type |
Mandatory |
Description |
accountid |
String(60) [0-9a-zA-Z] |
Required |
Account ID Example: 5179068 |
amount |
Decimal (32,10) |
Required |
The jackpot win amount Example: 2000 |
apiversion |
String |
Required |
The API version that will be used Example: 1.2 |
gameid |
String |
Required |
Groove game ID Note: Can contain letters and special characters Example: 80102, game_123, slot-abc |
gamesessionid |
String(64) |
Required |
The game session id from the start game Example: 11_99d71938-c2d9-4844-b950-d598c2es |
gamestatus |
String |
Required |
Game Status Valid values: completed, pending |
request |
String |
Required |
Request method name Example: jackpot |
roundid |
String(255) |
Required |
Round ID Example: 802d1812c32686748f2afbcacfcc82114cf |
transactionid |
String(255) |
Required |
Transaction ID Example: 7617edd0924c11e7abb2865556898ad0 |
Request Example
/groove?request=jackpot&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&gameid=80102&apiversion=1.2&amount=2000.0&roundid=nc8n4nd87&transactionid=trx_id&gamestatus=completed
Response Parameters
| Parameter |
Data Type |
Mandatory |
Description |
apiversion |
String |
Required |
The version of the API being used Example: 1.2 |
balance |
Decimal (32,10) |
Required |
The total balance amount after the jackpot Examples: 500, 140.25 |
bonus_balance |
Decimal (32,10) |
Optional |
The player’s bonus balance Example: 50.0 |
bonusWin |
Decimal (32,10) |
Required |
The bonus amount won from jackpot If casino doesn’t work with bonuses, value must be 0 |
code |
Integer |
Required |
Response code Example: 200 |
game_mode |
Integer |
Optional* |
Combined real and bonus modes 1 = Real mode 2 = Bonus mode *Required for CMA-compliant games |
order |
String |
Optional* |
The type of order Valid values: cash_money, bonus_money *Required for CMA-compliant games |
real_balance |
Decimal (32,10) |
Required |
The player’s real balance Example: 100.0 |
realmoneyWin |
Decimal (32,10) |
Required |
The real money amount won from jackpot |
status |
String |
Required |
The status of the response Example: Success |
walletTx |
String(50) |
Required |
The wallet transaction ID Example: de73550e-0612-4a1b-8a0d-a5a3745b |
Warning
The sum of `bonusWin` and `realmoneyWin` must equal the `amount` sent by the provider.
Response Example
Success Response
{
"code": 200,
"status": "Success",
"walletTx": "aaaaaaa",
"balance": 2100,
"bonusWin": 0,
"realMoneyWin": 2000,
"bonus_balance": 50,
"real_balance": 2050,
"game_mode": 1,
"order": "cash_money, bonus_money",
"apiversion": "1.2"
}
Error Codes
| Code |
Status |
Message |
| 1 |
Technical error |
Technical error |
| 110 |
Operation not allowed |
Reasons include: • The result amount is less than 0 • A user with the specified accountId cannot be found • Game status is not pending or completed |
| 400 |
Transaction operator mismatch |
Transaction operator mismatch |
Signature Validation
Signature Validation
Overview
For enhanced security, Groove can sign transaction API requests using HMAC-SHA256. Your platform should validate these
signatures to ensure requests are authentic and haven’t been tampered with.
Prerequisites
Before validating signatures, you’ll need:
- Access Key Value: Provided by Groove during integration setup
- Secret: Base64 decoded version of the Access Key Value
Secret = base64_decode(<Access Key Value>)
Note: The Access Key is a pseudo-random HS512 secret provided by Groove.
Each signed request from Groove includes an Authorization header with the following format:
Authorization: HMAC-SHA256 Signature={Signature}
| Component |
Description |
Required |
HMAC-SHA256 |
Authorization scheme |
Optional (but recommended to verify) |
Signature |
Base64 encoded HMAC-SHA256 hash |
Required |
Signature Calculation
The signature is calculated using:
Signature = base64_encode(HMACSHA256(Path-And-Query, Secret))
Where:
- Path-And-Query: The canonical representation of the request path and query string
- Secret: The base64 decoded Access Key Value
The Path-And-Query is the concatenation of:
- The request’s absolute URI path
- The query string (including the
?)
Example
For a request to:
https://your-domain.com/groove?request=getbalance&gamesessionid=123&accountid=456
The Path-And-Query would be:
/groove?request=getbalance&gamesessionid=123&accountid=456
Implementation Example
PHP Implementation
function validateGrooveSignature($request, $accessKeyValue) {
// Get the Authorization header
$authHeader = $_SERVER['HTTP_AUTHORIZATION'] ?? '';
// Extract signature from header
if (!preg_match('/HMAC-SHA256\s+Signature=(.+)/', $authHeader, $matches)) {
return false;
}
$providedSignature = $matches[1];
// Decode the secret
$secret = base64_decode($accessKeyValue);
// Build Path-And-Query
$pathAndQuery = $_SERVER['REQUEST_URI'];
// Calculate expected signature
$hash = hash_hmac('sha256', $pathAndQuery, $secret, true);
$expectedSignature = base64_encode($hash);
// Compare signatures (constant-time comparison)
return hash_equals($expectedSignature, $providedSignature);
}
// Usage
$accessKeyValue = "your_base64_access_key_from_groove";
if (validateGrooveSignature($_REQUEST, $accessKeyValue)) {
// Process the valid request
processTransaction();
} else {
// Reject invalid signature
http_response_code(401);
echo json_encode([
"code" => 401,
"status" => "Unauthorized",
"message" => "Invalid signature"
]);
}
Node.js Implementation
const crypto = require('crypto');
function validateGrooveSignature(req, accessKeyValue) {
// Get the Authorization header
const authHeader = req.headers['authorization'] || '';
// Extract signature from header
const match = authHeader.match(/HMAC-SHA256\s+Signature=(.+)/);
if (!match) {
return false;
}
const providedSignature = match[1];
// Decode the secret
const secret = Buffer.from(accessKeyValue, 'base64');
// Build Path-And-Query
const pathAndQuery = req.originalUrl;
// Calculate expected signature
const hash = crypto
.createHmac('sha256', secret)
.update(pathAndQuery)
.digest('base64');
// Compare signatures (constant-time comparison)
return crypto.timingSafeEqual(
Buffer.from(hash),
Buffer.from(providedSignature)
);
}
// Usage in Express.js
app.get('/groove', (req, res) => {
const accessKeyValue = process.env.GROOVE_ACCESS_KEY;
if (!validateGrooveSignature(req, accessKeyValue)) {
return res.status(401).json({
code: 401,
status: "Unauthorized",
message: "Invalid signature"
});
}
// Process valid request
processTransaction(req, res);
});
Python Implementation
import hmac
import hashlib
import base64
from flask import request, jsonify
def validate_groove_signature(access_key_value):
# Get the Authorization header
auth_header = request.headers.get('Authorization', '')
# Extract signature from header
import re
match = re.search(r'HMAC-SHA256\s+Signature=(.+)', auth_header)
if not match:
return False
provided_signature = match.group(1)
# Decode the secret
secret = base64.b64decode(access_key_value)
# Build Path-And-Query
path_and_query = request.full_path
if path_and_query.endswith('?'):
path_and_query = path_and_query[:-1]
# Calculate expected signature
hash_obj = hmac.new(
secret,
path_and_query.encode('utf-8'),
hashlib.sha256
)
expected_signature = base64.b64encode(hash_obj.digest()).decode('utf-8')
# Compare signatures (constant-time comparison)
return hmac.compare_digest(expected_signature, provided_signature)
# Usage in Flask
@app.route('/groove')
def handle_groove_request():
access_key_value = os.environ.get('GROOVE_ACCESS_KEY')
if not validate_groove_signature(access_key_value):
return jsonify({
'code': 401,
'status': 'Unauthorized',
'message': 'Invalid signature'
}), 401
# Process valid request
return process_transaction()
Testing Signature Validation
Test Example
Given:
- Access Key Value:
dGVzdF9zZWNyZXRfa2V5XzEyMw==
- Request URL:
/groove?request=getbalance&accountid=123
- Expected Path-And-Query:
/groove?request=getbalance&accountid=123
Steps:
- Decode secret:
base64_decode("dGVzdF9zZWNyZXRfa2V5XzEyMw==")
- Calculate HMAC-SHA256 of Path-And-Query with secret
- Base64 encode the hash
- Compare with provided signature
Security Best Practices
- Always validate signatures in production environments
- Use constant-time comparison to prevent timing attacks
- Store Access Key securely (environment variables, secure vault)
- Log validation failures for security monitoring
- Reject requests with invalid or missing signatures
- Rotate Access Keys periodically as per security policy
- Use HTTPS for all communications
Common Issues and Solutions
Issue 1: Signature Mismatch
Cause: Incorrect Path-And-Query construction
Solution: Ensure you’re using the exact request URI including all query parameters
Issue 2: Encoding Problems
Cause: Incorrect base64 decoding of Access Key
Solution: Verify the Access Key is properly base64 decoded before use
Cause: Header not properly forwarded by proxy/load balancer
Solution: Configure your infrastructure to forward Authorization headers
Issue 4: Query Parameter Order
Cause: Parameters reordered by framework
Solution: Use the raw request URI as received, not reconstructed
Response for Invalid Signatures
When signature validation fails, return:
{
"code": 401,
"status": "Unauthorized",
"message": "Invalid signature",
"apiversion": "1.2"
}
Integration Checklist
Note on Optional Implementation
While signature validation is highly recommended for production environments, it may be optional during initial
integration and testing phases. Coordinate with Groove to determine when signature validation should be enabled for your
integration.