MayaGames API (2.02)
Integrate 10,000+ games from 100+ providers through one REST API. Sign requests with HMAC-SHA256, launch games and keep balances in your own wallet through callbacks.
How it works
Get your credentials
Find your
agent-idand API key in the MayaGames Dashboard.Load the game list
Call Get game list for every provider and game you can offer.
Launch a game
Call Launch a game and open the game URL or HTML for the player.
Answer wallet callbacks
During play, MayaGames asks your wallet for the balance and sends bets, wins and rollbacks. See Wallet callbacks.
Add free rounds (optional)
Give players free spins on games that support them. See Free rounds.
Conventions
- HTTPS only. Calls over plain HTTP fail.
- Every endpoint uses
POSTwith a JSON body andcontent-type: application/json. - Money is sent as strings. Balances have two decimals, for example
"100.00". - IDs such as
gameId,providerIdandtransactionIdare strings. - Every response has
status:success, orerrorwith acodeandmessage(see Error codes).
HTTP status codes
| Status | Meaning |
|---|---|
200 | OK. The request was processed. Check status in the body for the result. |
400 | Bad Request. The request could not be understood or required parameters are missing. |
403 | Forbidden. Access denied. |
404 | Not Found. The resource does not exist. |
500 | Internal Server Error. Unexpected server error. |
Base URL
https://gaming.softmaya.com:8443Error format
Authentication
Every request carries your agent-id and an HMAC-SHA256 signature of its body.
| Field | Type and description |
|---|---|
| content-typerequired | string The body is JSON. |
| agent-idrequired | string Your API ID, shown in the MayaGames Dashboard. |
| signrequired | string = 64 characters HMAC-SHA256 of the raw request body, keyed with your API key, as a lowercase hexadecimal string. |
How to sign a request
- Serialize the body as compact JSON, with no spaces or line breaks (the output of JavaScript's
JSON.stringify). - Compute HMAC-SHA256 over that exact string with your API key as the key, and encode it as lowercase hexadecimal.
- Send the same string as the body, with the result in the
signheader. A request without parameters sends{}, and that body is signed too.
Check your implementation
Sign the test vector body with its example key. Your code is correct when it produces the same sign. Every request sample on this page signs its body this way.
Signed request
import { createHmac } from "node:crypto";
const API_URL = "https://gaming.softmaya.com:8443";
const AGENT_ID = process.env.MAYAGAMES_AGENT_ID;
const API_KEY = process.env.MAYAGAMES_API_KEY; // keep it on your server
export async function mayaGames(path, payload = {}) {
const body = JSON.stringify(payload); // sign exactly the string you send
const sign = createHmac("sha256", API_KEY).update(body).digest("hex");
const res = await fetch(API_URL + path, {
method: "POST",
headers: { "content-type": "application/json", "agent-id": AGENT_ID, sign },
body,
});
const text = await res.text();
let json;
try {
json = JSON.parse(text);
} catch {
throw new Error(`MayaGames HTTP ${res.status}`); // 400/403/500 without a JSON body
}
if (json.status !== "success") {
throw new Error(`MayaGames ${json.code}: ${json.message}`);
}
return json;
}
const { data: providers } = await mayaGames("/api/v2/game");<?php
const API_URL = 'https://gaming.softmaya.com:8443';
function mayaGames(string $path, array $payload = []): array
{
// Compact JSON, the same bytes as JavaScript's JSON.stringify
$body = $payload === []
? '{}'
: json_encode($payload, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
$sign = hash_hmac('sha256', $body, getenv('MAYAGAMES_API_KEY'));
$ch = curl_init(API_URL . $path);
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $body,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'content-type: application/json',
'agent-id: ' . getenv('MAYAGAMES_AGENT_ID'),
'sign: ' . $sign,
],
]);
$raw = curl_exec($ch);
if ($raw === false) {
throw new RuntimeException('MayaGames request failed: ' . curl_error($ch));
}
$json = json_decode($raw, true);
if (!is_array($json)) { // 400/403/500 without a JSON body
throw new RuntimeException('MayaGames HTTP ' . curl_getinfo($ch, CURLINFO_RESPONSE_CODE));
}
if (($json['status'] ?? '') !== 'success') {
throw new RuntimeException("MayaGames {$json['code']}: {$json['message']}");
}
return $json;
}
$providers = mayaGames('/api/v2/game')['data'];import hashlib
import hmac
import json
import os
import requests
API_URL = "https://gaming.softmaya.com:8443"
def maya_games(path, payload=None):
# Compact JSON, the same bytes as JavaScript's JSON.stringify
body = json.dumps(payload or {}, separators=(",", ":"), ensure_ascii=False)
sign = hmac.new(
os.environ["MAYAGAMES_API_KEY"].encode(), body.encode(), hashlib.sha256
).hexdigest()
res = requests.post(
API_URL + path,
data=body.encode(),
headers={
"content-type": "application/json",
"agent-id": os.environ["MAYAGAMES_AGENT_ID"],
"sign": sign,
},
timeout=15,
)
try:
data = res.json()
except ValueError: # 400/403/500 without a JSON body
raise RuntimeError(f"MayaGames HTTP {res.status_code}") from None
if data.get("status") != "success":
raise RuntimeError(f"MayaGames {data.get('code')}: {data.get('message')}")
return data
providers = maya_games("/api/v2/game")["data"]BODY='{}'
SIGN=$(printf '%s' "$BODY" | openssl dgst -sha256 -hmac "$MAYAGAMES_API_KEY" | sed 's/^.*= //')
curl -X POST "https://gaming.softmaya.com:8443/api/v2/game" \
-H "content-type: application/json" \
-H "agent-id: $MAYAGAMES_AGENT_ID" \
-H "sign: $SIGN" \
--data "$BODY"Test vector
API key exampleKey0000000000000000000000 (example only)
agent-id 1234
body {"ip":"192.168.1.1","email":"[email protected]","device":"desktop","gameId":"12112","userId":"sm04-60","countryCode":"DE","balance":"100.00","currency":"EUR"}
sign 96e57319b04f30f1711512068e0a9c29b87849a84b1059af622772505f4284a2Games
Load the game catalogue and open games for your players. Both requests are signed as described in Authentication.
Get game list
Base URL
https://gaming.softmaya.com:8443/api/v2/gameReturns every provider and game available to your account.
No parameters. Send an empty JSON object, {}.
Responses
200Success
| Field | Type and description | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| statusrequired | string The request succeeded. | ||||||||||||||||||||||||||
| required | Array of objects One entry per game provider. | ||||||||||||||||||||||||||
| |||||||||||||||||||||||||||
200Error
The request was processed but failed. code tells you why.
| Field | Type and description |
|---|---|
| statusrequired | string The request failed. |
| coderequired | string Error code. See Error codes. |
| messagerequired | string Short description of the error. |
Base URL
https://gaming.softmaya.com:8443/api/v2/gameRequest samples
// mayaGames(): the signed request helper from Authentication
const result = await mayaGames("/api/v2/game");// mayaGames(): the signed request helper from Authentication
$result = mayaGames('/api/v2/game');# maya_games(): the signed request helper from Authentication
result = maya_games("/api/v2/game")BODY='{}'
SIGN=$(printf '%s' "$BODY" | openssl dgst -sha256 -hmac "$MAYAGAMES_API_KEY" | sed 's/^.*= //')
curl -X POST "https://gaming.softmaya.com:8443/api/v2/game" \
-H "content-type: application/json" \
-H "agent-id: $MAYAGAMES_AGENT_ID" \
-H "sign: $SIGN" \
--data "$BODY"Response samples
Launch a game
Base URL
https://gaming.softmaya.com:8443/api/v2/game/launchOpens a game session for a player and returns what to show them.
When type is url, open gameData in an iframe or send the player to it. When type is html, gameData is a full HTML document: render it, for example in an iframe's srcdoc. Wallet callbacks for this game carry the sessionId from the response.
| Field | Type and description |
|---|---|
| userIdrequired | string <= 64 characters Your player identifier. |
| emailrequired | string <email> <= 100 characters Player email address. |
| countryCoderequired | string = 2 characters ISO 3166-1 alpha-2 code of the country the player opens the game from. |
| language | string = 2 characters Game language. |
| devicerequired | string Device the player uses. |
| iprequired | string <= 64 characters Player IP address. |
| balancerequired | string <= 12 characters Player balance with two decimals. |
| gameIdrequired | string <= 8 characters
|
| currencyrequired | string = 3 characters Player currency, for example EUR, USD or AUD. |
| returnUrl | string <uri> <= 250 characters URL the player returns to when they exit the game. |
Responses
200Success
| Field | Type and description | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| statusrequired | string The request succeeded. | ||||||||
| required | object What to show the player. | ||||||||
| |||||||||
200Error
The request was processed but failed. code tells you why.
| Field | Type and description |
|---|---|
| statusrequired | string The request failed. |
| coderequired | string Error code. See Error codes. |
| messagerequired | string Short description of the error. |
Base URL
https://gaming.softmaya.com:8443/api/v2/game/launchRequest samples
// mayaGames(): the signed request helper from Authentication
const result = await mayaGames("/api/v2/game/launch", {
ip: "192.168.1.1",
email: "[email protected]",
device: "desktop",
gameId: "12112",
userId: "sm04-60",
countryCode: "DE",
language: "de",
balance: "83.80",
currency: "EUR",
returnUrl: "https://your-casino.com/lobby"
});// mayaGames(): the signed request helper from Authentication
$result = mayaGames('/api/v2/game/launch', [
'ip' => '192.168.1.1',
'email' => '[email protected]',
'device' => 'desktop',
'gameId' => '12112',
'userId' => 'sm04-60',
'countryCode' => 'DE',
'language' => 'de',
'balance' => '83.80',
'currency' => 'EUR',
'returnUrl' => 'https://your-casino.com/lobby',
]);# maya_games(): the signed request helper from Authentication
result = maya_games("/api/v2/game/launch", {
"ip": "192.168.1.1",
"email": "[email protected]",
"device": "desktop",
"gameId": "12112",
"userId": "sm04-60",
"countryCode": "DE",
"language": "de",
"balance": "83.80",
"currency": "EUR",
"returnUrl": "https://your-casino.com/lobby",
})BODY='{"ip":"192.168.1.1","email":"[email protected]","device":"desktop","gameId":"12112","userId":"sm04-60","countryCode":"DE","language":"de","balance":"83.80","currency":"EUR","returnUrl":"https://your-casino.com/lobby"}'
SIGN=$(printf '%s' "$BODY" | openssl dgst -sha256 -hmac "$MAYAGAMES_API_KEY" | sed 's/^.*= //')
curl -X POST "https://gaming.softmaya.com:8443/api/v2/game/launch" \
-H "content-type: application/json" \
-H "agent-id: $MAYAGAMES_AGENT_ID" \
-H "sign: $SIGN" \
--data "$BODY"Response samples
Wallet callbacks
Balances stay in your system. During play, MayaGames sends JSON requests to your wallet endpoint, and you reply with the player's balance.
POST with a JSON body.Actions
| Action | What to do |
|---|---|
| init | The game session starts. Return the current balance. |
| balance | The game asks for the current balance. |
| bet | Debit a stake. Check the balance first. |
| win | Credit a win. |
| betandwin | A bet and its win in one request. Apply both, in order. |
| rollback | Cancel an earlier transaction and restore the balance. |
Rules for your wallet
- Process each
transactionIdonce. If the same ID arrives again, return error320. bet: check the balance first. If it is too low, debit nothing and return error220.betandwin: apply the bet, then the win, as one operation, and return the final balance.rollback: cancel the transaction inrollbackId. Return340if it does not exist,330if it was already cancelled.- Always return balances with two decimals.
- Sportsbook bets use the same actions with extra bet slip fields. See Sportsbook bet.
Error response
Start session
Sent when the game session starts. Return the player's current balance.
| Field | Type and description |
|---|---|
| actionrequired | string <= 64 characters Callback type. |
| userIdrequired | string <= 64 characters Your player identifier, as sent at launch. |
| sessionIdrequired | string <= 100 characters Game session ID from the launch response. |
Responses
Success
| Field | Type and description |
|---|---|
| statusrequired | string You read the balance. |
| userIdrequired | string <= 64 characters Player identifier. |
| balancerequired | string <= 12 characters Current balance, with two decimals. |
Error
Return this when you cannot apply the callback, with the matching error code.
| Field | Type and description |
|---|---|
| statusrequired | string You could not apply the callback. |
| coderequired | string Error code. See Error codes. |
| messagerequired | string Short description of the error. |
Request samples
Response samples
Get balance
Sent when the game needs the player's current balance.
| Field | Type and description |
|---|---|
| actionrequired | string <= 64 characters Callback type. |
| userIdrequired | string <= 64 characters Your player identifier, as sent at launch. |
| sessionIdrequired | string <= 100 characters Game session ID from the launch response. |
Responses
Success
| Field | Type and description |
|---|---|
| statusrequired | string You read the balance. |
| userIdrequired | string <= 64 characters Player identifier. |
| balancerequired | string <= 12 characters Current balance, with two decimals. |
Error
Return this when you cannot apply the callback, with the matching error code.
| Field | Type and description |
|---|---|
| statusrequired | string You could not apply the callback. |
| coderequired | string Error code. See Error codes. |
| messagerequired | string Short description of the error. |
Request samples
Response samples
Debit a bet
Debit the stake. Check the balance first: if it is too low, debit nothing and return error 220 (insufficient funds).
| Field | Type and description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| actionrequired | string <= 64 characters Callback type. | ||||||||||
| userIdrequired | string <= 64 characters Your player identifier, as sent at launch. | ||||||||||
| sessionIdrequired | string <= 100 characters Game session ID from the launch response. | ||||||||||
| gameId | string <= 8 characters
| ||||||||||
| currency | string = 3 characters Player currency. | ||||||||||
| required | Array of objects One bet. | ||||||||||
| |||||||||||
Responses
Success
| Field | Type and description |
|---|---|
| statusrequired | string You applied the transaction. |
| userIdrequired | string <= 64 characters Player identifier. |
| balancerequired | string <= 12 characters Balance after the transaction, with two decimals. |
| oldBalance | string <= 12 characters Balance before the transaction, with two decimals. |
| transactionId | string <= 64 characters Your own ID for the transaction. |
Error
Return this when you cannot apply the callback, with the matching error code.
| Field | Type and description |
|---|---|
| statusrequired | string You could not apply the callback. |
| coderequired | string Error code. See Error codes. |
| messagerequired | string Short description of the error. |
Request samples
Response samples
Credit a win
Credit the win to the player's balance.
| Field | Type and description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| actionrequired | string <= 64 characters Callback type. | ||||||||||
| userIdrequired | string <= 64 characters Your player identifier, as sent at launch. | ||||||||||
| sessionIdrequired | string <= 100 characters Game session ID from the launch response. | ||||||||||
| gameId | string <= 8 characters
| ||||||||||
| currency | string = 3 characters Player currency. | ||||||||||
| required | Array of objects One win. | ||||||||||
| |||||||||||
Responses
Success
| Field | Type and description |
|---|---|
| statusrequired | string You applied the transaction. |
| userIdrequired | string <= 64 characters Player identifier. |
| balancerequired | string <= 12 characters Balance after the transaction, with two decimals. |
| oldBalance | string <= 12 characters Balance before the transaction, with two decimals. |
| transactionId | string <= 64 characters Your own ID for the transaction. |
Error
Return this when you cannot apply the callback, with the matching error code.
| Field | Type and description |
|---|---|
| statusrequired | string You could not apply the callback. |
| coderequired | string Error code. See Error codes. |
| messagerequired | string Short description of the error. |
Request samples
Response samples
Bet and win
A bet and its win in one request. Apply the bet first, then the win, as one operation, and return the final balance.
| Field | Type and description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| actionrequired | string <= 64 characters Callback type. | ||||||||||
| userIdrequired | string <= 64 characters Your player identifier, as sent at launch. | ||||||||||
| sessionIdrequired | string <= 100 characters Game session ID from the launch response. | ||||||||||
| gameId | string <= 8 characters
| ||||||||||
| currency | string = 3 characters Player currency. | ||||||||||
| required | Array of objects Two transactions: the bet, then the win. | ||||||||||
| |||||||||||
Responses
Success
| Field | Type and description |
|---|---|
| statusrequired | string You applied the transaction. |
| userIdrequired | string <= 64 characters Player identifier. |
| balancerequired | string <= 12 characters Balance after the transaction, with two decimals. |
| oldBalance | string <= 12 characters Balance before the transaction, with two decimals. |
| transactionId | string <= 64 characters Your own ID for the transaction. |
Error
Return this when you cannot apply the callback, with the matching error code.
| Field | Type and description |
|---|---|
| statusrequired | string You could not apply the callback. |
| coderequired | string Error code. See Error codes. |
| messagerequired | string Short description of the error. |
Request samples
Response samples
Roll back a transaction
Cancel the transaction in rollbackId, a transaction that was cancelled or not processed, and restore the balance. Return error 340 if it does not exist and 330 if it was already cancelled.
| Field | Type and description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| actionrequired | string <= 64 characters Callback type. | ||||||||||||
| userIdrequired | string <= 64 characters Your player identifier, as sent at launch. | ||||||||||||
| sessionIdrequired | string <= 100 characters Game session ID from the launch response. | ||||||||||||
| gameId | string <= 8 characters
| ||||||||||||
| currency | string = 3 characters Player currency. | ||||||||||||
| required | Array of objects One rollback. | ||||||||||||
| |||||||||||||
Responses
Success
| Field | Type and description |
|---|---|
| statusrequired | string You applied the transaction. |
| userIdrequired | string <= 64 characters Player identifier. |
| balancerequired | string <= 12 characters Balance after the transaction, with two decimals. |
| oldBalance | string <= 12 characters Balance before the transaction, with two decimals. |
| transactionId | string <= 64 characters Your own ID for the transaction. |
Error
Return this when you cannot apply the callback, with the matching error code.
| Field | Type and description |
|---|---|
| statusrequired | string You could not apply the callback. |
| coderequired | string Error code. See Error codes. |
| messagerequired | string Short description of the error. |
Request samples
Response samples
Sportsbook bet
Sportsbook bets use gameId 6583 and the same bet and win actions. Their transactions also carry betslipId, actionId and ticketDetail, the bet slip with its selections.
| Field | Type and description | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| actionrequired | string <= 64 characters Callback type. | ||||||||||||||
| userIdrequired | string <= 64 characters Your player identifier, as sent at launch. | ||||||||||||||
| sessionIdrequired | string <= 100 characters Game session ID from the launch response. | ||||||||||||||
| gameIdrequired | string <= 8 characters The sportsbook. | ||||||||||||||
| currency | string = 3 characters Player currency. | ||||||||||||||
| required | Array of objects One transaction. | ||||||||||||||
| |||||||||||||||
Responses
Success
| Field | Type and description |
|---|---|
| statusrequired | string You applied the transaction. |
| userIdrequired | string <= 64 characters Player identifier. |
| balancerequired | string <= 12 characters Balance after the transaction, with two decimals. |
| oldBalance | string <= 12 characters Balance before the transaction, with two decimals. |
| transactionId | string <= 64 characters Your own ID for the transaction. |
Error
Return this when you cannot apply the callback, with the matching error code.
| Field | Type and description |
|---|---|
| statusrequired | string You could not apply the callback. |
| coderequired | string Error code. See Error codes. |
| messagerequired | string Short description of the error. |
Request samples
Response samples
Free rounds
Give a player free rounds on games with freeRound: 1 in the game list. Keep the bonusCode from the response: you need it to cancel the free rounds.
Create free rounds
Base URL
https://gaming.softmaya.com:8443/api/v2/freeround/createGives a player free rounds on a game with freeRound: 1 in the game list.
| Field | Type and description |
|---|---|
| userIdrequired | string <= 64 characters Your player identifier. |
| userName | string <= 64 characters Player username. |
| emailrequired | string <email> <= 100 characters Player email address. |
| countryCoderequired | string = 2 characters ISO 3166-1 alpha-2 country code. |
| currencyrequired | string = 3 characters Player currency, for example EUR, USD or AUD. |
| gameIdrequired | string <= 8 characters A game with |
| roundsrequired | integer <= 100 Number of free rounds. |
| betPerLinerequired | integer Bet per line: |
| startDaterequired | string <date> First day the free rounds can be played (YYYY-MM-DD). |
| endDaterequired | string <date> Last day the free rounds can be played (YYYY-MM-DD). |
Responses
200Success
| Field | Type and description |
|---|---|
| statusrequired | string The free rounds were created. |
| bonusCoderequired | string <= 32 characters Free round identifier. Keep it to cancel the free rounds. |
200Error
The request was processed but failed. code tells you why.
| Field | Type and description |
|---|---|
| statusrequired | string The request failed. |
| coderequired | string Error code. See Error codes. |
| messagerequired | string Short description of the error. |
Base URL
https://gaming.softmaya.com:8443/api/v2/freeround/createRequest samples
// mayaGames(): the signed request helper from Authentication
const result = await mayaGames("/api/v2/freeround/create", {
userId: "sm10-62",
userName: "sm10-62",
email: "[email protected]",
countryCode: "DE",
currency: "EUR",
gameId: "35728",
rounds: 30,
betPerLine: 2,
startDate: "2026-12-01",
endDate: "2026-12-07"
});// mayaGames(): the signed request helper from Authentication
$result = mayaGames('/api/v2/freeround/create', [
'userId' => 'sm10-62',
'userName' => 'sm10-62',
'email' => '[email protected]',
'countryCode' => 'DE',
'currency' => 'EUR',
'gameId' => '35728',
'rounds' => 30,
'betPerLine' => 2,
'startDate' => '2026-12-01',
'endDate' => '2026-12-07',
]);# maya_games(): the signed request helper from Authentication
result = maya_games("/api/v2/freeround/create", {
"userId": "sm10-62",
"userName": "sm10-62",
"email": "[email protected]",
"countryCode": "DE",
"currency": "EUR",
"gameId": "35728",
"rounds": 30,
"betPerLine": 2,
"startDate": "2026-12-01",
"endDate": "2026-12-07",
})BODY='{"userId":"sm10-62","userName":"sm10-62","email":"[email protected]","countryCode":"DE","currency":"EUR","gameId":"35728","rounds":30,"betPerLine":2,"startDate":"2026-12-01","endDate":"2026-12-07"}'
SIGN=$(printf '%s' "$BODY" | openssl dgst -sha256 -hmac "$MAYAGAMES_API_KEY" | sed 's/^.*= //')
curl -X POST "https://gaming.softmaya.com:8443/api/v2/freeround/create" \
-H "content-type: application/json" \
-H "agent-id: $MAYAGAMES_AGENT_ID" \
-H "sign: $SIGN" \
--data "$BODY"Response samples
Cancel free rounds
Base URL
https://gaming.softmaya.com:8443/api/v2/freeround/cancelCancels free rounds created with Create free rounds.
| Field | Type and description |
|---|---|
| bonusCoderequired | string <= 32 characters
|
Responses
200Success
| Field | Type and description |
|---|---|
| statusrequired | string The free rounds were cancelled. |
| messagerequired | string Result message, for example |
200Error
The request was processed but failed. code tells you why.
| Field | Type and description |
|---|---|
| statusrequired | string The request failed. |
| coderequired | string Error code. See Error codes. |
| messagerequired | string Short description of the error. |
Base URL
https://gaming.softmaya.com:8443/api/v2/freeround/cancelRequest samples
// mayaGames(): the signed request helper from Authentication
const result = await mayaGames("/api/v2/freeround/cancel", {
bonusCode: "bb805904b10fc9321d2301b7675ada39"
});// mayaGames(): the signed request helper from Authentication
$result = mayaGames('/api/v2/freeround/cancel', [
'bonusCode' => 'bb805904b10fc9321d2301b7675ada39',
]);# maya_games(): the signed request helper from Authentication
result = maya_games("/api/v2/freeround/cancel", {
"bonusCode": "bb805904b10fc9321d2301b7675ada39",
})BODY='{"bonusCode":"bb805904b10fc9321d2301b7675ada39"}'
SIGN=$(printf '%s' "$BODY" | openssl dgst -sha256 -hmac "$MAYAGAMES_API_KEY" | sed 's/^.*= //')
curl -X POST "https://gaming.softmaya.com:8443/api/v2/freeround/cancel" \
-H "content-type: application/json" \
-H "agent-id: $MAYAGAMES_AGENT_ID" \
-H "sign: $SIGN" \
--data "$BODY"Response samples
Error codes
Errors return status: error with one of these codes. Your wallet uses the same codes in its callback replies.
| Code | Name | When |
|---|---|---|
210 | INVALID PARAMETERS | A parameter is missing or has an invalid value. |
220 | INSUFFICIENT FUNDS | The balance does not cover the bet. Return it from your bet callback. |
230 | INVALID HMAC | The sign header does not match the request body. |
240 | USER NOT FOUND | The userId is unknown. |
250 | INVALID USER CURRENCY | The currency does not match the player's currency. |
310 | TRANSACTION PARAMETER MISMATCH | The transaction data does not match an earlier request. |
320 | DUPLICATE TRANSACTION ID | The transactionId was already processed. |
330 | TRANSACTION ALREADY CANCELED | The transaction in rollbackId was already cancelled. |
340 | TRANSACTION NOT FOUND | The transaction in rollbackId does not exist. |
400 | GENERAL ERROR | Any other error. |
403 | GAME IS NOT AVAILABLE | The game cannot be opened, for example in this country. |
500 | INTERNAL SERVER ERROR | Unexpected server error. Retry later. |

