Place Bet
This method is used to place a bet for a player. A successful place bet request should deduct the bet amount from the player’s balance. The player must have sufficient funds to cover the bet amount.
Request
- Path: /placebet
- Retried: No, in case of error rollbackbet request is sent to make sure player’s balance is corrected
| Field | Type | Description |
|---|---|---|
transactionId | string (required) | Unique transaction identifier. The basis of idempotency. |
betId | string (required) | Unique identifier of bet. Can be used to correlate bet with corresponding settlement(s) |
playerId | string (required) | Unique player identifier in Operator’s PAM |
sessionId | string (required) | Unique session identifier. Sent in any subsequent calls |
amount | decimal (required) | Amount (stake) of bet |
currency | string (required) | Currency code of bet amount |
odds | decimal | The odds of the bet. For information purposes only |
betType | enum (required) | Type of bet. Values: SINGLE, MULTIPLE, SYSTEM. For information purposes only |
Example PlaceBet request
POST https://{wallet base url}/placebet HTTP/1.1
Content-Type: application/json
{
"transactionId": "7229be34-8e56-4fe5-a837-71bcd041c46c",
"betId": "3937da17-b20b-4c3b-90ea-817dd74987e5",
"playerId": "2b84aabc-e2cb-4fbc-a038-e2123e0a0311",
"sessionId": "a5fee2a1-45a2-41f2-9e08-f2101bf1592a",
"amount": 200.00,
"currency": "USD",
"odds": 2.00,
"betType": "SINGLE"
} Response
| Field | Type | Description |
|---|---|---|
balance | decimal (required) | Player’s current balance in player’s currency |
currency | string (required) | Currency code for player’s balance |
walletTransactionId | string | Wallet (PAM) transaction reference |
Example PlaceBet response
{
"balance": 100.00,
"currency": "USD",
"walletTransactionId": "c744cd1e-e1c3-4f6d-9905-752ab37a3ddd"
}