Skip to main content

Backend integration

Request signature

good to know

All POST requests contain the X-Auth-Signature HTTP header required to authenticate the host. That allows to refuse IP whitelisting during integration process. Otherwise, it deprives the provider of the ability to scale quickly (horizontally) without notifying the platform.

do not miss

The request body must not contain spaces or line breaks.

Request signature is serialized by the client as a Base64-encoded string and passed in the X-Auth-Signature HTTP header.

Signature verification algorithm:

  1. A secret key is preliminarily exchanged between the client and the server in the form of a UUID (can be received from the provider)
  2. Server receives a request from the client by reading the signature from the HTTP header X-Auth-Signature.
  3. Request body and secret key (p.1) are the input parameters for the function HMAC-MD5 which generates a certain byte sequence at the output.
  4. Byte sequence (p.4) is serialized in the form of Base64 encoded string.
  5. Server compares the resulting string (p. 5) with the string received from the client (p. 2). If they match, the signature is valid.

Example of automatic signature generation for a POSTMAN client

  1. Add the following cURL to Postman(to get correct host please contact your integration manager)
curl --location '$HOST/game/round' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Signature: .... ' \
--header 'Accept: text/html' \
--data '{"cid":"brand-name","playerId":"user-id","productId":"nft-aviatrix","roundId":"123456789","lang":"en"}'
  1. Add the {{signature}} variable as a value for the X-Auth-Signature header
  2. Add the variable {{secret}} and set it to the value of your integration's secret key used to create the signature
  3. Add the following script to your request
const signature = CryptoJS.enc.Base64.stringify(CryptoJS.HmacMD5(pm.request.body.toString(), pm.collectionVariables.get("secret")));
pm.collectionVariables.set("signature", signature);

Examples of signature generation in Bash

Empty JSON object

MESSAGE='{}'
SECRET="4d3c2b1a-6f5e-4d3c-b2a1-f6e5d4c3b2a1"

echo -n $MESSAGE | openssl dgst -md5 -hmac $SECRET -binary | base64
> RVBMsFzKbgu9Bs6tSp5jBg==

/playerInfo JSON object

MESSAGE='{"cid":"somebrand","sessionToken":"some4session7token5","timestamp":1234567890}'
SECRET="4d3c2b1a-6f5e-4d3c-b2a1-f6e5d4c3b2a1"

echo -n $MESSAGE | openssl dgst -md5 -hmac $SECRET -binary | base64
> uCYq/GK8ZOYZB5GdNq87Yw==

/bet JSON object

MESSAGE='{"betId":"1a2b3c4d-6f5e-4d3c-b2a1-f6e5d4c3b2a1","cid":"somebrand","sessionToken":"some4session7token5","playerId":"someplayerid123","productId":"nft-aviatrix","txId":"eyJiaWQiOiIxYTJiM2M0ZC02ZjVlLTRkM2MtYjJhMS1mNmU1ZDRjM2IyYTEiLCJvcCI6IlBsYWNlQmV0Iiwia2V5IjoiIn0=","roundId":"1234567","market":"result","outcome":"crash","specifier":"","odds":10000,"amount":1000,"currency":"EUR","roundClosed":false,"timestamp":1234567890,"bonusId":""}'
SECRET="4d3c2b1a-6f5e-4d3c-b2a1-f6e5d4c3b2a1"

echo -n $MESSAGE | openssl dgst -md5 -hmac $SECRET -binary | base64
> feQeeyYFxzuRVLLpMQPkZA==

/win JSON object

MESSAGE='{"betId":"1a2b3c4d-6f5e-4d3c-b2a1-f6e5d4c3b2a1","cid":"somebrand","sessionToken":"some4session7token5","playerId":"someplayerid123","productId":"nft-aviatrix","txId":"eyJiaWQiOiIxYTJiM2M0ZC02ZjVlLTRkM2MtYjJhMS1mNmU1ZDRjM2IyYTEiLCJvcCI6IlNldHRsZUJldCIsImtleSI6IiJ9","roundId":"1234567","market":"result","outcome":"crash","specifier":"","odds":10000,"amount":1000,"currency":"EUR","roundClosed":false,"timestamp":1234567890,"operation":"SettleBet","bonusId":""}'
SECRET="4d3c2b1a-6f5e-4d3c-b2a1-f6e5d4c3b2a1"

echo -n $MESSAGE | openssl dgst -md5 -hmac $SECRET -binary | base64
> gtk4+Vn4RYBv8A3HxQK4Lw==

