Stakes, fees & escrow ​
Nobody has to trust anybody at the table: the server takes the money before the break and pays it out after the last ball.
Where the money goes ​
| Money | Taken | Goes to |
|---|---|---|
| Table fee | When a match starts, from the challenger (both pay half with feeSplit). Cup matches and practice are free |
The bar: its society account, and the revenue log as fee |
| Stakes | When the challenge is accepted, from both players, into escrow | The winner, minus the house cut (houseCut %, 0–10) to the bar as cut |
| Side bets | When the bet is placed, into escrow | The winners of the market, minus the rake (Config.Bets.rake %) to the bar as rake. See Side bets |
| Cup entries | When a player joins, into escrow | 1st / 2nd / 3rd by the cup's split, minus the cup rake to the bar as cup. See Cups |
| Cloth recovery | When the owner recovers a table | Out of the bar society (or the owner's own account), logged as upkeep. See Owner tablet |
Rounding leftovers of a bet pool or a cup prize go to the bar too.
Charging ​
- With np_payments running (
Config.Payments = 'auto'), every charge is oneexports.np_payments:Charge(src, Config.PayAccount, amount, { merchant, payee, category = 'other', reason, metadata })without a sheet: the player already agreed in the lobby or the bet panel. The merchant isnp_billiards:<bar>with the bar's label; table fees name the bar society as the payee, so np_payments credits it itself. See np_payments → Charge. - Without np_payments (or
Config.Payments = false), the framework accountConfig.PayAccount(bank) is charged and the society is credited through the society bridge. Config.Payments = truemakes np_payments required: while it isn't running every charge fails with unavailable.- Before a challenge is created or started, the server checks that the player can afford stake + fee
(
CanAffordwith np_payments, else the framework balance).
Escrow ​
Every held amount is a row in np_billiards_escrow (kind = stake, bet, cup or challenge) with the
np_payments reference.
- Paid out at the end: the winner gets the pot minus the house cut on
Config.PayoutAccount(bank). np_payments has no credit export, so payouts always go through the framework. An offline winner's money is queued in their profile and paid at their next login (with a toast). - Refunded on a void, a cancelled or declined remote challenge, a player dropping while their challenge is pending or scheduled, an expired challenge, a
market without winners, or a failed start: through
exports.np_payments:Refund(ref)when the charge went through np_payments, else a framework credit. - Restarts are safe. At start np_billiards refunds every escrow row still
heldfrom before the restart. Cups can't survive a restart and are cancelled (their entries are refunded the same way).
Forfeits and voids ​
| What happens | Result |
|---|---|
A player leaves (Backspace), dies or logs out |
Forfeit: the opponent wins the match and the stakes |
| A player walks away (30 m for 20 s) | Forfeit (walked_away) |
| A player crashes | 90 s to rejoin, then forfeit (disconnect) |
A referee, staff or VoidMatch voids it |
Every stake and bet is refunded, no ELO moves |
| Practice, or a solo match ends | Void, nothing to pay |
Ranked or friendly ​
With Config.Elo.rankedOnly = true (the default) only staked and cup matches move ELO, at bars with
house.ranked = true. Friendlies (stake 0) are still recorded in the profile and the match history. See
Rating, profile & achievements.