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
| Model | Mode | Behavior |
|---|---|---|
| Embedded | Omit mode or use INTERNAL | SDK betslip UI in the overlay; your backend validates each bet in onPlaceBet. |
| Own UI | EXTERNAL | Host app betslip; eventManager for selections; call embet.notifyBetPlaced after placement (same success/error codes as onPlaceBet) — no onPlaceBet. |
| Deeplinking (OTT) | DEEPLINK | User 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
betSlipConfig parameters| Property | Type | Required | Description |
|---|---|---|---|
currency | string | Yes | Currency symbol or code shown in the betslip (for example €). |
currencyDisplay | 'prefix' | 'suffix' | Yes | Whether currency appears before or after the amount. |
decimalSign | ',' | '.' | Yes | Decimal separator for amounts. |
maxAmount | number | No | Maximum stake per bet. |
mode | 'DEEPLINK' | 'INTERNAL' | 'EXTERNAL' | No | Deeplink, embedded SDK betslip, or host-owned betslip (see above). |
onPlaceBet | async (payload) => result | Sportsbook | Called when the user places a bet; return success or an error code. Not used when mode is DEEPLINK. |
onPlaceBet payload
onPlaceBet payloadThe SDK calls your handler after the user confirms stake and taps place bet. UI is locked until the returned promise settles.
| Property | Type | Description |
|---|---|---|
amount | number | Stake the user entered or selected (quick-stake button). |
odds | string | Odds for the selected outcome at placement time. |
marketId | string | Market identifier from your odds feed (updateOdds). |
outcomeId | string | Outcome identifier within that market. |
specifiers | string | null | Market specifiers when present (for example total_2.5); null for simple markets. |
acceptOddsChanges | boolean | Whether the user opted in to accept odds changes during placement. |
onPlaceBet return value
onPlaceBet return valueResolve the promise only after your sportsbook has accepted or rejected the bet. The SDK maps the result to betslip UI feedback.
| Return | SDK 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
notifyBetPlacedWhen 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'anderrorset to the same code you would return fromonPlaceBet(insufficientFunds,oddsChanged,betSuspended, orundefined)
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
- Event manager — analytics and supplemental hooks (
outcome_selected, etc.). - Layout and resizing —
resizeConfigfor overlay scaling.
Platforms
- Web — Betslip
- Web — Recipes — embedded, own UI, and deeplink copy-paste examples
- React Native — Betslip
- React Native — Recipes — embedded, own UI, and deeplink copy-paste examples
Updated 25 days ago
