The short version
- Your front end opens BetGlider with a launch link that your platform creates for the logged-in player. On the web it goes in a frame; in a native app, in a WebView.
- BetGlider brings the races and prices and checks every bet. It then asks your platform to accept the bet, and shows the player the bet once your platform has settled it.
- Your platform keeps what it already owns: the player's account, balance and bets. It results and settles the bets with its own engine, and sends BetGlider each settled bet. It answers a handful of requests from BetGlider.
Two-Up builds the connection to your existing API. There is no BetGlider-specific API for you to build, as long as yours offers the capabilities in section 4. The one thing your platform sends to BetGlider is each bet once it is settled.
What we'd like from you
Ticks are saved in this browser only.
Which races show BetGlider
BetGlider is available on the races its racing feed covers in-running. BetGlider's trading team can suspend or hide any race, racecourse or meeting.
Your site needs to know which races to show BetGlider on, and which id to put in the launch link. We agree one of two approaches during setup:
- BetGlider's ids. Two-Up gives you a list of available races with BetGlider's race ids, and you launch with those. Bets then carry BetGlider's ids. This is the simpler option for you.
- Your ids. BetGlider matches its races to your events, from a race catalogue that your API provides. Bets then carry your ids. Matching works best on a shared key, such as the Press Association race id. Otherwise it relies on racecourse name, start time and runner names.
Both need set-up work on Two-Up's side, which is part of building your connection.
Launching and showing BetGlider
The launch link
When a player opens BetGlider on a race, your backend issues a one-time token for that player, and your site builds the launch link:
https://<betglider-host>/<launch path>/<race id>?ott=<one-time token>[&hideArrow=true][&hideLogo=true]The exact path is confirmed during setup; the link keeps this shape.
| Part | Meaning |
|---|---|
<race id> | The race to open, as agreed in section 2 |
ott | The one-time token. BetGlider redeems it once, as soon as it loads. |
hideArrow=true | Optional. Hides BetGlider's back arrow, for when you show your own close button. |
hideLogo=true | Optional. Hides the logo in BetGlider's header. |
- It works best to create the link just before you show BetGlider. The token should work once and only briefly, for about a minute.
- The launch link needs a valid token. If the token has expired or was already used, and the player has no session from an earlier launch, the race does not load. BetGlider shows an empty race card and does not tell your page.
- A session lasts up to an hour. It is shorter if your session token expires sooner. BetGlider does not refresh it. After it ends, bets fail and the player needs a fresh launch.
- The session follows the player between races inside BetGlider.
- The player's profile is read at every launch, so a stake-factor change reaches the player at their next launch.
On the web
<iframe
src="LAUNCH_LINK"
title="BetGlider"
width="393"
height="745"
allow="autoplay; fullscreen; picture-in-picture"
style="border: 0"
></iframe>- Size. BetGlider is designed mobile-first for this frame size and scrolls inside it. It works down to about 354 pixels wide. We'd suggest giving the frame a fixed size.
- Video. The
allowlist lets race video play muted and inline, and lets players use the browser's picture-in-picture. - Sandboxing. If you sandbox the frame, include at least
allow-scripts allow-same-origin.
Cookies. BetGlider keeps the player's session in a cookie on its own address. Inside your page, that counts as a third-party cookie. Most browsers accept it, because it is partitioned to your site. Some refuse it, iOS WebViews among them, and betting then fails.
We'd suggest testing the whole flow in every browser you support, with third-party cookies blocked. If one of them refuses the cookie, we're happy to talk about serving BetGlider from a subdomain of your own domain.
Messages to your page. BetGlider posts these messages to window.parent, as { source: 'betglider-widget', type }:
type | When | What your page does |
|---|---|---|
BACK_ARROW_CLICKED | The player taps the back arrow | Close BetGlider, or go back |
TERMS_OVERLAY_OPEN | The Key Terms open, in the first-run tour or from Settings | Make the frame about 660 px tall if it is shorter |
TERMS_OVERLAY_CLOSE | The Key Terms close | Return the frame to its normal size |
The messages carry no player data. It helps to check event.origin before acting on one:
const BETGLIDER_ORIGIN = 'https://<betglider-host>';
window.addEventListener('message', (event) => {
if (event.origin !== BETGLIDER_ORIGIN) return;
const msg = event.data;
if (!msg || msg.source !== 'betglider-widget') return;
switch (msg.type) {
case 'BACK_ARROW_CLICKED':
closeBetGlider();
break;
case 'TERMS_OVERLAY_OPEN':
expandBetGliderFrame();
break;
case 'TERMS_OVERLAY_CLOSE':
restoreBetGliderFrame();
break;
}
});In a native app
We'd suggest opening the launch link directly in a WebView, full screen or as a sheet, rather than inside one of your web pages. BetGlider then runs as the page itself, which stops the WebView from blocking its session cookie.
- Close button. Adding your own works well, together with
hideArrow=true. BetGlider sends the messages above only when it runs inside a frame. - Video. To show race video in the app, allow inline video playback in the WebView settings.
- BetGlider does not hand off to your deposit page. A player who runs out of funds deposits outside BetGlider.
- It does not show the player's balance.
- It does not listen for messages from your page, and sends no login, balance or resize messages.
What your API can offer
Two-Up's servers call your API, except for capability 5, where your platform calls BetGlider's. Each capability below lists the data BetGlider needs. Your formats can stay as they are: the connection we build translates them.
| # | Capability | Need |
|---|---|---|
| 1 | Swap the one-time token for a player session | Required |
| 2 | Describe the player | Required |
| 3 | Share a market's limits | Recommended |
| 4 | Accept or refuse a bet | Required |
| 5 | Send settled bets to BetGlider | Required, unless BetGlider results the races |
| 6 | Look up a bet by BetGlider's bet id | Recommended |
| 7 | Race video, silks, race catalogue, cancelling a bet | Optional |
1. Swap the one-time token for a player session
- BetGlider sends the one-time token from the launch link.
- Your API returns a session token for that player, and how long it lasts.
- The token is then used for every later request BetGlider makes for that player: profile, limits, bets and video.
One-time tokens should be single use and last about a minute. Session tokens should last at least an hour.
2. Describe the player
| Field | Need | What BetGlider does with it |
|---|---|---|
| Player id | Required | Becomes the player's id in BetGlider. A stable whole number. |
| Required | Shown to BetGlider's trading team | |
| Stake factor | Recommended | Sets the player's BetGlider limits (section 6). Without it, 0.75 is used. |
| Allowed to bet | Recommended | Shown to the trading team. Your platform stays responsible for refusing bets from a player who may not bet. |
| Balance, currency | Recommended | Shown to the trading team |
| Session time, play break, reality check | Recommended | Stored. BetGlider does not act on them yet. |
3. Share a market's limits
- BetGlider sends a race and a market.
- Your API returns the maximum stake and the maximum win per bet, separately for before the off and in-running.
BetGlider checks each bet against these before sending it. It counts in what the player already has on that runner, and tells the player which limit the bet would break.
4. Accept or refuse a bet
This is the main call. Its fields are listed in section 5.
- Answer synchronously: accepted, with your own bet reference and a timestamp, or refused, with a reason code.
- Please answer within a few seconds. BetGlider waits up to 10 seconds and does not resend. With no answer, the player is told the bet failed.
- Recognise a BetGlider bet id you have already seen, so the same bet is never taken twice.
5. Send settled bets to BetGlider
When your engine settles a bet, your platform sends it to BetGlider's API, and BetGlider shows it in the player's My Bets. The fields are in section 5. Two-Up gives you the address and credentials for each environment.
BetGlider confirms each settled bet it receives. If it does not, send the bet again: sending the same settled bet twice is safe.
If you would rather not send settled bets, BetGlider can result the races instead. See section 5.
6. Look up a bet by BetGlider's bet id
The lookup returns the bet's status: accepted, refused, settled or void. Both sides can then confirm a bet whose answer went missing, without anyone checking by hand.
7. Optional extras
- Race video. The video BetGlider can play for the player: either a stream link, or a Perform player package.
- Silks. The jockeys' colours for each race. Otherwise they come from BetGlider's racing feed.
- A race catalogue with your ids. Only needed if bets should carry your ids (section 2).
- Cancelling an accepted bet. BetGlider never cancels an accepted bet today.
General requirements
- Environments. A test and a live environment, with test accounts.
- Security. HTTPS, and server-to-server authentication: an API key, OAuth client credentials, mutual TLS or an IP allowlist.
- Data. Times in UTC. Amounts in the account currency, with two decimal places.
- Errors. A stable error format with machine-readable codes.
How bets reach your platform and come back settled
A bet from start to finish
- The player picks a horse and a stake.
- BetGlider checks that:
- the player has accepted the Key Terms
- the race is still open
- the price has not moved since the player saw it
- the bet is within the player's limits
- BetGlider asks your API for the market's limits, then asks it to accept the bet.
- Your platform accepts the bet, or refuses it with a reason.
- The player sees a receipt, or a plain message explaining the refusal.
- The race is run.
- Your platform results the race, settles the bet with its own engine, and pays the player.
- Your platform sends the settled bet to BetGlider.
- BetGlider shows the bet as settled in the player's My Bets.
Prices move fast in-running. If the price changes by more than a small margin (0.05 in decimal odds) before the bet is placed, BetGlider shows the new price instead of placing the bet.
How BetGlider's pieces map to yours
| In BetGlider | On your platform |
|---|---|
| Race | Event |
| Win market (who finishes first) | Market |
| Runner (a horse) | Selection |
| Player | The same player account, with the same id |
| Bet | A single win bet at a fixed price, with BetGlider's bet id as its reference |
| Settled bet | Won, lost or void, with the amount returned |
The bet your platform receives
| Field | Example | What it is for |
|---|---|---|
| BetGlider bet id | 48213 | Unique for every bet. Use it to recognise a bet you have already received. |
| Player | from the session token | The account the stake comes from |
| Stake | 5.00 | In GBP |
| Price | 3.0 decimal, and 2/1 | The odds the bet is struck at |
| In-running | true | Whether the race had started |
| Race, market, runner | your ids or BetGlider's | What the bet is on |
| Placed at | 29 Sep 2026, 14:05:12 UTC | When the player placed it |
The settled bet BetGlider receives
| Field | Example | What it is for |
|---|---|---|
| BetGlider bet id | 48213 | Which bet it is |
| Outcome | won | Won, lost or void |
| Returned | 15.00 | What your platform paid the player, stake included: nothing for a lost bet, the stake for a void one |
| Settled at | 29 Sep 2026, 14:12:40 UTC | When your platform settled it |
Results and settlement
By default, your platform results and settles every bet itself, as it would any single win bet: from your own results, with your own rules for non-runners, dead heats and abandoned races. It then sends BetGlider each settled bet, and BetGlider shows it in the player's My Bets exactly as you settled it. BetGlider never moves money and sends you no results.
BetGlider's racing feed still drives what the player sees of the race: prices, the race's progress and the official result.
Option: BetGlider results the races. If you prefer, BetGlider can result the races itself. After the weigh-in, it sends your platform one result per race, with each runner that has bets marked won, lost or void, and your engine settles the bets from it.
- Non-runners are void, and so is every runner in an abandoned race.
- In a dead heat, every runner that ties for first is marked won, so your usual dead-heat rule applies.
This option suits a platform whose engine cannot result BetGlider's races itself, for example when bets carry BetGlider's ids.
A worked example
A player bets £5 on horse 4 at 2/1 while the race is running. Your platform takes the £5 and records bet 48213. Horse 4 wins. Your platform settles the bet, pays the player £15, and sends BetGlider the settled bet. The player's My Bets shows bet 48213 won, returning £15.
What players see when a bet is refused
Your reason codes are matched to these messages when we build your connection:
| Reason | The player sees |
|---|---|
| Key Terms not accepted (BetGlider's own check) | Please accept the Key Terms to place bets |
| Insufficient funds | Insufficient balance. Top up to place this bet. |
| Stake above the maximum or below the minimum | Stake above the maximum for this bet / Stake below the minimum for this bet |
| Market, daily or payout limit | Bet exceeds the limit for this market / Bet exceeds your daily limit / Bet exceeds the maximum payout |
| Price changed or missing | The price has changed, please try again / Price unavailable |
| Suspended, started or resulted | Betting suspended / This race has already started / This race is already resulted |
| Selection no longer available | This selection is no longer available |
| Session expired or invalid | Your session has expired, please log in again |
| Player may not bet (legal restriction) | Betting is not available for your account |
| Any other reason | Your own message, kept to one line, or "Bet could not be placed, please try again" |
Limits, responsible gambling and terms
Stake limits
The stake factor in the player's profile sets their BetGlider limits. Both are rounded to the penny:
- Max bet per bet is the stake factor × 66.67.
- Max race spend is the max bet × 3.
| Stake factor | Max bet | Max race spend |
|---|---|---|
| 0.25 | £16.67 | £50.00 |
| 0.75 (used when none is given) | £50.00 | £150.00 |
| 1.00 | £66.67 | £200.00 |
| 2.00 | £133.33 | £400.00 |
BetGlider's trading team can adjust these globally, or for a racecourse, meeting, race or runner. It can also suspend or hide any of them.
Players can set their own maximum spend per race (default £50) and minimum price (default 1/2). Your own limits still apply on top, through capabilities 3 and 4.
Responsible gambling
Your platform stays in charge of:
- self-exclusion and cooling-off
- deposit limits
- age, identity and location checks
When a player may not bet, please refuse the bet with a legal-restriction reason, and BetGlider shows "Betting is not available for your account". You can refuse at any point: when swapping the token, when sharing limits, or when the bet arrives.
BetGlider does not show reality checks, session timers or play-break prompts.
Key Terms
On first use, a short guided tour shows BetGlider's Key Terms and asks the player to accept them. Until a player has accepted the current version, BetGlider refuses their bets itself, before anything reaches your platform. The wording is written for Great Britain.
Good to know
- Language and currency. BetGlider runs in English, with stakes and prices in GBP. Tell us early if you would like something else.
- Odds. Odds show as fractions by default. Players can switch to decimal or US odds in Settings.
- Times. Times show in the player's own time zone.
- Race video. Video is optional. BetGlider works as normal without it.
- Race ladders. You can send us your own race ladders, and we map BetGlider's races to them for you, instead of using BetGlider's race ids (section 2).
Testing and going live
- Kick-off. We agree the approach to race ids, and you share the items in section 1.
- We build your connection and your BetGlider. You get a themed version on your test environment to review.
- You add the entry point, and the frame or WebView.
- We test together on your test environment:
- Go live. You can start with a handful of races, because Two-Up can limit which races are offered.
What we test together
Ticks are saved in this browser only.
If this guide leaves a question open, your Two-Up contact is happy to help.