Betslip

betSlipConfig for sportsbook and OTT on the overlay.

All betting interactivity on embet-overlay goes through betSlipConfig.

Configure it after embet.init (Web) or from onInitialized via configureBetSlip on an EmbetOverlay ref (React Native). On React Native, implement onPlaceBet as an EmbetOverlay prop (embedded sportsbook); omit it when mode is DEEPLINK.

Integration models

ModelModeBehavior
EmbeddedOmit mode or use INTERNALSDK betslip UI in the overlay; your backend validates each bet in onPlaceBet.
Own UIEXTERNALHost app betslip; eventManager for selections; call embet.notifyBetPlaced after placement (same success/error codes as onPlaceBet) — no onPlaceBet.
Deeplinking (OTT)DEEPLINKUser confirms in the SDK UI; the SDK opens the sportsbook deeplink (no onPlaceBet).

Web setup guides: Embedded · Own UI · Deeplinking.

React Native setup guides: Embedded · Own UI · Deeplinking.

betSlipConfig parameters

PropertyTypeRequiredDescription
currencystringYesCurrency symbol or code shown in the betslip (for example €).
currencyDisplay'prefix' | 'suffix'YesWhether currency appears before or after the amount.
decimalSign',' | '.'YesDecimal separator for amounts.
maxAmountnumberNoMaximum stake per bet.
mode'DEEPLINK' | 'INTERNAL' | 'EXTERNAL'NoDeeplink, embedded SDK betslip, or host-owned betslip (see above).
onPlaceBetasync (payload) => resultSportsbookCalled when the user places a bet; return success or an error code. Not used when mode is DEEPLINK.

onPlaceBet payload

The SDK calls your handler after the user confirms stake and taps place bet. UI is locked until the returned promise settles.

PropertyTypeDescription
amountnumberStake the user entered or selected (quick-stake button).
oddsstringOdds for the selected outcome at placement time.
marketIdstringMarket identifier from your odds feed (updateOdds).
outcomeIdstringOutcome identifier within that market.
specifiersstring | nullMarket specifiers when present (for example total_2.5); null for simple markets.
acceptOddsChangesbooleanWhether the user opted in to accept odds changes during placement.

onPlaceBet return value

Resolve the promise only after your sportsbook has accepted or rejected the bet. The SDK maps the result to betslip UI feedback.

ReturnSDK behavior
{ success: true }Shows a short success state, then clears the selection and closes the betslip step.
{ error: 'insufficientFunds' }Shows insufficient funds; user can choose a lower stake.
{ error: 'oddsChanged' }Shows odds changed; user can review updated odds and retry.
{ error: 'betSuspended' }Shows suspension; selection is reset when the message dismisses.
{ error: 'undefined' }Generic failure message; user can try again or pick another outcome.

OTT deeplinks are resolved from market/outcome metadata supplied with Odds (updateOdds). Ensure your CMS/event configuration includes the deeplink fields your sportsbook partner requires.

Own UI: notifyBetPlaced

When mode is EXTERNAL, the SDK does not call onPlaceBet. After your host betslip settles with the sportsbook, call embet.notifyBetPlaced with marketId, outcomeId, stake, and:

  • Success: betResult: 'success'
  • Failure: betResult: 'failed' and error set to the same code you would return from onPlaceBet (insufficientFunds, oddsChanged, betSuspended, or undefined)

See Web — Own UI.

Examples

Sportsbook

embet.betSlipConfig({
  currency: '€',
  currencyDisplay: 'prefix',
  decimalSign: ',',
  maxAmount: 1000,
  onPlaceBet: async (payload) => {
    /*
      Submit the bet to your sportsbook (validate stake, accept or reject);
      only then return success or an error to the SDK.
    */
    return { success: true };
  },
});

OTT

embet.betSlipConfig({
  currency: '€',
  currencyDisplay: 'prefix',
  decimalSign: ',',
  maxAmount: 1000,
  mode: 'DEEPLINK',
});

Related

Platforms