Skip to main content
curl --request POST \
  --url 'https://partner-platform-url/transaction/payout' \
   --header 'content-type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --header 'x-signature: <x-signature>' \
  --header 'x-timestamp: <x-timestamp>' \
  --data '{
    "transactionId": "be41ea4b-8131-4e35-87cb-5a3b99a88469",
    "refTransactionId": "1db4fac5-34b2-4b81-a101-c105979633e0",
    "sessionId": "f1dfc865-584c-4cba-a175-06172b2a41141731504451691",
    "playerId": "18865671",
    "gameId": "G1720767064793",
    "currency": "EUR",
    "amount": 10000000,
    "isWin": true
}
{
  "status": "RS_OK",
  "transactionId": "be41ea4b-8131-4e35-87cb-5a3b99a88469",
  "balance": 510000000
}
  POST  /transaction/payout

Functionality

The endpoint called when the player wins (credit)
  • The Operator is expected to increase player’s balance by payout and return a new balance.
  • Each win has transactionId which is unique for each transaction. Before any altering of player’s balance, Operator has to check that win wasn’t processed before.
  • If the bet payout fails, the system will automatically retry up to 3 times. If all retries fails, a revert operation will be triggered for that bet to ensure consistency.
Finally, it returns the updated balance, reflecting the result of the win.

Headers

x-api-key
string
required
A unique identifier associated with operator calling API.
x-signature
string
required
A SHA256 HMAC signature generated using the request body and timestamp. Format: HMAC_SHA256(JSON.stringify(data) + ’|’ + timestamp), signed using the provided secret key.
x-timestamp
string
required
An Unix timestamp (milliseconds) when the request was sent. Ensure the same value is used in signature generation.
content-type
string
required
Must be set to application/json

Request Body

transactionId
string
required
The unique transaction identifier. An action with same transactionId shouldn’t be processed more than once.
refTransactionId
string
required
Unique identifier of the transaction that this transaction is referencing, which is the transactionId of the bet.
sessionId
string
required
A unique identifier for the session.
playerId
string
required
The unique identifier for the player.
gameId
string
required
The unique identifier for the game.
currency
string
required
Player’s current session currency code.
amount
number
required
The amount won by the player.
To maintain precision and avoid floating-point errors, the amount field is processed as an integer value by multiplying the actual amount by 100000.For example, a amount of 12.34567 will be represented as 1234567 in the API.
isWin
boolean
required
Indicates whether the player won the bet.

Response

status
string
required
Code indicates status of the request weather it is succeed or failed. We have listed error codes here
transactionId
string
required
An ID of an action that is generated for each of our calls to the Operator, used to sync OppiGame and Operator sides for debugging purposes. The Operator has to respond with the same transactionId as the one received in request.
balance
number
required
The updated balance of the player.
To maintain precision and avoid floating-point errors, the balance field is processed as an integer value by multiplying the actual amount by 100000.For example, a balance of 12.34567 will be represented as 1234567 in the API.
curl --request POST \
  --url 'https://partner-platform-url/transaction/payout' \
   --header 'content-type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --header 'x-signature: <x-signature>' \
  --header 'x-timestamp: <x-timestamp>' \
  --data '{
    "transactionId": "be41ea4b-8131-4e35-87cb-5a3b99a88469",
    "refTransactionId": "1db4fac5-34b2-4b81-a101-c105979633e0",
    "sessionId": "f1dfc865-584c-4cba-a175-06172b2a41141731504451691",
    "playerId": "18865671",
    "gameId": "G1720767064793",
    "currency": "EUR",
    "amount": 10000000,
    "isWin": true
}
{
  "status": "RS_OK",
  "transactionId": "be41ea4b-8131-4e35-87cb-5a3b99a88469",
  "balance": 510000000
}