/transactions/promoWin JSON object

MESSAGE='{"cid":"somebrand","sessionToken":"some4session7token5","playerId":"someplayerid123","productId":"nft-aviatrix","txId":"eyJiaWQiOiIxYTJiM2M0ZC02ZjVlLTRkM2MtYjJhMS1mNmU1ZDRjM2IyYTEiLCJvcCI6IlByb21vV2luIiwia2V5IjoiIn0=","amount":1000,"currency":"EUR","promo":{"type":"bonus","bonusId":"some1bonus2id"}}'
SECRET="4d3c2b1a-6f5e-4d3c-b2a1-f6e5d4c3b2a1"

echo -n $MESSAGE | openssl dgst -md5 -hmac $SECRET -binary | base64
> KNJx/uTGu0dn0SikyFF3rQ==

/closeMatch JSON object

MESSAGE='{"cid":"somebrand","playerId":"someplayerid123","productId":"nft-aviatrix","matchId":"1234567","txId":"eyJiaWQiOiIxMjM0NS0xMjM0NTYiLCJvcCI6IkNsb3NlTWF0Y2giLCJrZXkiOiIifQ=="}'
SECRET="4d3c2b1a-6f5e-4d3c-b2a1-f6e5d4c3b2a1"

echo -n $MESSAGE | openssl dgst -md5 -hmac $SECRET -binary | base64
> e114TJ6qfSaSHYTS1CR9AA==

Examples of signature generation in Python

Empty JSON object

message = '{}'
secret = '4d3c2b1a-6f5e-4d3c-b2a1-f6e5d4c3b2a1'

signature = hmac.new(secret.encode(), msg=message.encode(), digestmod=hashlib.md5)
encoded_signature = base64.b64encode(signature.digest()).decode()

print(encoded_signature)
> RVBMsFzKbgu9Bs6tSp5jBg==

/playerInfo JSON object

message='{"cid":"somebrand","sessionToken":"some4session7token5","timestamp":1234567890}'
secret = '4d3c2b1a-6f5e-4d3c-b2a1-f6e5d4c3b2a1'

signature = hmac.new(secret.encode(), msg=message.encode(), digestmod=hashlib.md5)
encoded_signature = base64.b64encode(signature.digest()).decode()

print(encoded_signature)
> uCYq/GK8ZOYZB5GdNq87Yw==

/bet JSON object

message='{"betId":"1a2b3c4d-6f5e-4d3c-b2a1-f6e5d4c3b2a1","cid":"somebrand","sessionToken":"some4session7token5","playerId":"someplayerid123","productId":"nft-aviatrix","txId":"eyJiaWQiOiIxYTJiM2M0ZC02ZjVlLTRkM2MtYjJhMS1mNmU1ZDRjM2IyYTEiLCJvcCI6IlBsYWNlQmV0Iiwia2V5IjoiIn0=","roundId":"1234567","market":"result","outcome":"crash","specifier":"","odds":10000,"amount":1000,"currency":"EUR","roundClosed":false,"timestamp":1234567890,"bonusId":""}'
secret = '4d3c2b1a-6f5e-4d3c-b2a1-f6e5d4c3b2a1'

signature = hmac.new(secret.encode(), msg=message.encode(), digestmod=hashlib.md5)
encoded_signature = base64.b64encode(signature.digest()).decode()

print(encoded_signature)
> feQeeyYFxzuRVLLpMQPkZA==

/win JSON object

message='{"betId":"1a2b3c4d-6f5e-4d3c-b2a1-f6e5d4c3b2a1","cid":"somebrand","sessionToken":"some4session7token5","playerId":"someplayerid123","productId":"nft-aviatrix","txId":"eyJiaWQiOiIxYTJiM2M0ZC02ZjVlLTRkM2MtYjJhMS1mNmU1ZDRjM2IyYTEiLCJvcCI6IlNldHRsZUJldCIsImtleSI6IiJ9","roundId":"1234567","market":"result","outcome":"crash","specifier":"","odds":10000,"amount":1000,"currency":"EUR","roundClosed":false,"timestamp":1234567890,"operation":"SettleBet","bonusId":""}'
secret = '4d3c2b1a-6f5e-4d3c-b2a1-f6e5d4c3b2a1'

signature = hmac.new(secret.encode(), msg=message.encode(), digestmod=hashlib.md5)
encoded_signature = base64.b64encode(signature.digest()).decode()

print(encoded_signature)
> gtk4+Vn4RYBv8A3HxQK4Lw==

/transactions/promoWin JSON object

