Skip to main content
Debit
curl --request POST \
  --url https://ss.game-services.work/debit \
  --header 'Authorization: Bearer <token>'
POST /debit
Content-Type: application/json
{
    "playerId": "123e4567-e89b-12d3-a456-426614174000",
    "amount": 20.00,
    "gameUuid": "b23e45a7-9be8-d312-56a4-174000426614",
    "sessionId": "1c4f1d6d-5e37-4a8f-e642-def88a3b4749",
    "promotionExternalId": "promo-session-123",
    "roundId": "nAanFguGKTnLMlaPtIb2MZgnpY-IzB6x94qd5refwyIjGZWJl0mHs00tM2mPHWpvLN7IE3KH6QOR",
    "transactionId": "DER6i2rKbzn6S1qzb38fKBZZ3oehgO0Um7MyYhsFcXSW1kfxw-02_bS4WNzQb0hhBU2NqqkUch-y5KyKv2fdsf4",
    "transactionType": "FREEBET_DEBIT_SPIN",
    "transactionTimestamp": 1632771475000,
    "roundFinished": false,
    "currency": "USD"
}

Documentation Index

Fetch the complete documentation index at: https://docs.game-services.work/llms.txt

Use this file to discover all available pages before exploring further.

POST /debit
This operation is idempotent.

Headers

NameTypeDescription
X-Auth-TokenstringCustom authentication header in the format X-Auth-Token: your_token_here. This token is required to authorize API requests.

Request Parameters

NameTypeDescription
playerIdstringUnique identifier of the player.
amountdecimalAmount to debit.
gameUuidstringUnique identifier of the game.
sessionIdstringUnique identifier of the player session.
promotionExternalIdstringExternal identifier of the promotion session. This field must be sent for promo or free bet requests and omitted for regular game requests.
roundIdstringUnique identifier of the game round.
transactionIdstringUnique identifier of the game round transaction.
transactionTypestringType of transaction, e.g., ‘DEBIT_SPIN’.
transactionTimestampintegerTimestamp of the transaction in milliseconds.
roundFinishedbooleanFlag indicating finish of the round.
currencystringCurrency code of the player.
Transaction Types: Enum representing the type of transaction.
  • DEBIT_SPIN: A regular spin-based transaction.
  • DEBIT_JACKPOT: A transaction where the player receives a jackpot payout.
  • FREEBET_DEBIT_SPIN: A free bet spin transaction.

Response Parameters

NameTypeDescription
balancedecimalThe 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
NameTypeDescription
error_codestringError code describing the specific issue.

Responsibility of the wallet platform
The wallet platform must verify that the incoming playerId and roundId correspond to a previously placed wager. If this validation fails, the debit request must be refused. If promotionExternalId is present, the wallet platform must validate that it belongs to the active promotion session for the player and use it as the promo wallet context. If the roundFinished has been marked as true, the platform must close the round, ensuring that no new Credit, Debit or Rollback operations can be performed on it.
POST /debit
Content-Type: application/json
{
    "playerId": "123e4567-e89b-12d3-a456-426614174000",
    "amount": 20.00,
    "gameUuid": "b23e45a7-9be8-d312-56a4-174000426614",
    "sessionId": "1c4f1d6d-5e37-4a8f-e642-def88a3b4749",
    "promotionExternalId": "promo-session-123",
    "roundId": "nAanFguGKTnLMlaPtIb2MZgnpY-IzB6x94qd5refwyIjGZWJl0mHs00tM2mPHWpvLN7IE3KH6QOR",
    "transactionId": "DER6i2rKbzn6S1qzb38fKBZZ3oehgO0Um7MyYhsFcXSW1kfxw-02_bS4WNzQb0hhBU2NqqkUch-y5KyKv2fdsf4",
    "transactionType": "FREEBET_DEBIT_SPIN",
    "transactionTimestamp": 1632771475000,
    "roundFinished": false,
    "currency": "USD"
}