---
title: "Overview"
canonical_url: "https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/overview"
markdown_url: "https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/overview.md"
last_updated: "2026-10-22T13:00:29Z"
---

# Overview

Custom Bet has **one recommended** integration path and **two deprecated** legacy paths. All paths share the same widget UI and theming; they differ in how offering and calculation data reach the widget.

**New integrations:** use [Stock Provider](https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/stock.md) (`dataProvider: 'stock'`).

**Existing integrations only:** [UOF Proxy](https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/uof-proxy.md) (`dataProvider: 'uofProxy'`) and [Data Adapter](https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/data-adapter.md) (`dataProvider: 'custom'`) remain documented for maintenance and migration.

### 1. Stock Provider (recommended)

The stock provider loads offering and calculation from Sportradar and applies match and market translations like other widgets. You supply a **`jwt`** and implement **`addToBetSlip`** only — no UOF proxy callbacks.

- **Smaller surface area:** No `getAvailableMarkets`, `calculate`, or other UOF forwarding functions in your page.

- **Requirements:** Custom bet must be enabled for your bookmaker; a backend-issued `jwt` with your public key published for JWT validation — see [JWT authentication](https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/jwt.md).

For setup, examples, and troubleshooting, see the [Stock Provider documentation](https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/stock.md).

### 2. UOF Proxy (Deprecated)

**Deprecated.** `dataProvider: 'uofProxy'` forwards Unified Odds Feed (UOF) custom bet API responses from your proxy without modification. It remains documented for existing integrations only. To move to stock, see [Migrating from UOF Proxy to Stock](https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/migrate-uof-proxy-to-stock.md).

- **Simplicity:** Responses from the UOF are passed through without modification; the widget handles XML validation and parsing.

- **Optimization:** The widget manages caching and request volume toward your proxy.

- **Considerations:** Market offering follows UOF custom bet rules, and you may need a proxy server on your side to serve front-end requests.

For legacy setup details, see the [UOF Proxy documentation](https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/uof-proxy.md).

### 3. Data Adapter (Deprecated)

**Deprecated.** `dataProvider: 'custom'` lets you supply offering and calculation through `getOffering` and `calculate` callbacks with full control over data shape and custom views. It remains documented for existing integrations only.

- **Flexibility:** You control how data is fetched, transformed, and presented, including custom market layouts via the [Custom Views](https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/custom-views/overview.md) tutorials.

- **Responsibility:** You must return data that conforms to the Data Adapter schemas documented on the [Data Adapter](https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/data-adapter.md) page.

- **Not for new work:** New Custom Bet integrations should use Stock Provider instead of building or extending a Data Adapter integration.

For legacy API types and examples, see [Data Adapter](https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/data-adapter.md). For custom view layouts on existing Data Adapter integrations, see [Creating Custom Views](https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/custom-views/overview.md).

## Type Definitions

### AddToBetSlipHandleResult

