Skip to main content
GitSlotPark calls your /BetWin endpoint for game types where the bet and win outcome are determined at the same moment — for example, instant-win games. Your server must deduct betAmount and credit winAmount in a single atomic operation, then return the resulting balance. If winAmount is "0.00", the player lost the bet entirely. You implement this endpoint on your own server.

Endpoint

POST {your_callback_base_url}/BetWin
Replace {your_callback_base_url} with the HTTPS base URL you registered with GitSlotPark (for example, https://casino.com/WalletService).
Your endpoint must be served over HTTPS and must always return HTTP 200. Use the result field in the JSON body to communicate success or failure.

Request parameters

GitSlotPark sends the following JSON body to your endpoint.
agentID
string
required
Your Partner ID assigned by GitSlotPark.
userID
string
required
The player’s ID in your system.
betAmount
string
required
The amount wagered, expressed as a string with exactly 2 decimal places (for example, "10.00").
winAmount
string
required
The amount won, expressed as a string with exactly 2 decimal places. Use "0.00" when the player lost the bet entirely.
transactionID
string
required
A unique identifier for this transaction, generated by GitSlotPark. Store this value so you can detect duplicate requests and handle any subsequent rollback.
roundID
string
required
The game round identifier this transaction belongs to.
sign
string
required
HMAC-SHA-256 signature computed over agentID + userID + betAmount + winAmount + transactionID + roundID (concatenated in that order) using your secret key. Expressed as a 64-character uppercase hex string.

Example request from GitSlotPark (player bets 10.00, wins 5.00)

{
  "agentID": "Partner01",
  "userID": "player_12345",
  "betAmount": "10.00",
  "winAmount": "5.00",
  "transactionID": "txn_bw003",
  "roundID": "round_xyz002",
  "sign": "M3N4O5P6..."
}

Response fields

Your server must respond with Content-Type: application/json and HTTP 200.
result
integer
required
Result code. Use 0 for success, 6 for insufficient funds, or 11 for a duplicate transaction. See result codes below.
balance
number
The player’s balance after both the debit and credit have been applied. Required when result is 0 or 11.
transactionID
string
Your internal transaction reference. Optional — include it if you want to correlate GitSlotPark transactions with your own records.

Example success response

{
  "result": 0,
  "balance": 95.00,
  "transactionID": "your-internal-ref-003"
}

Example insufficient funds response

{
  "result": 6,
  "message": "Insufficient funds"
}

Example duplicate transaction response

{
  "result": 11,
  "balance": 95.00
}

Result codes

CodeMeaning
0Success
1General error
3Invalid sign
5User not found
6Insufficient funds
11Duplicate transaction

Notes

Check for insufficient funds before applying any balance change. If betAmount exceeds the player’s current balance, return result 6 and do not modify the balance.
A winAmount of "0.00" is valid and means the player lost. The net effect on the player’s balance is always winAmount - betAmount.
Callbacks are idempotent. If you receive a BetWin request with a transactionID you have already processed successfully, return result 11 along with the player’s current balance. Do not apply the transaction again.