---
title: "Bet Finder – Bet slip integration"
canonical_url: "https://apidocs.sportradar.com/resources/widgets/docs/bet-finder/bet-slip"
markdown_url: "https://apidocs.sportradar.com/resources/widgets/docs/bet-finder/bet-slip.md"
last_updated: "2026-11-19T08:07:07Z"
---

# Bet Finder – Bet slip integration

On **Add to bet slip**, Bet Finder fires one `onAction` with every addable leg of the multi. Treat the list as a single accumulator, not as separate singles. After the action, the widget returns to the setup screen.

After receiving the payload, re-validate availability and take authoritative odds from your platform before accepting the bet. See [Handling Selections and Odds](https://apidocs.sportradar.com/resources/widgets/docs/tutorials/handling-selections-and-odds.md).

## What is dispatched

```javascript
{
  type: 'AddSelectionsToBetSlip',
  data: {
    selections: [
      {
        type: 'uf',
        event: 'sr:match:12345678',
        market: '18',
        specifiers: 'total=2.5',
        outcome: '12',
        odds: { type: 'decimal', value: '2.10' }
      }
      // one object per addable leg
    ],
    markets: [ /* adapter Market objects, same order as selections */ ],
    events:  [ /* adapter Event objects, same order as selections, when available */ ]
  }
}
```

| Field        | Meaning                                                                                                                                                                                        |
| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `selections` | UOF identifiers plus the decimal odds last shown in the widget. `specifiers` is present for line markets (totals, handicaps), `odds` when a price was available. Map these onto your bet slip. |
| `markets`    | The adapter market objects for the same legs, in the same order. Use `externalMetadata` on these if you stored native IDs there.                                                               |
| `events`     | The adapter event objects for the same legs, in the same order. Sent only when the event details of **every** leg were loaded. If any are missing, the field is omitted.                       |

Stake is **not** part of the action. The widget uses stake only to show expected payout; your bet slip applies its own stake.

Legs that cannot be placed (suspended, or with an inactive market or outcome) are **left out**. If any were left out, the widget tells the punter. Legs already on the bet slip (reported through `betSlipSelection`) are not added again.

## Keep the widget in sync

Implement the adapter's `betSlipSelection` endpoint so legs reflect the current bet slip. Store the callback, push `{ selection: … }` whenever the bet slip changes, and return an unsubscribe function.

## Example

```javascript
let betslipCallback;
let betslipState = [];

SIR('registerAdapter', '{ADAPTER_NAME}', {
    config: {},
    endpoints: {
        betSlipSelection: (args, callback) => {
            // Always store the latest callback
            betslipCallback = callback;
            betslipCallback && betslipCallback(undefined, { selection: betslipState });

            // Return an unsubscribe function for cleanup
            return () => {
                betslipCallback = undefined;
            };
        },
        // event and eventMarkets (or market + availableMarketsForEvent), see Bet Finder
    },
});

SIR('addWidget', '#sr-widget', 'betFinder', {
    onAction: (event) => {
        // Only handle bet slip selections
        if (event.type === 'AddSelectionsToBetSlip') {
            // Append new selections to the bet slip
            betslipState.push(...event.data.selections);

            // Notify the widget about the updated bet slip
            betslipCallback && betslipCallback(undefined, {
                selection: betslipState
            });
        }
    },
});
```

**Summary:**

1. **`betSlipSelection`** – The widget subscribes on mount. Call `callback(undefined, { selection })` with the current list and return a cleanup function.
2. **`onAction`** – On `AddSelectionsToBetSlip`, append `event.data.selections` to your bet slip, then notify the stored callback so legs already on the slip stay marked.

For widget properties and adapter endpoints, see [Bet Finder](https://apidocs.sportradar.com/resources/widgets/docs/bet-finder/bet-finder.md). For styling, see [Theming customization](https://apidocs.sportradar.com/resources/widgets/docs/bet-finder/customization.md).
