Getting started
Before you start you need to retrieve an API authentication X.509 certificate. This certificate will be provided to you by your integration manager from Data.Bet.
Note
Read more info within the Authorization section.
Common integration with the DATA.BET Sportsbook can be described using the next diagram:
Connecting to API
Every request must be fulfilled using the X.509 certificate.
Using cURL request with authorization
1 2 3 4 |
|
1 2 3 |
|
Concepts
The Data.Bet Sportsbook contains various APIs for different purposes, which are categorized by their scope as mandatory and optional. Various APIs require REST client development and a web server to handle callbacks from Data.Bet, such as placed/declined bets, settled/unsettled bets etc.
Mandatory APIs
In order to fully utilize bet processing you need to develop at least next APIs.
Token generation
Every end-user must be uniquely identified in the Data.Bet system. This must be accomplished using our Token API. There is a unique token MUST be generated for every unique user, except "guest" users because they may utilize a common token.
Test your token
There is an easy way to test if your token is working! Just use our spa-example and follow the straightforward steps described there.
Note
Detailed instructions on how to configure the SPA can be found in the SPA section.
After following those steps, you will have an initialized SPA.
Process your bets
We've prepared a simple example of how to develop your own callback server using Node.js to process your bets. Just use our GitHub repository databet-cloud/callback-server-example. It utilizes every type and callback described within Bet Swagger specification page.
Note
Provide your integration manager with the callback server's address and add our IPs to your whitelists.
Perform an additional integrations
Despite the mandatory requirement for bet processing, there are additional integration options available as well: - CashOut - Freebet - Bet Insurance
Test your integration
Perform a simple tests of your integration that includes: - configure the SPA and event handlers for both unauthorized and signed-in users; - place bets on various outcomes; - ensure that every processed callback is idempotent (processed onces). Utilize the request_id property to ensure that the current request hasn't been processed yet. The callback server MUST respond the same manner for repeatable request_id
; - ensure that user's balance changes according to placed and settled bets properly;
Note
You are welcome to request your integration manager to settle or process your bets manually if needed.
Deploy testing environment
Before deploying in a production environment, it is necessary to set up a testing environment for the Data.Bet team to conduct an integration audit.
For this purpose, a test account with a positive balance is necessary.
Once the integration audit is completed, you will receive a list of the steps that have been checked and the results of these tests.
Deploy on production
Once you successfully pass all integration tests, you will be able to deploy your integration in a production environment. The Data.Bet integration manager will configure the production environment on our side and provide you with production credentials and access.