API H2H Integration
Complete documentation for automated system integration.
This documentation is for partners, resellers, and developers connecting their systems directly to TokoGue.
Base URL
https://api.tokogue.com/apiFormat
JSON Request / ResponseOverview
An overview of the H2H integration model for TokoGue.
Current access scheme
Use X-API-KEY for general API access and a JWT token for partner/member transactions.
Recommended integration model
Log in as a partner, sync the catalog, create an order, and monitor it until completion.
Authentication
The minimum headers required for requests to be accepted.
Public / catalog endpoint headers
Content-Type: application/json
Accept: application/json
X-API-KEY: YOUR_GLOBAL_API_KEYPartner transaction endpoint headers
Content-Type: application/json
Accept: application/json
X-API-KEY: YOUR_GLOBAL_API_KEY
Authorization: Bearer YOUR_JWT_TOKENIntegration Flow
The recommended technical flow for a stable partner integration.
1. Login
Log in to the partner account to obtain an active JWT token.
2. Config
Configure the IP whitelist and callback URL on the partner account.
3. Sync
Fetch games, products, the price list, and promotions.
4. Validation
Validate the game region or nickname when required.
5. Order
Send the automated transaction to the order endpoint.
6. Polling
Monitor the transaction until it reaches a final status.
Product Sync
Endpoints for retrieving the catalog and validating products.
/api/gamesRetrieve the game list.
/api/games/{slug}Retrieve game details and order products.
/api/price-listSynchronize product prices.
/api/promoRetrieve active promotions or flash sales.
/api/mlbb/check-regionValidate game input before creating an order.
Transactions
The primary endpoint for creating automated partner transactions.
/api/ordersCreate an automated order from the partner system.
Check Status
Endpoints for monitoring transactions after an order is created.
/api/orders/{orderId}Check order details by reference.
/api/transactionsRetrieve the partner account transaction history.
/api/transaction-summaryRetrieve the partner account transaction summary.
Partner Configuration
Endpoints for partner accounts and H2H settings.
/api/auth/loginLog in to the partner account and retrieve a JWT.
/api/auth/userValidate the active login token.
/api/member/profileView the member API key, IP whitelist, and callback URL.
/api/member/api-configSave the IP whitelist and callback URL.
/api/member/api-key/resetReset the member account API key.
Request Examples
Minimal examples commonly used for H2H integration.
Partner Login
curl -X POST "https://api.tokogue.com/api/auth/login" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-API-KEY: YOUR_GLOBAL_API_KEY" \
-d '{
"email": "partner@tokogue.com",
"password": "your-password"
}'Create Order
curl -X POST "https://api.tokogue.com/api/orders" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-API-KEY: YOUR_GLOBAL_API_KEY" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-d '{
"games": "mobile-legends",
"id_games": "12345678",
"server_games": "1234",
"product": "86 Diamonds",
"nominal": "86 Diamonds",
"price": 22000,
"payment_name": "Saldo",
"payment_code": "SALDO"
}'Check Order Status
curl -X GET "https://api.tokogue.com/api/orders/INV-EXAMPLE-12345" \
-H "Accept: application/json" \
-H "X-API-KEY: YOUR_GLOBAL_API_KEY"Important Notes
Notes to prevent incorrect assumptions during implementation.

