Skip to main content

Win

When there is a game result provider will call /win in order to commit win transaction.

Request Example

POST /win HTTP/1.1
Content-Type: application/json
https://stg.otkgaming.com/win
{
"externalToken" : "valid-session-token",
"playerId" : "abc123456",
"gameId" : "123",
"transactionId" : "124677",
"amount" : 10,
"currency" : "EUR"
}

Important

Normally we expect every round to be finalized with win transaction. So in case game round is finished and result is failed, Provider will request again to commit the transaction in order to close the round.

Property NameDescriptioTypeNotes
externalTokenplayer’s session tokenstring(255)value passed upon game launch as query parameter
playerIdunique player identifierstring(100)unique per platform
gameIdgame identifier on game provider sidestring(255)game id where bet was placed(same as was passed during product launch)
transactionIdgame transaction idstring(255)unique transaction id on game provider’s side
amounttransaction amount to processdecimalamount of transaction in currency
currencycurrency of transactionstring(3)currency of transaction

Response Example

https://stg.otkgaming.com/win
{
"transactionId" : "abc123",
"externalTrxId" : "abc123",
"balance" : 9000
}

Property NameDescriptioTypeNotes
transactionIdgame provider’s transaction idstring(255)same as passed to request
externalTrxIdcommitted transaction id on Platform sidestring(255)transaction id on Platform side
balanceplayer’s remaining balancenumberin minor units(mostly cents)