message = '{"cid":"somebrand","sessionToken":"some4session7token5","playerId":"someplayerid123","productId":"nft-aviatrix","txId":"eyJiaWQiOiIxYTJiM2M0ZC02ZjVlLTRkM2MtYjJhMS1mNmU1ZDRjM2IyYTEiLCJvcCI6IlByb21vV2luIiwia2V5IjoiIn0=","amount":1000,"currency":"EUR","promo":{"type":"bonus","bonusId":"some1bonus2id"}}'
secret = "4d3c2b1a-6f5e-4d3c-b2a1-f6e5d4c3b2a1"

signature = hmac.new(secret.encode(), msg=message.encode(), digestmod=hashlib.md5)
encoded_signature = base64.b64encode(signature.digest()).decode()

print(encoded_signature)
> KNJx/uTGu0dn0SikyFF3rQ==

/closeMatch JSON object

message = '{"cid":"somebrand","playerId":"someplayerid123","productId":"nft-aviatrix","matchId":"1234567","txId":"eyJiaWQiOiIxMjM0NS0xMjM0NTYiLCJvcCI6IkNsb3NlTWF0Y2giLCJrZXkiOiIifQ=="}'
secret = "4d3c2b1a-6f5e-4d3c-b2a1-f6e5d4c3b2a1"

signature = hmac.new(secret.encode(), msg=message.encode(), digestmod=hashlib.md5)
encoded_signature = base64.b64encode(signature.digest()).decode()

print(encoded_signature)
> e114TJ6qfSaSHYTS1CR9AA==

Examples of signature generation in Java

Empty JSON object

String message = "{}";
String secret = "4d3c2b1a-6f5e-4d3c-b2a1-f6e5d4c3b2a1";

Mac sha256_HMAC = Mac.getInstance("HmacMD5");
SecretKeySpec secret_key = new SecretKeySpec(secret.getBytes(), "HmacMD5");
sha256_HMAC.init(secret_key);

String hash = Base64.getEncoder().encodeToString(sha256_HMAC.doFinal(message.getBytes()));
System.out.println(hash);
> RVBMsFzKbgu9Bs6tSp5jBg==

/playerInfo JSON object

String message = "{\"cid\":\"somebrand\",\"sessionToken\":\"some4session7token5\",\"timestamp\":1234567890}";
String secret = "4d3c2b1a-6f5e-4d3c-b2a1-f6e5d4c3b2a1";

Mac sha256_HMAC = Mac.getInstance("HmacMD5");
SecretKeySpec secret_key = new SecretKeySpec(secret.getBytes(), "HmacMD5");
sha256_HMAC.init(secret_key);

String hash = Base64.getEncoder().encodeToString(sha256_HMAC.doFinal(message.getBytes()));
System.out.println(hash);
> uCYq/GK8ZOYZB5GdNq87Yw==

/bet JSON object

String message = "{\"betId\":\"1a2b3c4d-6f5e-4d3c-b2a1-f6e5d4c3b2a1\",\"cid\":\"somebrand\",\"sessionToken\":\"some4session7token5\",\"playerId\":\"someplayerid123\",\"productId\":\"nft-aviatrix\",\"txId\":\"eyJiaWQiOiIxYTJiM2M0ZC02ZjVlLTRkM2MtYjJhMS1mNmU1ZDRjM2IyYTEiLCJvcCI6IlBsYWNlQmV0Iiwia2V5IjoiIn0=\",\"roundId\":\"1234567\",\"market\":\"result\",\"outcome\":\"crash\",\"specifier\":\"\",\"odds\":10000,\"amount\":1000,\"currency\":\"EUR\",\"roundClosed\":false,\"timestamp\":1234567890,\"bonusId\":\"\"}";
String secret = "4d3c2b1a-6f5e-4d3c-b2a1-f6e5d4c3b2a1";

Mac sha256_HMAC = Mac.getInstance("HmacMD5");
SecretKeySpec secret_key = new SecretKeySpec(secret.getBytes(), "HmacMD5");
sha256_HMAC.init(secret_key);

String hash = Base64.getEncoder().encodeToString(sha256_HMAC.doFinal(message.getBytes()));
System.out.println(hash);
> feQeeyYFxzuRVLLpMQPkZA==

/win JSON object

