B2B API
Интеграция B2B-компании (оператора) с агрегатором
Исходная документация: https://transaction.uat.agg.bet/b2b-swagger/docs
Описание
Interaction between the B2B Company (client) platform (site) and the aggregator is carried out through the REST API. Each request endpoint accepts a call with JSON-encoded data fields.
To start interaction with aggregator API the following is necessary:
- To receive b2b_company_id - a unique identifier of your company in the aggregator system, if your company has several platforms (sites) you need to create a B2B company in the aggregator system and get ids for each one
- Generate API Key for each your platform (site) in aggregator system (you can log in to the aggregator system as a user and generate an API Keys or ask the aggregator employee) and save their values
- Generate JWT Bearer token for each your platform (site) using saved API Key value and claims and sha256 hash function. Bearer token will be used for authorization
- Receive - server base url to send requests to aggregator API
- Provide - platform urls (for Bet/Win/Jackpot, Refund, Balance requests) where aggregator sends requests must be specified in aggregator system
Разделы
General incoming requests 10
Запросы от B2B-компании к агрегатору.
| POST | /api/v1/b2b/tokenGenerate JWT token |
| GET | /api/v1/b2b/game/listGet game list |
| POST | /api/v1/b2b/start/gameStart game request |
| POST | /api/v1/b2b/start/game/demoStart demo game request |
| POST | /api/v1/b2b/bonuses/bet-rangesList Of Available Bets |
| POST | /api/v1/b2b/bonuses/campaignCreate bonus campaign request |
| POST | /api/v1/b2b/bonuses/remove-campaignDelete bonus campaign |
| POST | /api/v1/b2b/bonuses/get-campaignsList of bonus campaigns |
| POST | /api/v1/b2b/reports/transactionTotal amount of player transactions |
| GET | /api/v1/b2b/bonuses/jackpot_infoJackpot Information |
Seamless 9
При HTTP 200 результат операции передаётся в полях error_code и error_message.
| Код | error_message (значение API) | Описание | Доступные запросы |
|---|---|---|---|
| 0 | success | Успешная обработка | bet / win / jackpot / refund |
| 1 | insufficient funds | Недостаточно средств | bet / win / jackpot |
| 2 | player blocked / player not found | Игрок заблокирован или не найден | bet / win / jackpot / refund |
| 3 | hash mismatch | Хэш запроса не совпадает | bet / win / jackpot / refund |
| 4 | transaction not found | Транзакция не найдена | refund |
| 5 | invalid amount | Недопустимая сумма | bet / win / jackpot / refund |
| 6 | invalid transaction | Недопустимая транзакция | refund |
| 9 | invalid argument | Неверный аргумент запроса | bet / win / jackpot / refund / balance |
| POST | /<path-for-bet-win>Bet/Win/Jackpot/Reserve transaction for player |
| POST | /<path-for-bet-and-win-transaction>Bet/win transaction for player in one request |
| POST | /<path-for-refund>Refund transaction for player |
| POST | /<path-for-refund-array>Refund transaction array for player |
| POST | /<path-for-balance>Balance request |
| POST | /<path-for-free-bonus>FreeBonus request |
| POST | /<path-for-cancel-commit-reserve>CancelReserve/CommitReserve transaction for player |
| POST | /<path-for-finish-round-request>Finish round for player |
| POST | /<path-for-force-withdraw-request>Forced withdraw |
Transfer 3
| HTTP-статус | error (значение API) | Описание |
|---|---|---|
| 200 | invalid argument | Неверный аргумент запроса |
| 200 | invalid session | Недействительная или завершённая сессия |
| 200 | invalid transaction | Недопустимая транзакция |
| 200 | invalid amount | Недопустимая сумма |
| 200 | unknown error | Неизвестная ошибка |
| 200 | insufficient funds | Недостаточно средств |
| 200 | player not found | Игрок не найден |
| 200 | player blocked | Игрок заблокирован |
| 400 | validation errors | Ошибка проверки данных; точный текст зависит от ошибки |
| 401 | unauthorized | Ошибка авторизации |
| 500 | internal error | Внутренняя ошибка сервера |
| POST | /api/v1/b2b/depositDeposit |
| POST | /api/v1/b2b/withdrawWithdraw |
| POST | /api/v1/b2b/transfer-balanceTransfer balance |
Данные для интеграции Winfinity B2B
Адреса для запросов:
Staging: https://transaction.uat.agg.bet
Prod: https://transaction.agg.bet
IP-адреса для whitelist. IPv6 добавьте, если он поддерживается вашей инфраструктурой.
| Среда | IP-адреса для whitelist |
|---|---|
| Prod | 47.254.172.119/32, 49.12.37.133/32, 8.209.78.65/32, 18.195.157.145/32, 2a05:d014:508:b200:1e0e:3893:268f:ac2/128 (IPv6) |
| Stage | 49.12.37.133/32, 8.209.78.65, 8.209.81.33/32, 47.254.156.83/32, 51.250.90.72, 158.160.105.68, 178.154.201.128, 18.195.157.145/32, 63.179.169.166/32, 18.159.136.207/32, 2a05:d014:508:b200:1e0e:3893:268f:ac2/128 (IPv6) |
Срок действия JWT-токена: примерно 2 часа.