Tournament Prize
curl --request POST \
--url https://ss.game-services.work/tournament-prize \
--header 'Authorization: Bearer <token>'import requests
url = "https://ss.game-services.work/tournament-prize"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://ss.game-services.work/tournament-prize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://ss.game-services.work/tournament-prize",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://ss.game-services.work/tournament-prize"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://ss.game-services.work/tournament-prize")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://ss.game-services.work/tournament-prize")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyPOST /tournament-prize
Content-Type: application/json
{
"playerId": "123e4567-e89b-12d3-a456-426614174000",
"amount": 1500.00,
"transactionId": "d1c4f1d6-7e35-4e62-84af-ef83b474d8a9",
"transactionTimestamp": 1632771475000
}
{
"balance": 1600.00
}
{
"error_code": "INVALID_PLAYER_ID"
}
Wallet API
Tournament Prize
Debits the specified tournament prize amount to the player’s balance after tournament is finished.
Tournament Prize
curl --request POST \
--url https://ss.game-services.work/tournament-prize \
--header 'Authorization: Bearer <token>'import requests
url = "https://ss.game-services.work/tournament-prize"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://ss.game-services.work/tournament-prize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://ss.game-services.work/tournament-prize",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://ss.game-services.work/tournament-prize"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://ss.game-services.work/tournament-prize")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://ss.game-services.work/tournament-prize")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyPOST /tournament-prize
Content-Type: application/json
{
"playerId": "123e4567-e89b-12d3-a456-426614174000",
"amount": 1500.00,
"transactionId": "d1c4f1d6-7e35-4e62-84af-ef83b474d8a9",
"transactionTimestamp": 1632771475000
}
{
"balance": 1600.00
}
{
"error_code": "INVALID_PLAYER_ID"
}
POST /tournament-prize
This operation is idempotent.
Headers
| Name | Type | Description |
|---|---|---|
| X-Auth-Token | string | Custom authentication header in the format X-Auth-Token: your_token_here. This token is required to authorize API requests. |
Request Parameters
| Name | Type | Description |
|---|---|---|
| playerId | string | Unique identifier of the player. |
| amount | decimal | Amount to debit. |
| transactionId | string | Unique identifier of the game round transaction. |
| transactionTimestamp | integer | Timestamp of the transaction in milliseconds. |
| currency | string | Currency code of the player. |
Response Parameters
| Name | Type | Description |
|---|---|---|
| balance | decimal | The updated balance of the player. |
Error
If an error occurs while processing a request, the API must return a response with
HTTP Status Code: 400 Bad Request| Name | Type | Description |
|---|---|---|
| error_code | string | Error code describing the specific issue. |
Show Possible Error Codes
Show Possible Error Codes
| Error Code | Description |
|---|---|
| INVALID_PLAYER_ID | The provided player ID is invalid or does not exist in the system. |
| INVALID_PLAYER_CURRENCY | The player’s currency is invalid or mismatched. |
| TECHNICAL_ERROR | An unexpected error occurred. |
| NOT_AUTHORIZED | The request is not authorized due to invalid X-Auth-Token header. |
POST /tournament-prize
Content-Type: application/json
{
"playerId": "123e4567-e89b-12d3-a456-426614174000",
"amount": 1500.00,
"transactionId": "d1c4f1d6-7e35-4e62-84af-ef83b474d8a9",
"transactionTimestamp": 1632771475000
}
{
"balance": 1600.00
}
{
"error_code": "INVALID_PLAYER_ID"
}
⌘I