Object to be passed into [addToBetSlip](#addtobetslip)

| Name        | Type      | Required | Description                                                              |
| ----------- | --------- | -------- | ------------------------------------------------------------------------ |
| `succeeded` | `boolean` | **Yes**  | True if outcomes were successfully validated and added to bet slip.      |
| `reason`    | `string`  | No       | Reason for failed action, if present it will be displayed in the widget. |

### CBError

Error object used to display the correct error state in the widget.

| Name      | Type     | Description                                                                                                                                                                                                                             |
| --------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `type`    | `number` | Error type:<br>• `1` - General: Blocks all actions except removing outcomes from bet slip in custom bet widget.<br>• `2` - BetStop: Blocks all actions in custom bet widget.<br>• `3` - Calculation: Blocks adding outcomes to bet slip |
| `message` | `string` | Text that will be displayed for error, localization required.                                                                                                                                                                           |

#### Example

```javascript
callback({ type: 1, message: "Something went wrong" });
```

### CalculateArgs

Arguments passed to the `calculate` function.

| Name               | Type                                | Description                                                                                                                                    |
| ------------------ | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `matchId`          | `string`                            | Sportradar match ID. See [Getting Identifiers](https://docs.sportradar.com/resources/widgets/docs/tutorials/getting-identifiers.md#sports-api) |
| `selectedOutcomes` | [`UniqueOutcome[]`](#uniqueoutcome) | Array of all the selected outcomes in the widget.                                                                                              |

### MatchArgs

| Name      | Type     | Description                                                                                                                                    |
| --------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `matchId` | `string` | Sportradar match ID. See [Getting Identifiers](https://docs.sportradar.com/resources/widgets/docs/tutorials/getting-identifiers.md#sports-api) |

### SRMarket

| Name         | Type     | Required | Description                                            |
| ------------ | -------- | -------- | ------------------------------------------------------ |
| `id`         | `string` | **Yes**  | Sportradar market ID.                                  |
| `specifiers` | `string` | No       | For markets that have same id but different specficer. |

### Status

| Name       | Type      | Required | Description |
| ---------- | --------- | -------- | ----------- |
| `isActive` | `boolean` | **Yes**  |             |

```javascript
{
  isActive: false;
}
```

### TeamArgs

| Name     | Type     | Description |
| -------- | -------- | ----------- |
| `teamId` | `string` |             |

### UniqueOutcome

Represents a single selected outcome in the widget.

| Property    | Type                    | Required | Description                                                                                                                                    |
| ----------- | ----------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `matchId`   | `string`                | **Yes**  | Sportradar match ID. See [Getting Identifiers](https://docs.sportradar.com/resources/widgets/docs/tutorials/getting-identifiers.md#sports-api) |
| `marketId`  | `number` \| `string`    | **Yes**  | Market identifier                                                                                                                              |
| `outcomeId` | `number` \| `string`    | **Yes**  | Outcome identifier                                                                                                                             |
| `srMarket`  | [`SRMarket`](#srmarket) | No       | Sportradar market reference                                                                                                                    |
| `srOutcome` | `string`                | No       | Sportradar outcome identifier                                                                                                                  |

#### Methods: {#uniqueoutcome-methods}

| Method         | Parameters                        | Returns   | Description                                                                            |
| -------------- | --------------------------------- | --------- | -------------------------------------------------------------------------------------- |
| `equals`       | [`UniqueOutcome`](#uniqueoutcome) | `boolean` | Returns `true` if the outcome is equal to the given `UniqueOutcome`.                   |
| `isSameMarket` | [`UniqueOutcome`](#uniqueoutcome) | `boolean` | Returns `true` if the outcome belongs to the same market as the given `UniqueOutcome`  |
| `getSelection` | —                                 | `string`  | Returns XML string representation of the outcome as needed by UOF calculation endpoint |
| `toString`     | —                                 | `string`  | Returns string representation of the outcome                                           |

**Example:**

```javascript
{
  matchId: "22223333",
  marketId: "oneXtwo",
  outcomeId: "x",
  srMarket: { id: "1" },
  srOutcome: "1"
}
```

## Methods

### addToBetSlip

This function is called when the user clicks "Add to bet slip" button. Here you receive selected outcomes and validate them before adding them to your bet slip or reject them.

For the shared selection flow — snapshot odds in `displayedOdds`, re-pricing, validation at add and at placement, and returning localized rejection reasons — see [Handling Selections and Odds](https://docs.sportradar.com/resources/widgets/docs/tutorials/handling-selections-and-odds.md).

#### Parameters:

| Name                    | Type                                                                 | Required | Description                                                                                                                               |
| ----------------------- | -------------------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `args`                  | `Object`                                                             | **Yes**  | Object with data.                                                                                                                         |
| `args.matchId`          | `string`                                                             | **Yes**  | Match id of match that outcomes belong to.                                                                                                |
| `args.selectedOutcomes` | [`UniqueOutcome[]`](#uniqueoutcome)                                  | **Yes**  | Array of outcomes that were selected in the widget.                                                                                       |
| `args.displayedOdds`    | `string`                                                             | No       | Snapshot of odds returned by last calculation, CAUTION: ODDS ARE NOT UP TO DATE                                                           |
| `callback`              | [`AddToBetSlipHandleResult`](#addtobetsliphandleresult) \| `boolean` | **Yes**  | To accept or reject call this function. If data is not received in time set by addToBetslipTimeoutMs widget prop or by defalt in 10000ms. |

#### Example:

Upon succesfull validation your call callback parameter and pass in [AddToBetSlipHandleResult](#addtobetsliphandleresult) object.

```javascript
function betslipCallback(args, callback) {
  if (validation(args) is succesfull) {
    callback({
      succeeded: true
    })
  } else {
    callback({
      succeeded: false,
      reason: 'Reason why it failed'
    })
  }
}
```