String message = "{\"betId\":\"1a2b3c4d-6f5e-4d3c-b2a1-f6e5d4c3b2a1\",\"cid\":\"somebrand\",\"sessionToken\":\"some4session7token5\",\"playerId\":\"someplayerid123\",\"productId\":\"nft-aviatrix\",\"txId\":\"eyJiaWQiOiIxYTJiM2M0ZC02ZjVlLTRkM2MtYjJhMS1mNmU1ZDRjM2IyYTEiLCJvcCI6IlNldHRsZUJldCIsImtleSI6IiJ9\",\"roundId\":\"1234567\",\"market\":\"result\",\"outcome\":\"crash\",\"specifier\":\"\",\"odds\":10000,\"amount\":1000,\"currency\":\"EUR\",\"roundClosed\":false,\"timestamp\":1234567890,\"operation\":\"SettleBet\",\"bonusId\":\"\"}";
String secret = "4d3c2b1a-6f5e-4d3c-b2a1-f6e5d4c3b2a1";

Mac sha256_HMAC = Mac.getInstance("HmacMD5");
SecretKeySpec secret_key = new SecretKeySpec(secret.getBytes(), "HmacMD5");
sha256_HMAC.init(secret_key);

String hash = Base64.getEncoder().encodeToString(sha256_HMAC.doFinal(message.getBytes()));
System.out.println(hash);
> gtk4+Vn4RYBv8A3HxQK4Lw==

/transactions/promoWin JSON object

String message = "{\"cid\":\"somebrand\",\"sessionToken\":\"some4session7token5\",\"playerId\":\"someplayerid123\",\"productId\":\"nft-aviatrix\",\"txId\":\"eyJiaWQiOiIxYTJiM2M0ZC02ZjVlLTRkM2MtYjJhMS1mNmU1ZDRjM2IyYTEiLCJvcCI6IlByb21vV2luIiwia2V5IjoiIn0=\",\"amount\":1000,\"currency\":\"EUR\",\"promo\":{\"type\":\"bonus\",\"bonusId\":\"some1bonus2id\"}}";
String secret = "4d3c2b1a-6f5e-4d3c-b2a1-f6e5d4c3b2a1";

Mac sha256_HMAC = Mac.getInstance("HmacMD5");
SecretKeySpec secret_key = new SecretKeySpec(secret.getBytes(), "HmacMD5");
sha256_HMAC.init(secret_key);

String hash = Base64.getEncoder().encodeToString(sha256_HMAC.doFinal(message.getBytes()));
System.out.println(hash);
> KNJx/uTGu0dn0SikyFF3rQ==

/closeMatch JSON object

String message = "{\"cid\":\"somebrand\",\"playerId\":\"someplayerid123\",\"productId\":\"nft-aviatrix\",\"matchId\":\"1234567\",\"txId\":\"eyJiaWQiOiIxMjM0NS0xMjM0NTYiLCJvcCI6IkNsb3NlTWF0Y2giLCJrZXkiOiIifQ==\"}";
String secret = "4d3c2b1a-6f5e-4d3c-b2a1-f6e5d4c3b2a1";

Mac sha256_HMAC = Mac.getInstance("HmacMD5");
SecretKeySpec secret_key = new SecretKeySpec(secret.getBytes(), "HmacMD5");
sha256_HMAC.init(secret_key);

String hash = Base64.getEncoder().encodeToString(sha256_HMAC.doFinal(message.getBytes()));
System.out.println(hash);
> e114TJ6qfSaSHYTS1CR9AA==

Examples of signature generation in PHP

Empty JSON object

$message = "{}";
$secret = "4d3c2b1a-6f5e-4d3c-b2a1-f6e5d4c3b2a1";

$signature = hash_hmac('md5', $message, $secret, true);
$encodedSignature = base64_encode($signature);

echo $encodedSignature;
> RVBMsFzKbgu9Bs6tSp5jBg==

/playerInfo JSON object

$message = "{\"cid\":\"somebrand\",\"sessionToken\":\"some4session7token5\",\"timestamp\":1234567890}";
$secret = "4d3c2b1a-6f5e-4d3c-b2a1-f6e5d4c3b2a1";

$signature = hash_hmac('md5', $message, $secret, true);
$encodedSignature = base64_encode($signature);

echo $encodedSignature;
> uCYq/GK8ZOYZB5GdNq87Yw==

/bet JSON object

