Skip to content

Seamless wallet

The idea of a seamless-wallet approach

  • operators platform and Sportsbook iFrame provider use only operators' wallet
  • operator's clients place a bet using the money that are present on the operators' wallet
  • all the betting transactions are performing on the operators' wallet

Integration schema

%%{init: {'theme': 'base', 'themeVariables': {'lineColor': '#B0B0FF', 'arrowheadColor': '#B0B0FF'}} }%%
graph LR
    subgraph Operator["Operator's Platform"]
        OpFE["Operator FE"]
        OpBE["Operator BE"]
        Wallet[("Operator's Wallet")]
        OpFE <--> OpBE
        OpBE <--> Wallet
    end

    subgraph Sportsbook["Sportsbook Provider"]
        SbFE["Sportsbook iFrame"]
        SbBE["Sportsbook BE"]
        SbFE <--> SbBE
    end

    OpFE -- "renders" --> SbFE
    SbBE -- "/get-user-balance 
    /perform-transaction 
    /get-transaction-by-id" --> OpBE

User-flow

%%{init: {'theme': 'base', 'themeVariables': {'lineColor': '#B0B0FF', 'arrowheadColor': '#B0B0FF', 'signalColor': '#B0B0FF'}} }%%
sequenceDiagram
    actor User
    participant OpFE as Operator FE
    participant OpBE as Operator BE
    participant SbFE as Sportsbook iFrame
    participant SbBE as Sportsbook BE

    rect rgb(230, 240, 255)
    Note over User, SbBE: 1. Login
    User->>OpFE: Enter credentials
    OpFE->>OpBE: 1.1 login-request
    OpBE-->>OpFE: Platform auth token
    end

    rect rgb(230, 255, 230)
    Note over User, SbBE: 2. Go to Sportsbook page
    User->>OpFE: Navigate to Sportsbook page
    OpFE->>OpBE: 2.1 /get-integration-jwt-token
    OpBE-->>OpFE: JWT token
    OpFE->>SbFE: 2.2 Render iFrame with JWT
    SbFE->>SbBE: 2.3 /verify-token
    SbBE->>OpBE: 2.4 /get-decription-key
    OpBE-->>SbBE: Public key
    SbBE->>SbBE: 2.5 JWT validation & user account creation
    SbBE-->>SbFE: iFrame auth token
    end

    rect rgb(255, 240, 230)
    Note over User, SbBE: 3. Place bet
    User->>SbFE: Place a bet
    SbFE->>SbBE: 3.1 /place-bet-request
    SbBE->>SbBE: 3.2 Processing & risk management
    SbBE->>OpBE: 3.3 /perform-transaction (debit)
    OpBE-->>SbBE: Transaction result
    SbBE-->>SbFE: Bet confirmation
    SbFE-->>User: Bet placed
    end

User-flow description

  1. login - when the operator's user enters the operator's platform, he enters the form and tries to log in to the platform.

    1.1 login-request - the operator's platform FE sends a login request to the operator's platform BE for credentials validation when the operator's user is trying to log in to the platform. Request returns platform auth token.

  2. go-to-sportsbook-page - user goes to the operator's platform page with integrated Sportsbook iFrame.

    2.1 /get-integration-jwt-token - operators platform FE requests operators platform BE for the jwt-token which will be used for iFrame initialization. Note that iFrame can work with jwt-token for unauthorized users.

    2.2 {iframe-host}/{lang}/?jwt={jwt-token} - operators platform FE renders Sportsbook iFrame.

    2.3 /verify-token - Sportsbook iFrame sends a request to the Sportsbook BE for jwt-token validation on its init.

    2.4 /get-decription-key - Sportsbook BE requests operators BE for the public key which will be used for jwt-token validation.

    2.5 JWT token validation - after jwt-token validation Sportsbook BE will use encrypted information for the creation of a simplified user account in the Sportsbook BE system and will respond with the Sportsbook iFrame auth token, which will guarantee user authentification in Sportsbook iFrame.

  3. place-bet - the operator's user tries to place a bet.

    3.1 /place-bet-request - Sportsbook iFrame is sending a request to the Sportsbook BE.

    3.2 processing - Sportsbook BE is validating and processing a bet due to the different risk management settings.

    3.3 /perform-transaction - in case of successful bet processing Sportsbook BE will send a transaction to the operator's platform BE for user cash debit.

Integration

The client must implement the next endpoints on the side of their platform to guarantee the correct work of a seamless wallet mechanism:

  • get-user-balance
  • perform-transaction
  • get-transaction-by-id

Request signature

Signing requests is optional and is disabled by default. More information can be found here