Place Bet
POST https://{PARTNER_API_URL}/payment/bet with type: 1
This request is performed every time a user tries to place a bet. When you receive this request, you should perform the following actions on your side:
- Check Method & Type: Verify that the method is
POSTand the fieldtype === 1. - Verify Signature: Ensure the request comes from our server by verifying the request signature.
- Verify Token: Confirm the user session is still valid.
- Balance Check: Check whether the user has enough funds and can place a bet with the corresponding
amountandcurrency. - Debit Balance: If all checks pass, debit the bet
amountfrom the user's balance. - Respond: Inform our system about the operation results.
#Insufficient funds and other errors
If during user balance check appears that the user is out of funds, you should respond with HTTP status code 400 and the following JSON body:
{
"code": 7,
"message": "Not enough money"
}
Request Example
{
"token": "5caa4cabce523c2f7610c50ce9819bfb",
"transactionId": "b26153f9-ef3a-4768-b6c8-0861acdecb7a",
"currency": "USD",
"amount": 12.12,
"userId": "1999",
"info": "bet info",
"type": 1,
"coefficient": 1.2,
"ip": "35.168.110.10",
"subPartnerId": null,
"requestId": "d9195aef-9492-43dd-88d0-dc1732a37f4e",
"bonusId": null,
"bonusTemplateId": null,
"bonusAmount": null,
"gameType": "sportsbook",
"ticketType": "single",
"boosterCoefficient": 1,
"metadata": [
{
"disciplineId": "fifa",
"discipline": "Fifa",
"tournamentId": "3971",
"tournament": "Championship of League",
"tournamentRegionCode": "GB",
"eventId": "5663102",
"event": "Club Black and Club White",
"eventDate": "2021-03-05 11:08:00",
"marketId": "5fa4e904d043dea8811a5f98",
"market": "Match Winner",
"outcomeId": "111",
"outcome": "Club Black",
"coefficient": 1.2,
"stage": 1
}
]
}
The table below describes common parameters for Place bet, Settle, Unsettle, Rollback requests:
| Parameter | Type | Validation | Description |
|---|---|---|---|
| requestId | uuid | - | A unique identifier to uniquely identify one particular request sent by our system. Useful for troubleshooting. |
| type | number | 1 | 2 | 3 | Transaction type: 1 — Place bet (POST) or Unsettle (PUT) 2 — Settle (PUT) 3 — Rollback (PUT) |
| transactionId | uuid | - | A unique identifier of the placed bet. Used to notify about bet result (win, lost, etc) changes in future. |
| token | string | 10-64 | Session token generated for each user session to identify and authorize user on backend. |
| userId | string | - | Unique User Identifier on the Partner's platform. |
| amount | float | - | Amount with a dot separator. Corresponds to bet, payout, or return amount depending on the request type. |
| currency | string | ISO 4217 | The currency used for the transaction (e.g., EUR, USD, MKD). |
| coefficient | float | - | Bet (payout) coefficient for the whole transaction. For express bets: k1 * k2 * kN. |
| gameType | enum | - | Used to distinguish game types: 'sportsbook' or 'turbogames'. |
| bonusId | int | null | - | Freebet bonus identifier. |
| bonusTemplateId | int | null | - | Freebet template of bonus identifier. |
| ticketType | enum | - | Ticket type: 'single' or 'express'. |
| boosterCoefficient | float | - | Express odds multiplier. |
The following parameters are specific only for Place bet requests:
| Parameter | Type | Validation | Description |
|---|---|---|---|
| ip | string | IP Address | User’s IP address at the time the bet was placed. |
| info | string | - | Optional information about the bet (discipline, event, market, etc.). |
| subPartnerId | string | null | - | Useful for running multiple sites under one Partner key. Distinguishes the source of the bet. |
| metadata | object[] | - | Optional metadata fields that can be supplemented with additional data. |
| bonusAmount | float | null | - | Freebet bonus amount, if applicable. |
Response examples
{
"transactionId": "b26153f9-ef3a-4768-b6c8-0861acdecb7a",
"transactionTime": "2020-01-16T12:07:23.596Z"
}
The table below describes the response:
| Parameter | Type | Validation | Description |
|---|---|---|---|
| transactionId | string | 10-36 | A unique identifier for the bet. |
| transactionTime | datetime | ISO 8601 | Transaction UTC time in ISO 8601 format. |