Skip to content

Seamless Integration Overview

Seamless integration is a webhook-based model where your platform balance remains the single source of truth. The API provider sends real-time event notifications to your webhook endpoint for every game action (login, bet, win, loss, logout), and your system responds with updated balance information. No fund transfers are needed between platforms.

  • Single Balance: No need to transfer funds between balances
  • Real-time Updates: Balance changes reflect immediately
  • Better UX: Players don’t need to manage multiple balances
  • Reduced Friction: No deposits/withdrawals between platforms
  1. Player logs into a game from your platform
  2. API provider sends event notifications to your webhook endpoint
  3. Your webhook processes events and updates the player’s balance
  4. All transactions are synchronized automatically in real-time

API provider sends six types of events to your webhook endpoint during gameplay:

EventPurposeWhen It’s Called
Login EventAuthenticate player & get balancePlayer starts session
Bet EventDeduct bet amountPlayer places a bet
Bet Cancel EventRefund cancelled betBet needs to be reversed
Result EventCredit winningsRound completes
Result Change EventAdjust resultResult correction needed
Logout EventEnd sessionPlayer exits game
Webhook HistoryView webhook call historyFor debugging and audit
Failed NotificationFailed webhook notificationsFor troubleshooting failed webhook calls

Always respond with appropriate response codes to indicate the status of the request.

  • Success Processing = "R0"
  • Failed Processing = "R1"
  • Unauthorized Request = "R2"
  • Validation Failed = "R3"
  • Not Enough Balance = "R4"
  • Balance is always managed on your side
  • The API provider queries your balance in real-time via webhook events
  • Never allow negative balances - validate sufficient funds before confirming bets
  • Implement proper locking mechanisms to prevent race conditions
  • All requests and responses must be encrypted (see Encryption Guide)
  • Validate all incoming webhooks
  • Use HTTPS for all endpoints
  • Store API Key securely

Follow this order when implementing seamless integration:

  1. Implement Login Event
  2. Test player authentication and balance retrieval
  3. Implement Logout Event
  1. Implement Bet Event
  2. Handle insufficient balance scenarios
  3. Implement Bet Cancel Event
  1. Implement Result Event
  2. Test win/loss scenarios
  3. Implement Result Change Event

Before starting implementation, ensure you have:

  • ✅ API Key from the API provider
  • ✅ Webhook endpoint URL ready to be configured
  • ✅ Understanding of encryption methods
  1. Review the Seamless API Guide for webhook implementation details
  2. Set up your encryption
  3. Implement Login Event
  4. Review Code Examples