api.bluebuff.in API v2.0

Official Service API Documentation — For Members & Owners Only

1. Authentication

Every request must include your API key in the request header. Your key starts with TK_ and is shown only once when created. Keep it secret — treat it like a password.
Required Header for ALL Requests
x-api-key: TK_your_api_key_here
Content-Type: application/json

2. Security Layers

3-Layer Protection:

3. API Endpoints

GET /api/service/balance
Returns your wallet balance, user profile, and current API key usage stats.
Sample Request
GET https://api.bluebuff.in/api/service/balance
x-api-key: TK_your_api_key_here
Sample Response (200 OK)
{
  "success": true,
  "wallet": 4.84,
  "currency": "USD",
  "userType": "member",
  "name": "John Doe",
  "userId": "TK1001",
  "usage": {
    "usedToday": 0,
    "dailyLimit": 1000,
    "remaining": 1000,
    "isLimitReached": false
  }
}
GET /api/service/games
Returns all available games, OTT services, and memberships with their slugs.
Sample Request
GET https://api.bluebuff.in/api/service/games
x-api-key: TK_your_api_key_here
Sample Response (200 OK)
{
  "success": true,
  "games": [
    { "name": "PUBG Mobile",              "slug": "pubg-mobile138",              "publisher": "Krafton",     "available": true },
    { "name": "Genshin Impact",           "slug": "genshin-impact265",           "publisher": "Hoyoverse",   "available": true },
    { "name": "MLBB Double",              "slug": "mlbb-double332",             "publisher": "Moonton",     "available": true },
    { "name": "Mobile Legends",           "slug": "mobile-legends114",          "publisher": "Moonton",     "available": true },

  ]
}
GET /api/service/games/{gameSlug}
Returns all purchasable items for a specific game with your member pricing applied.
Sample Request
GET https://api.bluebuff.in/api/service/games/mobile-legends114
x-api-key: TK_your_api_key_here
Sample Response (200 OK)
{
  "success": true,
  "game": {
    "name": "MLBB Double",
    "slug": "mlbb-double332",
    "publisher": "Moonton",
    "currency": "USD",
    "items": [
      { "name": "55 Diamonds",  "slug": "55--first-time-5050-else-55601",         "price": 0.75, "available": true },
      { "name": "165 Diamonds", "slug": "165-first-time-150150-else-165242",       "price": 2.23, "available": true },
      { "name": "275 Diamonds", "slug": "275-first-time-250250-else-275322",       "price": 3.59, "available": true },
      { "name": "565 Diamonds", "slug": "565-first-time-500500-else-565749",       "price": 7.30, "available": true }
    ]
  }
}
POST /api/service/validate
Validates a player's game account before placing an order. Returns the player's in-game name.
Sample Request
POST https://api.bluebuff.in/api/service/validate
x-api-key: TK_your_api_key_here

{
  "gameSlug": "mobile-legends114",
  "playerId": "1540134133",
  "zoneId": "16461"
}
Sample Response (200 OK)
{
  "success": 200,
  "message": "Validation successful",
  "data": {
    "username": "PlayerName",
    "region": "🇮🇳",
    "playerId": "1540134133",
    "zoneId": "16461"
  }
}
POST /api/service/order
Places an order. Funds are temporarily deducted and auto-executed in real-time. If fulfillment fails, funds are instantly refunded to your wallet.
Sample Request
POST https://api.bluebuff.in/api/service/order
x-api-key: TK_your_api_key_here

{
  "gameSlug": "mobile-legends114",   // from /games list
  "itemSlug": "weekly-pass932",     // from /games/{slug} items
  "playerId": "12345678",
  "zoneId": "1234"              // required for ML, optional for others
}
Sample Response — Success (200 OK)
{
  "success": true,
  "status": "success",
  "message": "Order fulfilled successfully",
  "order": {
    "orderId": "APIBB-2026-8TSHA7LMR",
    "itemName": "Weekly Pass",
    "price": 1.45,
    "currency": "USD",
    "status": "success",
    "topupStatus": "success"
  },
  "usage": {
    "usedToday": 1.45,
    "dailyLimit": 1000,
    "remaining": 998.55,
    "isLimitReached": false
  }
}
❌ Failure Response
{
  "success": false,
  "status": "failed",
  "message": "Order failed. Wallet balance has been preserved.",
  "order": {
    "orderId": "APIBB-2026-8TSHA7LMR",
    "itemName": "Weekly Pass",
    "price": 1.45,
    "currency": "USD",
    "status": "failed",
    "topupStatus": "failed",
    "description": "invalid game detail"
  }
}
GET /api/service/status/{orderId}
Check the current status of a previously placed order using its Order ID.
Sample Request
GET https://api.bluebuff.in/api/service/status/API-XK9P2A1B
x-api-key: TK_your_api_key_here
Sample Response (200 OK)
{
  "success": true,
  "order": {
    "orderId": "API-XK9P2A1B",
    "gameSlug": "mobile-legends114",
    "itemName": "Weekly Diamond Pass",
    "playerId": "12345678",
    "price": 1.68,
    "currency": "USD",
    "status": "success",
    "topupStatus": "success",
    "createdAt": "2026-02-18T07:15:00.000Z"
  }
}

4. Error Codes

HTTP Status Reason How to Fix
401 Missing or invalid API key Check your x-api-key header. Ensure the key is active.
401 IP not whitelisted Add your server IP to the Allowed IPs list in the Dashboard.
403 Region Restricted Product is unavailable for the user's specific region (e.g., MLBB restricted in Indo, PH, SG, etc.).
403 Daily spend limit reached Increase your daily cap in the Dashboard or wait until midnight reset.
403 Rate limit — too fast Wait 2 seconds between consecutive requests.
403 Insufficient wallet balance Top up your wallet before placing orders.
404 Invalid game or item slug Use GET /api/service/games/{slug} to get valid slugs.
500 Internal server error Retry after a few seconds. Contact support if it persists.

5. Recommended Integration Flow

Step-by-step for building your reseller website:
  1. Call GET /games → Show game list to your customer
  2. Call GET /games/{slug} → Show items & your prices
  3. Call POST /validate → Verify player ID before payment
  4. Collect payment from your customer on your site
  5. Call POST /order → Auto-executes top-up instantly
  6. Call GET /status/{orderId} → Show delivery confirmation