Getting Started
Welcome to API documentation. Before diving into implementation, you’ll need to choose the integration type that best fits your server’s needs.
- Transfer API - Traditional account-based integration
- Seamless API - Real-time webhook-based integration
Choose Your Integration Type
Section titled “Choose Your Integration Type”API Provider offers two integration approaches, each designed for different use cases:
Transfer Integration
Section titled “Transfer Integration”How it works:
- API Provider maintains the player’s balance in their system. You control when balances are deposited or withdrawn by calling deposit/withdrawal APIs.
- Handles all balance management and in-game transactions automatically.
Key Characteristics:
- It holds and manages the balance
- You control when to deposit or withdraw balance via API calls
- Simpler implementation
- Clear transaction control
Your Responsibilities:
- Decide when to deposit funds
- Decide when to withdraw funds
- Handle transaction failures
- Track your own records if needed
DOWINN’s Responsibilities:
- Store and manage player balance
- Process all bets, wins, and losses automatically
- Update balance for deposits and withdrawals when you call APIs
- Provide balance information when you request it
Seamless Integration
Section titled “Seamless Integration”How it works: Single unified balance with real-time synchronization. Your server receives webhook notifications for every bet, win, and game event, keeping balances instantly synchronized. Key Characteristics:
- Real-time balance updates
- Instant withdrawal capability
- Your server is source of the balance
- Automatic transaction flow
Client’s Responsibilities:
- Receive and process webhooks for every game event
- Update client’s server balance in real-time
- Respond to API Provider with updated balance
- Handle high API volume
API Provider’s Responsibilities:
- Send webhook for every bet, win, loss
- Wait for your balance confirmation
- Proceed with game based on your response
Quick Comparison
Section titled “Quick Comparison”| Feature | Transfer | Seamless |
|---|---|---|
| Control | You decide when to deposit/withdraw | Automatic (every bet/win) |
| Implementation | Call API Provider Endpoints | Webhook system |
| API Calls | Low (~2-4 per session) | High (every bet/win) |
| Balance Updates | When you deposit/withdraw | Real-time |
| Infrastructure | Basic web server | Webhook endpoint required |
| Latency Tolerance | High (seconds acceptable) | Low (sub-second required) |
Selection Criteria
Section titled “Selection Criteria”Transfer Integration Is Suitable For:
Section titled “Transfer Integration Is Suitable For:”- Budget-controlled gaming
- Server requiring manual fund control
- Lower API volume requirements
- Simpler infrastructure
Seamless Integration Is Suitable For:
Section titled “Seamless Integration Is Suitable For:”- Real-time betting
- Instant withdrawal requirements
- High-frequency gaming
- Servers with existing webhook infrastructure
- Real-time balance synchronization needs
Seamless Integration Flow
Section titled “Seamless Integration Flow”-
Set Up Authentication
- Understand encryption methods
- Secure your API credentials
-
Create Webhook Endpoint
- Build endpoint to receive API Provider callbacks
- Implement signature verification
- Handle idempotency
-
Implement Event Handlers
- Handle bet events (deduct from your server’s balance)
- Handle win events (credit to your server’s balance)
- Handle refund/cancel events
- Implement proper error responses
-
Test & Monitor
- Test all event types thoroughly
- Implement logging and monitoring
- Set up alerting for failures
Transfer Integration Flow
Section titled “Transfer Integration Flow”-
Set Up Authentication
- Understand encryption methods
- Secure your API credentials
-
Initialize Player Account
- Implement Account Init
- Create accounts for your players
-
Handle Fund Transfers
- Implement Account Deposit - called when you want to add funds to player’s API Provider balance
- Implement Account Withdraw - called when you want to remove funds from player’s API Provider balance
-
Monitor & Verify
- Implement Account Balance for balance checks
- Use Check Transaction to verify operations
Next Steps
Section titled “Next Steps”- Transfer API Guide - Learn about Transfer API integration
- Seamless API Guide - Learn about Seamless webhook integration
- Encryption Guide - Understand encryption methods