Guide · Exchange
A lay bet reserves what the layer can lose
On a back bet the player risks the stake. On a lay bet the player risks the liability: the amount they pay the backer if the selection wins. The wallet has to reserve liability, not the profit the layer hopes to keep.
7 min readUpdated By the Turnkeyxgaming team
Show the reserved amount
If you only debit the layer's stake-equivalent and hope the rest is there at settlement, a later withdrawal will take the funds you needed. Reserve the liability when the bet is matched, the way you would reserve an open stake. The available balance drops by the reservation. The reserved amount is still the player's money, and the history should say reserved, not lost.
Release the reservation at settlement. If the selection loses, the layer is paid and the reservation returns with the profit. If the selection wins, the reservation is consumed. A void releases it with no profit and no loss. The Diamond exchange uses this pattern. A wallet that only understands casino debits will look solvent and be wrong.
Partial matches need the same treatment at a smaller size. When only part of the lay is matched, reserve liability for the matched portion and leave the unmatched portion available. Reserving the full requested liability up front traps funds the market never took, and reserving nothing until the whole stake matches lets the player withdraw the money a growing match will need. Recompute the hold as the matched size changes, and show that hold as its own line.
What the wallet holds on a lay
A casino-style debit of the layer's hoped-for profit will not cover the loss. Reserve the liability, label it, and release it in the settlement itself.
| Moment | Available balance | History word |
|---|---|---|
| Lay matched | Drops by the liability, which depends on the odds, not by the backer's stake alone. | Reserved. The money is still the player's. It is not a loss. |
| Selection loses | Reservation returns and the layer's profit is added. | Settled win. The hold and the profit clear in one transaction. |
| Selection wins | Reservation is consumed. That is the layer paying the backer. | Settled loss of the liability, not of some smaller stake. |
| Market void | Full reservation returns. No profit, no loss. | Void. Do not leave a residual hold. |
Wallet changes for lays
- 01
Reserve on match
Hold liability when the lay is matched, not when the market settles.
- 02
Label it
Show the held amount as reserved so the player does not raise a missing-money ticket.
- 03
Release cleanly
On win, loss or void, clear the reservation in the same settlement transaction.
Available balance is what a withdrawal may take
If the liability is only a note in the bet record, a withdrawal will pay it out and the settlement will find the wallet short. The hold has to reduce available balance at match time, while the history still says reserved.
A hold that outlived the part of the bet nobody matched
A player laid a selection at 7.4 for a 50 backer stake, which puts liability at 320 if the selection wins. Only 60% matched before the market closed: 30 of backer stake, 192 of liability. The wallet reserved the full 320 when the bet was placed and released nothing when the unmatched 20 was cancelled at the off. For three days the available balance sat 128 lower than it should have, and the player opened a ticket saying the site had taken money.
The reservation was not wrong for the bet as first requested. It was wrong for the bet that existed after the market stopped matching. A hold has to follow the matched size, and the release has to be an event the wallet acts on rather than a consequence it hopes the market will trigger. When an unmatched portion is cancelled, that cancellation is a callback like any other and needs an id and an acknowledgement of its own.
Round in one direction and write down which. Liability computed from odds and stake produces fractions of a minor unit, and a wallet that rounds up on the reserve and down on the release leaves a residue on every bet. Pick a rule, apply it both ways, and let the settlement clear the whole hold rather than the difference. A few cents per bet is invisible per player and unmissable in a monthly reconciliation against the exchange.
Where a liability hold goes wrong
These are the events that move a hold, and the habits that leave one behind.
- Reserve against the matched size at the moment of matching, then recompute as further matches arrive, so a partly filled bet does not sit on the hold of the full request.
- Give the cancellation of an unmatched portion its own id and acknowledgement, in the way a rollback has one, so a silent cancellation is visible in the log.
- Clear the hold inside the settlement transaction rather than in a follow-up job, so no report can read a state where the bet is closed and the money is still held.
- Choose a rounding rule for fractions of a minor unit, apply it on reserve and release, and reconcile the residual monthly against the exchange.
- Sum open holds daily against matched liability from the exchange feed. The difference catches both a missed release and a hold taken twice.
- Keep the player-facing line distinct from a reduced balance, since 'reserved' and a smaller number with no explanation produce two different tickets.
FAQ
Questions operators ask
Is liability the same as the backer's stake?
No. Liability depends on the odds. A lay at long odds reserves more than a lay at short odds for the same backer's stake.
Why is the hold on a long-priced lay larger than the backer's stake?
Because liability is what the layer pays if the selection wins, and at long odds that is a multiple of the backer's stake. Reserving only the backer's stake leaves the rest withdrawable.
Can we debit the liability as a normal casino stake and refund it later?
No. A debit looks like a loss in history and in any loss-limit that watches debits. A reservation is still the player's money. Use a hold, and clear it inside the settlement transaction.
Does a lay's liability count toward the player's loss limit?
Not as the hold. The limit concerns money the player may lose, and at settlement the layer either keeps the profit or pays the liability. Counting the reservation means a large hold on a bet that goes on to win a small profit trips a limit that was never breached, which is a complaint your own records will support.
What happens to an open lay when the player closes their account?
The bet still settles. The hold survives the closure and is released or consumed by that settlement, with any residue paid out under your own closure terms. Dropping holds when an account closes is how a settlement later finds nothing to take and finance finds a negative balance nobody owns.
Keep reading
Related pages
- Product · ExchangeDiamond exchangeBack and lay on cricket match odds, bookmaker and fancy markets, with lay liability reserved on the same wallet. Not the card games.Read
- Data · Exchange dataExchange dataExchange data is market state plus back and lay prices. It is not a fixed-odds feed, and it is not Betfair's Exchange API either.Read
- GlossaryLay betA lay bet opposes a selection. The layer's risk is the liability, which moves with the odds and is reserved on the wallet.Read
- GlossaryLiabilityLiability is what a layer, or a book, pays if the selection wins. That amount is what the wallet should reserve up front.Read
Get a written quote and sandbox access
Tell us your licence, target markets and products. You get the GGR rate in writing, the studio list for your markets and sandbox credentials.