$message = "{\"betId\":\"1a2b3c4d-6f5e-4d3c-b2a1-f6e5d4c3b2a1\",\"cid\":\"somebrand\",\"sessionToken\":\"some4session7token5\",\"playerId\":\"someplayerid123\",\"productId\":\"nft-aviatrix\",\"txId\":\"eyJiaWQiOiIxYTJiM2M0ZC02ZjVlLTRkM2MtYjJhMS1mNmU1ZDRjM2IyYTEiLCJvcCI6IlBsYWNlQmV0Iiwia2V5IjoiIn0=\",\"roundId\":\"1234567\",\"market\":\"result\",\"outcome\":\"crash\",\"specifier\":\"\",\"odds\":10000,\"amount\":1000,\"currency\":\"EUR\",\"roundClosed\":false,\"timestamp\":1234567890,\"bonusId\":\"\"}";
$secret = "4d3c2b1a-6f5e-4d3c-b2a1-f6e5d4c3b2a1";

$signature = hash_hmac('md5', $message, $secret, true);
$encodedSignature = base64_encode($signature);

echo $encodedSignature;
> feQeeyYFxzuRVLLpMQPkZA==

/win JSON object

$message = "{\"betId\":\"1a2b3c4d-6f5e-4d3c-b2a1-f6e5d4c3b2a1\",\"cid\":\"somebrand\",\"sessionToken\":\"some4session7token5\",\"playerId\":\"someplayerid123\",\"productId\":\"nft-aviatrix\",\"txId\":\"eyJiaWQiOiIxYTJiM2M0ZC02ZjVlLTRkM2MtYjJhMS1mNmU1ZDRjM2IyYTEiLCJvcCI6IlNldHRsZUJldCIsImtleSI6IiJ9\",\"roundId\":\"1234567\",\"market\":\"result\",\"outcome\":\"crash\",\"specifier\":\"\",\"odds\":10000,\"amount\":1000,\"currency\":\"EUR\",\"roundClosed\":false,\"timestamp\":1234567890,\"operation\":\"SettleBet\",\"bonusId\":\"\"}";
$secret = "4d3c2b1a-6f5e-4d3c-b2a1-f6e5d4c3b2a1";

$signature = hash_hmac('md5', $message, $secret, true);
$encodedSignature = base64_encode($signature);

echo $encodedSignature;
> gtk4+Vn4RYBv8A3HxQK4Lw==

/transactions/promoWin JSON object

$message = "{\"cid\":\"somebrand\",\"sessionToken\":\"some4session7token5\",\"playerId\":\"someplayerid123\",\"productId\":\"nft-aviatrix\",\"txId\":\"eyJiaWQiOiIxYTJiM2M0ZC02ZjVlLTRkM2MtYjJhMS1mNmU1ZDRjM2IyYTEiLCJvcCI6IlByb21vV2luIiwia2V5IjoiIn0=\",\"amount\":1000,\"currency\":\"EUR\",\"promo\":{\"type\":\"bonus\",\"bonusId\":\"some1bonus2id\"}}";
$secret = "4d3c2b1a-6f5e-4d3c-b2a1-f6e5d4c3b2a1";

$signature = hash_hmac('md5', $message, $secret, true);
$encodedSignature = base64_encode($signature);

echo $encodedSignature;
> KNJx/uTGu0dn0SikyFF3rQ==

/closeMatch JSON object

$message = "{\"cid\":\"somebrand\",\"playerId\":\"someplayerid123\",\"productId\":\"nft-aviatrix\",\"matchId\":\"1234567\",\"txId\":\"eyJiaWQiOiIxMjM0NS0xMjM0NTYiLCJvcCI6IkNsb3NlTWF0Y2giLCJrZXkiOiIifQ==\"}";
$secret = "4d3c2b1a-6f5e-4d3c-b2a1-f6e5d4c3b2a1";

$signature = hash_hmac('md5', $message, $secret, true);
$encodedSignature = base64_encode($signature);

echo $encodedSignature;
> e114TJ6qfSaSHYTS1CR9AA==

Examples of signature generation in Go

Empty JSON object

message := "{}"
secret := "4d3c2b1a-6f5e-4d3c-b2a1-f6e5d4c3b2a1"

h := hmac.New(md5.New, []byte(secret))
h.Write([]byte(message))

encodedSignature := base64.StdEncoding.EncodeToString(h.Sum(nil))

fmt.Println(encodedSignature)
> RVBMsFzKbgu9Bs6tSp5jBg==

/playerInfo JSON object

message := "{\"cid\":\"somebrand\",\"sessionToken\":\"some4session7token5\",\"timestamp\":1234567890}"
secret := "4d3c2b1a-6f5e-4d3c-b2a1-f6e5d4c3b2a1"

h := hmac.New(md5.New, []byte(secret))
h.Write([]byte(message))

