Skip to main content
GitSlotPark calls your /Withdraw endpoint when a player places a bet. Your server must deduct the specified amount from the player’s balance and return the new balance. If the player does not have enough funds, return result 6 and do not process the transaction. You implement this endpoint on your own server.

Endpoint

POST {your_callback_base_url}/Withdraw
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.
amount
string
required
The amount to debit, expressed as a string with exactly 2 decimal places (for example, "12.50").
transactionID
string
required
A unique identifier for this transaction, generated by GitSlotPark. Store this value — you will need it to detect duplicate requests and to process any subsequent rollback.
roundID
string
required
The game round identifier this bet belongs to.
sign
string
required
HMAC-SHA-256 signature computed over agentID + userID + amount + transactionID + roundID (concatenated in that order) using your secret key. Expressed as a 64-character uppercase hex string.

Example request from GitSlotPark

{
  "agentID": "Partner01",
  "userID": "player_12345",
  "amount": "12.50",
  "transactionID": "txn_abc001",
  "roundID": "round_xyz001",
  "sign": "E5F6G7H8..."
}

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 the debit. 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": 87.50,
  "transactionID": "your-internal-ref-001"
}

Example insufficient funds response

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

Example duplicate transaction response

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

Result codes

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

Notes

Callbacks are idempotent. If you receive a Withdraw request with a transactionID you have already processed successfully, return result 11 along with the player’s current balance. Do not deduct the amount a second time.
Check for an existing record of the transactionID before applying any balance change. This protects against network retries delivering the same request more than once.