Integrate WINTO games with your own users & wallet.
Your application remains authoritative for user accounts, login and wallet balances. WINTO owns game rounds, accepted bets, results and settlement decisions.
https://limilive.weeklyoff.com/game-provider/v1Architecture
partner_id + external_player_id.Quick Start
- Receive your Partner Code and Partner Signing Secret from WINTO.
- Implement the partner wallet operations on your backend and give WINTO the HTTPS wallet base URL.
- Create a player session with
POST /sessionsusing HMAC authentication. - Use the returned bearer session token for state, history and bet requests.
- Use a stable
bet_id. Never create a second ID merely because an HTTP response was lost.
Supported Game IDs
77Lucky 77beachpartyBeach PartygreedyelephantGreedy ElephantgreedylionGreedy LiongreedyproGreedy ProluckyproLucky ProolapartydiamondOla Party DiamondteenpattiproTeen Patti ProteenpattigoldTeen Patti GoldteenpattigreenTeen Patti GreenAuthentication
Partner-authenticated requests use HMAC-SHA256. Session/game requests use a provider-issued bearer token.
Required HMAC headers
| Header | Value |
|---|---|
| X-Partner-ID | Assigned partner code |
| X-Timestamp | Unix timestamp in seconds; ±300 seconds accepted |
| X-Nonce | Unique random value, 16–128 chars |
| X-Signature | Lowercase 64-character HMAC-SHA256 hex |
Canonical string
METHOD
PATH
TIMESTAMP
NONCE
SHA256(BODY)
signature = hex(HMAC-SHA256(partner_signing_secret, canonical_string))
Partner Credentials
| Field | Provided by | Purpose |
|---|---|---|
| Partner code | WINTO | Identifies the integrating company/backend. |
| Partner signing secret | WINTO | Partner → WINTO HMAC signing. |
| Wallet base URL | Partner | HTTPS URL of the partner's own wallet service. |
| Wallet signing secret | Agreed securely | WINTO → partner wallet authentication. |
| Allowed source IPs | Partner | Partner backend public IP address(es), when allow-listing is enabled. |
/sessionsHMACUser / Player Session
This is the user-data handoff. The partner keeps the full user record in its own database and sends only the game identity/profile fields WINTO needs.
| Field | Required | Description |
|---|---|---|
| external_player_id | Yes | Stable player ID from the partner database. |
| game_id | Yes | One supported WINTO game ID. |
| display_name | No | Player display name. |
| avatar_url | No | HTTPS profile image URL. |
Request
{
"external_player_id": "USER-10001",
"game_id": "olapartydiamond",
"display_name": "Rahul",
"avatar_url": "https://cdn.partner.example/users/10001.jpg"
}
/session/meBearerCurrent Session
Returns the authenticated provider session/player context. Send Authorization: Bearer <SESSION_TOKEN>.
/game/stateBearerGame State
Returns the current public game/round state for the game scoped to the session. Use server-provided round and timing information rather than inventing authoritative round state client-side.
/game/history?limit=20BearerGame History
Returns recent public completed-round history for the game scoped to the session. limit is optional.
/game/betBearerPlace Bet
The server resolves partner/player identity from the bearer session. Do not send a client-authoritative user ID, balance, winner or payout.
{
"round_id": 12345,
"bet_id": "partner-order-000001",
"bets": [
{ "target": 1, "amount": 10 }
]
}
1 is illustrative and must not be copied blindly to every game.Amounts are integer coins. bet_id is a stable partner request identifier. Repeating the exact accepted logical request with the same ID is idempotent.
Partner Wallet API
The wallet API is hosted by the partner, not WINTO. wallet_base_url in WINTO's partner configuration points to this HTTPS service. It queries/updates the partner's own wallet tables.
Wallet — Balance
Partner-hostedReturns the authoritative current wallet balance for an external player.
{
"external_player_id": "USER-10001"
}
Wallet — Debit
Partner-hostedDeducts a bet amount exactly once. The transaction ID must be unique and idempotent.
{
"external_player_id": "USER-10001",
"transaction_id": "bet-partner-order-000001",
"amount": 100
}
Wallet — Credit
Partner-hostedCredits a WINTO-determined payout exactly once using a stable transaction ID.
{
"external_player_id": "USER-10001",
"transaction_id": "win-partner-order-000001",
"amount": 150
}
Wallet — Refund
Partner-hostedReverses an eligible original debit. The partner must make duplicate refund requests idempotent.
{
"external_player_id": "USER-10001",
"transaction_id": "refund-partner-order-000001",
"original_transaction_id": "bet-partner-order-000001"
}
Wallet — Transaction Status
Partner-hostedAuthoritative lookup used to resolve ambiguous network outcomes. It must answer whether the stable transaction ID exists and its final state without creating a new financial operation.
Settlement Model
WINTO finalizes the bet locally. No payout credit is required.
WINTO determines the payout and invokes the partner wallet credit flow.
WINTO invokes the partner refund flow for an eligible reversal.
Native WINTO round workers are the authority for result generation. The client/partner must never submit the authoritative winner or payout.
HTTP & Error Behavior
| Status | Meaning |
|---|---|
| 200 | Successful request / health response. |
| 201 | Session successfully created. |
| 400 | Invalid request or validation failure. |
| 401 | Invalid/missing bearer token, HMAC signature, expired timestamp or signed request mismatch. |
| 409 | Conflict, including consumed HMAC nonce replay. |
| 413 | Request body too large. |
| 5xx | Server/upstream failure. For financial ambiguity, reconcile by stable transaction ID; do not assume failure. |
Security Requirements
- HTTPS only; keep TLS certificate verification enabled.
- Keep all signing secrets server-side and outside source control.
- Synchronize backend clocks with NTP.
- Use a cryptographically random, one-time nonce for every HMAC request.
- Sign the exact HTTP method, path and raw body sent on the wire.
- Never log secrets, bearer tokens or complete Authorization headers.
- Never accept client-provided winner, payout, wallet balance or settlement status as authority.
- Use stable transaction IDs for financial idempotency and reconciliation.
Production Go-Live Checklist
- Partner code and signing secret exchanged securely.
- Partner HTTPS wallet base URL configured.
- Separate wallet authentication secret configured securely.
- Source IP allow-list agreed where required.
- HMAC valid, replay, expired timestamp and tamper tests passed.
- Session creation and bearer-token handling passed.
- State/history verified for every enabled game.
- Stable bet IDs and duplicate-request behavior tested.
- Balance/debit/credit/refund/transaction-status behavior tested.
- Win, loss, refund, timeout and reconciliation tested before production.