Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The customer must have a listener to receive the events that the Multibet Widget will send when the player sends his bet in the Add to betslip action.Given that the iframe from Genius Sports you integrated with has the ID ‘betgenius-iframe’, you need to add the following code to listen to selections being clicked

The following is an example of the structure of these events:

Code Block
Code Block
language
xml
<script>
    var iframeApi = new IFrameApi("betgenius-iframe");
    iframeApi.onMessage = function(message) {
      window.MESSAGES.push(message);
      switch (message["command"]) {
        case "addToBetslip":
          console.log(message["selection"]);
          break;
        }
    };
</script>

The selection ID being added is present in the property.

Code Block
message[“selection”]

With Multibet widget the message contract is extended to include the following elements:

json
{
    "command": "addToBetslip",
    "sportsbookFixtureId": "56789",
    "marketId": "100120022",
    "sportsbookMarketId": "1234567",
    "sportsbookMarketContext": "ABCDE",
    "decimalPrice": "1.66"
}

...

  • sportsbookFixtureId - customer fixture ID

  • marketId - Genius Sports market ID

  • sportsbookMarketId - customer market ID

  • sportsbookMarketContext - customer market context. This field will be populated only if customer provided it in UpdategramResponse

  • decimalPrice - the price that was displayed in the Multibet widget when punter pressed "Add to betslip" button. This value should NOT be used for bet acceptance

...

Customer-Based API Authentication Method

To be able to get a response from Multibet widget, Genius SSM AWS must have configured per customer: client_id, client_secret and api-key to be able to get response from Multibet widget

  • creation secrets path: /fep-platform/widgets/multibet/[clientName]

  • secret structure :

...

  • {

...

  • "x_api_key":

...

  • "[client_x_api_key]",

...

  • "client_id":

...

  • "[client_id]",

...

  • "client_secret":

...

  • "[client_secret]"

...

  • }

Multibet Widget Customization

Customer Customers can easily customize the look of the Multibet Widget. More details are available on Widget Customization

...