encodedSignature := base64.StdEncoding.EncodeToString(h.Sum(nil))

fmt.Println(encodedSignature)
> uCYq/GK8ZOYZB5GdNq87Yw==

/bet JSON object

message := "{\"betId\":\"1a2b3c4d-6f5e-4d3c-b2a1-f6e5d4c3b2a1\",\"cid\":\"somebrand\",\"sessionToken\":\"some4session7token5\",\"playerId\":\"someplayerid123\",\"productId\":\"nft-aviatrix\",\"txId\":\"eyJiaWQiOiIxYTJiM2M0ZC02ZjVlLTRkM2MtYjJhMS1mNmU1ZDRjM2IyYTEiLCJvcCI6IlBsYWNlQmV0Iiwia2V5IjoiIn0=\",\"roundId\":\"1234567\",\"market\":\"result\",\"outcome\":\"crash\",\"specifier\":\"\",\"odds\":10000,\"amount\":1000,\"currency\":\"EUR\",\"roundClosed\":false,\"timestamp\":1234567890,\"bonusId\":\"\"}"
secret := "4d3c2b1a-6f5e-4d3c-b2a1-f6e5d4c3b2a1"

h := hmac.New(md5.New, []byte(secret))
h.Write([]byte(message))

encodedSignature := base64.StdEncoding.EncodeToString(h.Sum(nil))

fmt.Println(encodedSignature)
> feQeeyYFxzuRVLLpMQPkZA==

/win JSON object

message := "{\"betId\":\"1a2b3c4d-6f5e-4d3c-b2a1-f6e5d4c3b2a1\",\"cid\":\"somebrand\",\"sessionToken\":\"some4session7token5\",\"playerId\":\"someplayerid123\",\"productId\":\"nft-aviatrix\",\"txId\":\"eyJiaWQiOiIxYTJiM2M0ZC02ZjVlLTRkM2MtYjJhMS1mNmU1ZDRjM2IyYTEiLCJvcCI6IlNldHRsZUJldCIsImtleSI6IiJ9\",\"roundId\":\"1234567\",\"market\":\"result\",\"outcome\":\"crash\",\"specifier\":\"\",\"odds\":10000,\"amount\":1000,\"currency\":\"EUR\",\"roundClosed\":false,\"timestamp\":1234567890,\"operation\":\"SettleBet\",\"bonusId\":\"\"}"
secret := "4d3c2b1a-6f5e-4d3c-b2a1-f6e5d4c3b2a1"

h := hmac.New(md5.New, []byte(secret))
h.Write([]byte(message))

encodedSignature := base64.StdEncoding.EncodeToString(h.Sum(nil))

fmt.Println(encodedSignature)
> gtk4+Vn4RYBv8A3HxQK4Lw==

/transactions/promoWin JSON object

message := "{\"cid\":\"somebrand\",\"sessionToken\":\"some4session7token5\",\"playerId\":\"someplayerid123\",\"productId\":\"nft-aviatrix\",\"txId\":\"eyJiaWQiOiIxYTJiM2M0ZC02ZjVlLTRkM2MtYjJhMS1mNmU1ZDRjM2IyYTEiLCJvcCI6IlByb21vV2luIiwia2V5IjoiIn0=\",\"amount\":1000,\"currency\":\"EUR\",\"promo\":{\"type\":\"bonus\",\"bonusId\":\"some1bonus2id\"}}"
secret := "4d3c2b1a-6f5e-4d3c-b2a1-f6e5d4c3b2a1"

h := hmac.New(md5.New, []byte(secret))
h.Write([]byte(message))

encodedSignature := base64.StdEncoding.EncodeToString(h.Sum(nil))

fmt.Println(encodedSignature)
> KNJx/uTGu0dn0SikyFF3rQ==

/closeMatch JSON object

message := "{\"cid\":\"somebrand\",\"playerId\":\"someplayerid123\",\"productId\":\"nft-aviatrix\",\"matchId\":\"1234567\",\"txId\":\"eyJiaWQiOiIxMjM0NS0xMjM0NTYiLCJvcCI6IkNsb3NlTWF0Y2giLCJrZXkiOiIifQ==\"}"
secret := "4d3c2b1a-6f5e-4d3c-b2a1-f6e5d4c3b2a1"

h := hmac.New(md5.New, []byte(secret))
h.Write([]byte(message))

encodedSignature := base64.StdEncoding.EncodeToString(h.Sum(nil))

fmt.Println(encodedSignature)
> e114TJ6qfSaSHYTS1CR9AA==