What the software settles for you
You record a bet with your own bet_id, the customer reference, event, market, selection, stake and the price the customer accepted. RealTimeBets stores the bet with the time its market resolves. When the market resolves, the bet gets a result from the same match state that produced the price, so the price and the settlement come from one source.
The result is one of three statuses. A winning bet is won with a payout of stake times price. A losing bet is lost with a payout of 0. A bet you cashed out on Enterprise is cashed_out with the cash out amount. Your wallet moves the money, because the API never holds player funds.
One bet from record to payout
A customer takes 40 at 1.52 on the server winning the next tennis point. You post the bet. When the point is played, your endpoint receives this, signed:
X-RTB-Event: bet.settled
X-RTB-Delivery: whd_8m2k...
X-RTB-Signature: t=1792000000,v1=5f2c...
{"type": "bet.settled", "data": {"bet_id": "B-10442", "stake": 40, "price": 1.52,
"status": "won", "payout": 60.8, "winning_selection": "server"}}The payout is 40 times 1.52, which is 60.8. If the other player had won the point, the same webhook arrives with status lost and payout 0. Your code credits or does nothing, and marks the bet closed.
How you trust and reconcile the webhook
Each request carries X-RTB-Signature with a timestamp and an HMAC SHA-256 of the timestamp, a dot and the raw body, made with your endpoint secret. Your code recomputes it and rejects anything that does not match or is older than 5 minutes. The Python example shows the check in about six lines.
- Idempotency. Every delivery has a unique X-RTB-Delivery id. Store it and ignore a repeat.
- Retries. A delivery is tried up to 3 times within a couple of seconds. Answer with any 2xx. The console lists recent deliveries as delivered or failed with the HTTP code.
- Reconcile. GET /api/v1/bets/{bet_id} returns the current status and payout, so a nightly job can compare your ledger with ours and catch any webhook your server missed.
- Test. The console button Send test event fires a signed sample at your endpoint before any real bet exists.
| Step | Who does it | What you get |
|---|---|---|
| Check the stake | RealTimeBets (Growth and Enterprise) | accepted, reduced with max stake, or rejected with a reason |
| Record the bet | Your back end calls POST /api/v1/bets | bet stored with the time its market resolves |
| Settle | RealTimeBets | won, lost or cashed_out with the payout |
| Notify | RealTimeBets | signed bet.settled webhook, 3 tries, unique delivery id |
| Reconcile | Your back end calls GET /api/v1/bets/{bet_id} | current status and payout for your ledger |
| Credit the customer | Your wallet | money moves in your system, never in the API |
What stays in your own system
Be clear about the boundary before you budget. RealTimeBets reports won, lost and cashed_out for bets you recorded on markets it prices. It does not hold customer balances, credit winnings, run KYC, take deposits or settle bets placed with other bookmakers. Rules outside those results, such as how you treat a bet on an abandoned match, remain your own business logic.
The pairing with the risk check matters here. The bet you record is the one the risk check accepted or reduced, so the stake you settle is the stake you accepted. The wider build list is on the betting APIs for small sportsbooks page.
Plan and price for settlement
Settlement webhooks and bet recording are included from Starter. If you also want the risk check and automatic suspension in front of the bet, that is Growth. Choosing a plan reserves it at the listed price and nothing is charged yet. A sandbox key lets you record and settle replay bets first: 1 sport, a 60 second delay, 1,000 requests, 7 days, and settlement arrives after that delay.
For a day by day way to use those 1,000 requests, see the sandbox test plan.
Who it is for and who it is not for
It is for a developer or product lead at a licensed or soon to be licensed sportsbook who wants settlement results pushed to their back end instead of resolved by hand or by a trader. It fits best when your markets are live in-play and micro-markets that resolve in seconds.
It is not a back office with accounting, bet history screens for customers, or a settlement service for bets taken on another vendor's prices. If you only need a data feed, look at the sportsbook data feed page.