What is OMG?
OMG (docs.omgapi.cc) is a professional game aggregation platform that provides third-party merchants with a unified API to access a wide variety of game content:
- Slots — classic and video slot machines
- Fishing Games — skill-based arcade fishing titles
- Mass Table Games — multi-player table games
- Mini Games — lightweight casual game modules
Merchants integrate once and gain access to the full OMG game library, with centralized wallet management, bet record reporting, and player RTP control.
Two Wallet Modes
OMG supports two mutually exclusive wallet architectures:
Single Wallet
- Player balance is maintained by the merchant.
- OMG calls back the merchant for balance queries and changes.
- Merchant must implement:
verify_session,get_balance,change_balance.
Transfer Wallet
- Player balance is maintained by OMG.
- Merchant actively calls OMG to transfer funds in/out.
- No callbacks needed — merchant only calls OMG APIs.
| Dimension | Single Wallet | Transfer Wallet |
|---|---|---|
| Balance owner | Merchant | OMG platform |
| Enter game API | /api/usr/ingame |
/api/game/v1/entergame |
| Token source | Merchant's own auth | OMG /api/player/v1/authorize
|
| Balance change | OMG callbacks merchant | Merchant calls OMG /api/cash/v1/transfer
|
MD5 Signature Authentication (Critical!)
Every API request must be signed:
sign = md5( URL_query_string + raw_body_JSON + secret_key )
Key rules:
- MD5 result must be lowercase hex
- Body must use the original raw JSON bytes — never re-serialize after parsing
-
signgoes in the HTTP header, not the body - URL query string (e.g.,
trace_id=xxx) must be included in the signature
Go Implementation Example
// Sending a request
bodyBytes := []byte(`{"player_logon_token":"...","account_id":"1002402","timestamp":1711971655}`)
urlQuery := "trace_id=" + traceID
toSign := urlQuery + string(bodyBytes) + key
sign := fmt.Sprintf("%x", md5.Sum([]byte(toSign))) // lowercase hex
req, _ := http.NewRequest("POST", url+"?"+urlQuery, bytes.NewReader(bodyBytes))
req.Header.Set("Content-Type", "application/json; charset=utf-8")
req.Header.Set("sign", sign)
Response Code Convention (Common Bug Source!)
| Interface Type | Success Code |
|---|---|
| Merchant to OMG (game APIs) | code = 0 |
| OMG to Merchant callbacks (Single Wallet) | code = 1 |
| Backend / report APIs | code = 1 |
If your callback returns
code=0, OMG will treat it as a failure and keep retrying!
Single Wallet Flow
1. Merchant -> OMG: /api/usr/ingame -> get game URL
2. Player visits game URL
3. OMG -> Merchant: /api/luck/user/verify_session (verify token)
4. OMG -> Merchant: /api/luck/balance/get_balance (query balance)
5. OMG -> Merchant: /api/luck/balance/change_balance (bet/payout/cancel)
change_balance Transaction Types
| type | Meaning | money sign |
|---|---|---|
| 1 | Bet | negative |
| 2 | Cancel bet (rollback) | positive |
| 3 | Payout | positive |
| 4 | Verify round end | 0 |
| 5 | LuckWin bonus | positive |
Common Pitfalls & Fixes
| Symptom | Root Cause | Fix |
|---|---|---|
| Always 10002 sign invalid | Body re-serialized before signing | Use raw request bytes |
| Sign correct but still fails | URL query not in sign string | Include query in concatenation |
| OMG keeps retrying callback | Returned code=0 instead of code=1 | Return code=1 on success |
| Duplicate deductions | No idempotency on order_id | Add unique constraint |
| Amount precision loss | Parsed as float | Use string/Decimal, 4 decimal places |
Resources
- Official Docs: docs.omgapi.cc
- GitHub Repo: github.com/omgapi/omg-api-integration
- Quick Start: docs.omgapi.cc quickstart
Contact
For business inquiries and integration support:
- Telegram: @omgapi666
- Official Docs: docs.omgapi.cc
This guide is based on the complete integration skill available at github.com/omgapi/omg-api-integration.
Top comments (0)