{
  "info": {
    "name": "Kijumbe Smart API",
    "description": "# Kijumbe Smart HTTP API (mobile)\n\nBase path: `{{base_url}}` which already includes `/api/v1` (example: `http://127.0.0.1:8080/api/v1`).\n\n## Auth\n1. Run **Auth / Login** or **Register**.\n2. Scripts store `access_token` and `user_id` in the environment.\n3. Protected routes send `Authorization: Bearer {{access_token}}`.\n\n## Roles\n- **MEMBER**: join groups, pay, claims, KYC, reliability\n- **GAME_ADMIN (Kijumbe)**: create/manage groups, deposits, waive penalties\n- **SUPER_ADMIN**: users, KYC queue, payouts approve, integrations\n\n## Money\nAmounts are integer **TZS** (no decimals). Use `Idempotency-Key` (or body `idempotency_key`) for payment intents.\n\n## Phone\nTanzanian mobiles, e.g. `0712345678` (normalized server-side).\n\nGenerated for the mobile team from the Go Fiber routes.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{access_token}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "host",
      "value": "http://127.0.0.1:8080"
    },
    {
      "key": "base_url",
      "value": "http://127.0.0.1:8080/api/v1"
    },
    {
      "key": "access_token",
      "value": ""
    },
    {
      "key": "user_id",
      "value": ""
    },
    {
      "key": "game_id",
      "value": ""
    },
    {
      "key": "payment_id",
      "value": ""
    },
    {
      "key": "payout_id",
      "value": ""
    },
    {
      "key": "obligation_id",
      "value": ""
    },
    {
      "key": "membership_id",
      "value": ""
    },
    {
      "key": "claim_id",
      "value": ""
    },
    {
      "key": "notification_id",
      "value": ""
    },
    {
      "key": "kyc_id",
      "value": ""
    },
    {
      "key": "score_id",
      "value": ""
    },
    {
      "key": "deposit_id",
      "value": ""
    },
    {
      "key": "penalty_id",
      "value": ""
    },
    {
      "key": "withdrawal_id",
      "value": ""
    },
    {
      "key": "phone",
      "value": "0700000001"
    },
    {
      "key": "password",
      "value": "admin12345"
    },
    {
      "key": "integration_name",
      "value": "sms"
    },
    {
      "key": "selcom_webhook_token",
      "value": "replace-me"
    },
    {
      "key": "payment_reference",
      "value": ""
    }
  ],
  "item": [
    {
      "name": "00 Health & Meta",
      "description": "No auth.",
      "item": [
        {
          "name": "Healthz",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "url": {
              "raw": "{{host}}/healthz",
              "host": [
                "{{host}}"
              ],
              "path": [
                "healthz"
              ]
            },
            "description": "Liveness. Host only (no /api/v1)."
          },
          "response": []
        },
        {
          "name": "API Meta",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/meta",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "meta"
              ]
            },
            "description": "Public API metadata.",
            "auth": {
              "type": "noauth"
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "01 Auth",
      "description": "Public. Login/Register return access_token.",
      "item": [
        {
          "name": "Register",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/auth/register",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "auth",
                "register"
              ]
            },
            "description": "Creates MEMBER account. Phone must be TZ mobile. Password 8–72 chars.",
            "auth": {
              "type": "noauth"
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"full_name\": \"Asha Mwalimu\",\n  \"phone\": \"0712000001\",\n  \"email\": \"asha@example.com\",\n  \"password\": \"password123\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"status ok\", () => pm.expect(pm.response.code).to.be.oneOf([200, 201]));",
                  "const j = pm.response.json();",
                  "if (j.access_token) {",
                  "  pm.collectionVariables.set(\"access_token\", j.access_token);",
                  "  pm.environment.set(\"access_token\", j.access_token);",
                  "}",
                  "if (j.user && j.user.user_id) {",
                  "  pm.collectionVariables.set(\"user_id\", j.user.user_id);",
                  "  pm.environment.set(\"user_id\", j.user.user_id);",
                  "}",
                  "if (j.expires_at) pm.environment.set(\"token_expires_at\", j.expires_at);"
                ]
              }
            }
          ]
        },
        {
          "name": "Login",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/auth/login",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "auth",
                "login"
              ]
            },
            "description": "Returns `{ access_token, expires_at, user }`.",
            "auth": {
              "type": "noauth"
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"phone\": \"{{phone}}\",\n  \"password\": \"{{password}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"status ok\", () => pm.expect(pm.response.code).to.be.oneOf([200, 201]));",
                  "const j = pm.response.json();",
                  "if (j.access_token) {",
                  "  pm.collectionVariables.set(\"access_token\", j.access_token);",
                  "  pm.environment.set(\"access_token\", j.access_token);",
                  "}",
                  "if (j.user && j.user.user_id) {",
                  "  pm.collectionVariables.set(\"user_id\", j.user.user_id);",
                  "  pm.environment.set(\"user_id\", j.user.user_id);",
                  "}",
                  "if (j.expires_at) pm.environment.set(\"token_expires_at\", j.expires_at);"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "02 Me (profile & home)",
      "description": "Bearer required. Core mobile session.",
      "item": [
        {
          "name": "Get me",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/me",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "me"
              ]
            },
            "description": "Current user profile + roles + kyc_status.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Update profile",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/me",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "me"
              ]
            },
            "description": "Optional fields: full_name, email.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"full_name\": \"Asha Mwalimu\",\n  \"email\": \"asha@example.com\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Change password",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/me/password",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "me",
                "password"
              ]
            },
            "description": "Returns a fresh access_token; other devices are signed out. Save the new token.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"current_password\": \"{{password}}\",\n  \"new_password\": \"password1234\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"ok\", () => pm.expect(pm.response.code).to.eql(200));",
                  "const j = pm.response.json();",
                  "if (j.access_token) { pm.environment.set(\"access_token\", j.access_token); pm.collectionVariables.set(\"access_token\", j.access_token); }"
                ]
              }
            }
          ]
        },
        {
          "name": "Member dashboard",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/me/dashboard",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "me",
                "dashboard"
              ]
            },
            "description": "Home summary: games, next dues, unread_notifications, reliability.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "My games",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/me/games",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "me",
                "games"
              ]
            },
            "description": "Games I belong to, with next_due when present.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const j = pm.response.json();",
                  "const g = (j.games || [])[0];",
                  "if (g) {",
                  "  pm.environment.set(\"game_id\", g.game_id || g.id);",
                  "  if (g.next_due && g.next_due.obligation_id) pm.environment.set(\"obligation_id\", g.next_due.obligation_id);",
                  "  if (g.membership_id) pm.environment.set(\"membership_id\", g.membership_id);",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "My payments",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/me/payments",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "me",
                "payments"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "My notifications",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/me/notifications",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "me",
                "notifications"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const n = (pm.response.json().notifications || []).find(x => !x.read_at);",
                  "if (n) pm.environment.set(\"notification_id\", n.notification_id || n.id);"
                ]
              }
            }
          ]
        },
        {
          "name": "Mark notification read",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/me/notifications/{{notification_id}}/read",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "me",
                "notifications",
                "{{notification_id}}",
                "read"
              ]
            },
            "description": "Marks one notification read.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Mark all notifications read",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/me/notifications/read-all",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "me",
                "notifications",
                "read-all"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "03 Games (discover & join)",
      "description": "Member + kijumbe flows.",
      "item": [
        {
          "name": "Discover games",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/games?q=",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "games"
              ],
              "query": [
                {
                  "key": "q",
                  "value": "",
                  "description": "Optional search"
                }
              ]
            },
            "description": "Open groups for enrolment.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Get game",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/games/{{game_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "games",
                "{{game_id}}"
              ]
            },
            "description": "Full game view for caller context.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Create game (GAME_ADMIN)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/games",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "games"
              ]
            },
            "description": "Requires GAME_ADMIN or SUPER_ADMIN. frequency: DAILY|WEEKLY|MONTHLY. payout_order: FIXED|RANDOM|BID.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Upatu Wa Mtaa\",\n  \"description\": \"Weekly contributions for our street group\",\n  \"contribution_amount\": 50000,\n  \"member_limit\": 10,\n  \"frequency\": \"WEEKLY\",\n  \"payout_order\": \"FIXED\",\n  \"start_at\": \"2026-12-08T11:39:46.063Z\",\n  \"grace_hours\": 24,\n  \"late_fee\": 5000,\n  \"publish\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"status ok\", () => pm.expect(pm.response.code).to.be.oneOf([200, 201]));",
                  "const j = pm.response.json();",
                  "const id = j.game_id || j.id;",
                  "if (id) { pm.collectionVariables.set(\"game_id\", id); pm.environment.set(\"game_id\", id); }",
                  "if (j.public_game_code) pm.environment.set(\"public_game_code\", j.public_game_code);"
                ]
              }
            }
          ]
        },
        {
          "name": "Update game",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/games/{{game_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "games",
                "{{game_id}}"
              ]
            },
            "description": "Optional fields. Rule fields locked after members join.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Upatu Wa Mtaa\",\n  \"description\": \"Updated rules note\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Set game status",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/games/{{game_id}}/status",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "games",
                "{{game_id}}",
                "status"
              ]
            },
            "description": "DRAFT, OPEN_FOR_ENROLMENT, READY_TO_START, ACTIVE, PAUSED, UNDER_REVIEW, COMPLETED, CANCELLED (allowed transitions only).",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"status\": \"OPEN_FOR_ENROLMENT\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Start game",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/games/{{game_id}}/start",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "games",
                "{{game_id}}",
                "start"
              ]
            },
            "description": "Creates obligations and activates the group.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Join game",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/games/{{game_id}}/memberships",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "games",
                "{{game_id}}",
                "memberships"
              ]
            },
            "description": "accept_rules_version must match current rules_version.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"accept_rules_version\": 1\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const j = pm.response.json();",
                  "if (j.membership_id || j.id) pm.environment.set(\"membership_id\", j.membership_id || j.id);"
                ]
              }
            }
          ]
        },
        {
          "name": "Leave game",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/games/{{game_id}}/memberships/me",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "games",
                "{{game_id}}",
                "memberships",
                "me"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Remove member (manager)",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/games/{{game_id}}/members/{{membership_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "games",
                "{{game_id}}",
                "members",
                "{{membership_id}}"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Cancel game",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/games/{{game_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "games",
                "{{game_id}}"
              ]
            },
            "description": "Manager cancel with reason.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reason\": \"Group agreed to stop\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "List members",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/games/{{game_id}}/members",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "games",
                "{{game_id}}",
                "members"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "List obligations",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/games/{{game_id}}/obligations",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "games",
                "{{game_id}}",
                "obligations"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const o = (pm.response.json().obligations || []).find(x => x.status === \"DUE\" || x.status === \"OVERDUE\");",
                  "if (o) pm.environment.set(\"obligation_id\", o.obligation_id || o.id);"
                ]
              }
            }
          ]
        },
        {
          "name": "Payout schedule",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/games/{{game_id}}/schedule",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "games",
                "{{game_id}}",
                "schedule"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Rule versions",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/games/{{game_id}}/rules",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "games",
                "{{game_id}}",
                "rules"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Game payments",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/games/{{game_id}}/payments",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "games",
                "{{game_id}}",
                "payments"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Game payouts",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/games/{{game_id}}/payouts",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "games",
                "{{game_id}}",
                "payouts"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Managed games (kijumbe)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/games/managed",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "games",
                "managed"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Game report",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/reports/games/{{game_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "reports",
                "games",
                "{{game_id}}"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Ledger CSV",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/reports/games/{{game_id}}/ledger.csv",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "reports",
                "games",
                "{{game_id}}",
                "ledger.csv"
              ]
            },
            "description": "text/csv download for managers/admins.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "04 Payments",
      "description": "Mobile money intents + receipts.",
      "item": [
        {
          "name": "Create payment intent",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/payments/intents",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "payments",
                "intents"
              ]
            },
            "description": "Starts STK/push (or mock). Reuse same idempotency_key to replay. Returns payment + PIN instructions.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"obligation_id\": \"{{obligation_id}}\",\n  \"idempotency_key\": \"{{$guid}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"created or replay\", () => pm.expect(pm.response.code).to.be.oneOf([200, 201]));",
                  "const p = pm.response.json().payment;",
                  "if (p) pm.environment.set(\"payment_id\", p.payment_id || p.id);"
                ]
              }
            }
          ]
        },
        {
          "name": "Get payment",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/payments/{{payment_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "payments",
                "{{payment_id}}"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Payment receipt",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/payments/{{payment_id}}/receipt",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "payments",
                "{{payment_id}}",
                "receipt"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Provider webhook (server)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/payments/provider-webhook",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "payments",
                "provider-webhook"
              ]
            },
            "description": "Gateway callback. Mobile apps do not call this.",
            "auth": {
              "type": "noauth"
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"note\": \"Provider-signed payload; not for the mobile app.\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Selcom webhook (server)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/payments/webhook/selcom/{{selcom_webhook_token}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "payments",
                "webhook",
                "selcom",
                "{{selcom_webhook_token}}"
              ]
            },
            "description": "Selcom callback path. Mobile apps do not call this.",
            "auth": {
              "type": "noauth"
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "05 Payouts",
      "description": "Request (kijumbe) / approve (super admin).",
      "item": [
        {
          "name": "Request payout",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/games/{{game_id}}/payouts",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "games",
                "{{game_id}}",
                "payouts"
              ]
            },
            "description": "Kijumbe requests current cycle payout.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const j = pm.response.json();",
                  "const id = j.payout_id || j.id;",
                  "if (id) pm.environment.set(\"payout_id\", id);"
                ]
              }
            }
          ]
        },
        {
          "name": "Get payout",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/payouts/{{payout_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "payouts",
                "{{payout_id}}"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Approve payout (SUPER_ADMIN)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/payouts/{{payout_id}}/approve",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "payouts",
                "{{payout_id}}",
                "approve"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Mark payout paid (SUPER_ADMIN)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/admin/payouts/{{payout_id}}/mark-paid",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "payouts",
                "{{payout_id}}",
                "mark-paid"
              ]
            },
            "description": "Manual release after hand payment / M-Pesa ref.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"provider_reference\": \"MPESA-QX12\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "06 Withdrawals",
      "description": "",
      "item": [
        {
          "name": "Request withdrawal",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/memberships/{{membership_id}}/withdrawal-requests",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "memberships",
                "{{membership_id}}",
                "withdrawal-requests"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reason\": \"Moving to another group\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "My withdrawal requests",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/me/withdrawal-requests",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "me",
                "withdrawal-requests"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Game withdrawal requests",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/games/{{game_id}}/withdrawal-requests",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "games",
                "{{game_id}}",
                "withdrawal-requests"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Decide withdrawal",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/withdrawal-requests/{{withdrawal_id}}/decision",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "withdrawal-requests",
                "{{withdrawal_id}}",
                "decision"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"approve\": true,\n  \"note\": \"Approved by kijumbe\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Cancel withdrawal",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/withdrawal-requests/{{withdrawal_id}}/cancel",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "withdrawal-requests",
                "{{withdrawal_id}}",
                "cancel"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "07 Claims",
      "description": "",
      "item": [
        {
          "name": "Create claim",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/games/{{game_id}}/claims",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "games",
                "{{game_id}}",
                "claims"
              ]
            },
            "description": "category: PAYMENT | PAYOUT | PENALTY | MEMBER_CONDUCT | OTHER",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"category\": \"PAYMENT\",\n  \"description\": \"Contribution was deducted twice from my wallet\",\n  \"related_payment_id\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const j = pm.response.json();",
                  "if (j.claim_id || j.id) pm.environment.set(\"claim_id\", j.claim_id || j.id);"
                ]
              }
            }
          ]
        },
        {
          "name": "My claims",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/me/claims",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "me",
                "claims"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Game claims",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/games/{{game_id}}/claims",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "games",
                "{{game_id}}",
                "claims"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Claims queue (manager/admin)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/claims/queue",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "claims",
                "queue"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Get claim",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/claims/{{claim_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "claims",
                "{{claim_id}}"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Update claim (manager)",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/claims/{{claim_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "claims",
                "{{claim_id}}"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"status\": \"IN_REVIEW\",\n  \"resolution\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Add claim message",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/claims/{{claim_id}}/messages",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "claims",
                "{{claim_id}}",
                "messages"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"message\": \"Here is the M-Pesa SMS screenshot reference\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Appeal claim",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/claims/{{claim_id}}/appeal",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "claims",
                "{{claim_id}}",
                "appeal"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reason\": \"Resolution did not match the evidence provided\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "08 Penalties",
      "description": "",
      "item": [
        {
          "name": "My penalties",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/me/penalties",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "me",
                "penalties"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Game penalties",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/games/{{game_id}}/penalties",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "games",
                "{{game_id}}",
                "penalties"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Waive penalty (manager)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/penalties/{{penalty_id}}/waive",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "penalties",
                "{{penalty_id}}",
                "waive"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reason\": \"First late payment waived by group agreement\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "09 Deposits",
      "description": "Security deposits (kijumbe).",
      "item": [
        {
          "name": "Create deposit",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/games/{{game_id}}/deposits",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "games",
                "{{game_id}}",
                "deposits"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"user_id\": \"{{user_id}}\",\n  \"amount\": 100000,\n  \"provider_reference\": \"DEP-001\",\n  \"release_condition\": \"Returned when member completes all cycles\",\n  \"note\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Game deposits",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/games/{{game_id}}/deposits",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "games",
                "{{game_id}}",
                "deposits"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "My deposits",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/me/deposits",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "me",
                "deposits"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Update deposit",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/deposits/{{deposit_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "deposits",
                "{{deposit_id}}"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"status\": \"HELD\",\n  \"provider_reference\": \"DEP-001\",\n  \"note\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "10 KYC",
      "description": "",
      "item": [
        {
          "name": "Submit KYC",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/me/kyc",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "me",
                "kyc"
              ]
            },
            "description": "document_type: NIDA | VOTER_ID | PASSPORT | DRIVING_LICENCE",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"document_type\": \"NIDA\",\n  \"reference\": \"19800101123456789012\",\n  \"provider\": \"MANUAL\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "My KYC history",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/me/kyc",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "me",
                "kyc"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "KYC queue (SUPER_ADMIN)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/admin/kyc?status=PENDING",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "kyc"
              ],
              "query": [
                {
                  "key": "status",
                  "value": "PENDING",
                  "description": ""
                }
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Review KYC (SUPER_ADMIN)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/admin/kyc/{{kyc_id}}/review",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "kyc",
                "{{kyc_id}}",
                "review"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"approve\": true,\n  \"note\": \"Matches NIDA\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "11 Reliability",
      "description": "",
      "item": [
        {
          "name": "My reliability",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/me/reliability",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "me",
                "reliability"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "My reliability history",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/me/reliability/history",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "me",
                "reliability",
                "history"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Appeal my score",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/me/reliability/appeal",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "me",
                "reliability",
                "appeal"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"note\": \"Late payment was caused by network outage on payday\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "User reliability",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/users/{{user_id}}/reliability",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "users",
                "{{user_id}}",
                "reliability"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Appeals queue (SUPER_ADMIN)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/admin/reliability/appeals",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "reliability",
                "appeals"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Resolve appeal (SUPER_ADMIN)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/admin/reliability/{{score_id}}/appeal",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "reliability",
                "{{score_id}}",
                "appeal"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"accept\": true,\n  \"note\": \"Accepted\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "12 Realtime",
      "description": "Centrifugo tokens for live updates.",
      "item": [
        {
          "name": "Connection token",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/realtime/token",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "realtime",
                "token"
              ]
            },
            "description": "Returns ws_url, token, personal_channel.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Game channel token",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/realtime/games/{{game_id}}/token",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "realtime",
                "games",
                "{{game_id}}",
                "token"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "13 Admin",
      "description": "SUPER_ADMIN (and some manager) ops.",
      "item": [
        {
          "name": "Admin dashboard",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/admin/dashboard",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "dashboard"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "List users",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/admin/users?q=&role=&status=&limit=50",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "users"
              ],
              "query": [
                {
                  "key": "q",
                  "value": "",
                  "description": ""
                },
                {
                  "key": "role",
                  "value": "",
                  "description": ""
                },
                {
                  "key": "status",
                  "value": "",
                  "description": ""
                },
                {
                  "key": "limit",
                  "value": "50",
                  "description": ""
                }
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Get user",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/admin/users/{{user_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "users",
                "{{user_id}}"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Set user status",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/admin/users/{{user_id}}/status",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "users",
                "{{user_id}}",
                "status"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"status\": \"SUSPENDED\",\n  \"reason\": \"Abuse reports\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Grant role",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/admin/users/{{user_id}}/roles",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "users",
                "{{user_id}}",
                "roles"
              ]
            },
            "description": "role: GAME_ADMIN | SUPER_ADMIN",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"role\": \"GAME_ADMIN\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Revoke role",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/admin/users/{{user_id}}/roles/GAME_ADMIN",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "users",
                "{{user_id}}",
                "roles",
                "GAME_ADMIN"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Admin games",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/admin/games?status=",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "games"
              ],
              "query": [
                {
                  "key": "status",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Payout queue",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/admin/payouts?status=REQUESTED",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "payouts"
              ],
              "query": [
                {
                  "key": "status",
                  "value": "REQUESTED",
                  "description": ""
                }
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Audit logs",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/admin/audit-logs",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "audit-logs"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "List integrations",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/admin/integrations",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "integrations"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Save integration",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/admin/integrations/{{integration_name}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "integrations",
                "{{integration_name}}"
              ]
            },
            "description": "name path: selcom | sms | whatsapp. Blank secret keeps saved key.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"enabled\": true,\n  \"values\": {\n    \"base_url\": \"https://example.invalid/api\",\n    \"api_key\": \"replace-me\"\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Test integration",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/admin/integrations/{{integration_name}}/test",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "integrations",
                "{{integration_name}}",
                "test"
              ]
            },
            "description": "",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{access_token}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "14 Dev only",
      "description": "Enabled when app.env=dev. Do not ship to production mobile builds.",
      "item": [
        {
          "name": "Mock provider callback",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "url": {
              "raw": "{{host}}/dev/mock-provider/callback/{{payment_reference}}",
              "host": [
                "{{host}}"
              ],
              "path": [
                "dev",
                "mock-provider",
                "callback",
                "{{payment_reference}}"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Simulates successful provider callback for a payment reference."
          },
          "response": []
        },
        {
          "name": "Sweep overdue",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "url": {
              "raw": "{{host}}/dev/sweep-overdue",
              "host": [
                "{{host}}"
              ],
              "path": [
                "dev",
                "sweep-overdue"
              ]
            },
            "description": "Runs MarkOverdue once."
          },
          "response": []
        }
      ]
    }
  ]
}