Seamless-wallet aggregator API that unifies casino, live casino and sportsbook providers behind a single integration. One HMAC-signed callback handles the full bet lifecycle (balance, bet, win, refund, rollback) across every product and provider.
This repository documents the integration contract: authentication, the game-launch flow, and the wallet callback specification.
An operator integrates once and exposes a single wallet callback. Flexrix routes game launches and settles the money flow against that callback for:
- Aggregated casino — 100+ third-party providers (slots, table games) behind one endpoint.
- In-house engine — self-hosted game servers with per-game RTP control.
- Live casino — roulette, blackjack, baccarat and game shows via an own relay.
- Sportsbook — pre-match and in-play, cashout and own-book settlement.
Wallet model: bet → DEBIT, win → CREDIT, refund/rollback reverse a prior transaction. All callbacks are idempotent by transaction id.
Requests are signed with HMAC-SHA1 over the canonical, sorted query string using the shared merchant secret.
signature = HMAC_SHA1( sorted_query_string, merchant_secret )
Every request carries a nonce and timestamp; the server rejects reused nonces and stale timestamps (replay protection). Callback source IPs are validated against a per-merchant whitelist.
Signing (PHP):
ksort($params);
$canonical = http_build_query($params);
$signature = hash_hmac('sha1', $canonical, $merchantSecret);POST /v1/game/launch
Request:
{
"merchant_id": "m_1029",
"player_id": "p_55831",
"game_uuid": "pragmatic/vs20fruitsw",
"currency": "USD",
"lang": "en",
"nonce": "b1f9...",
"timestamp": 1756454400,
"signature": "b8c1..."
}Response:
{ "ok": true, "launch_url": "https://cdn.example/launch?token=eyJ..." }The launch_url carries a signed, per-player session token. The same endpoint serves aggregated, in-house and live games; only game_uuid changes.
Flexrix calls a single endpoint the operator hosts:
POST {callback_url} # action in body: balance | bet | win | refund | rollback
bet:
{
"action": "bet",
"player_id": "p_55831",
"currency": "USD",
"amount": 1.00,
"game_uuid": "pragmatic/vs20fruitsw",
"round_id": "r_88213",
"tx_id": "t_5f9c22",
"signature": "..."
}Expected response (for every action):
{ "ok": true, "balance": 1450.00 }| Action | Effect |
|---|---|
balance |
Return current player balance. |
bet |
Debit stake. Idempotent on tx_id. |
win |
Credit payout for a round. |
refund |
Return a prior bet (game error / cancel). |
rollback |
Reverse a settled transaction by tx_id. |
Sportsbook adds settle and close actions on the same callback for own-book bet resolution.
Per-merchant multi-currency wallets with a central currency registry (146+ fiat currencies) and crypto settlement (USDT, BTC, ETH). Amounts are sent in major units with two decimals.
Casino: Pragmatic Play, NetEnt, Play'n GO, Hacksaw Gaming, Amusnet, EGT Digital, Habanero, Endorphina, BGaming, 3 Oaks, RubyPlay, POPOK, Pascal, Spribe, InOut, and others.
Live casino: Evolution, Pragmatic Play Live, Amusnet Live.
Sportsbook: BetConstruct, SportRadar, Digitain, EveryMatrix, Betby.
- Slotegrator / GIS-compatible seamless-wallet pattern.
- Freespins, freebets and promo campaigns are granted via signed admin calls and echoed to the wallet on win.
- Round-level replay and game history are exposed per
round_id. - Full reference implementation and a webhook tester are provided during onboarding.
B2B access and technical onboarding: @davidflexrix · flexrix.com