Fizz Terminal API¶
This API is for kiosks and cashier terminals. It covers player creation, login, balances, deposits and withdrawals, promo codes and Fizz Crew invite codes.
Base URL¶
All endpoints live under /api on the Fizz backend:
Request format¶
Every POST endpoint accepts either JSON or form data:
In JSON, numbers can be sent either as numbers or as strings.
Responses¶
Always check status
Business errors come back as HTTP 200 with "status": "failure". Do not rely on the HTTP code alone.
Terminal and shop¶
The terminal is identified by terminal_ID. Each terminal belongs to a shop, and so does each player. Cashier operations work only when the player belongs to the same shop as the terminal. Otherwise the response is Player not register from this terminal.
Amounts are in the shop currency (Entries). Money for deposits comes from the shop balance, and money from withdrawals goes back to it.
Authentication¶
Most terminal endpoints need no token: the terminal is identified by terminal_ID. Only /api/logout needs the player's JWT from /api/login:
Typical flow¶
sequenceDiagram
participant K as Kiosk
participant B as Fizz backend
opt Player has an invite code
K->>B: POST /api/referrals/check
B-->>K: normalized code
end
opt Player has a promo code
K->>B: POST /api/promo/check
B-->>K: promo terms
end
K->>B: POST /api/signup (deposit_amount, promo_code, invite_code)
B-->>K: player id + PIN
K->>B: POST /api/deposite (later deposits)
K->>B: POST /api/withdraw (cash out)
Endpoints¶
| Method | Path | Page |
|---|---|---|
| POST | /api/signup |
Players |
| POST | /api/login |
Players |
| POST | /api/logout |
Players |
| GET | /api/getbalance |
Balances |
| GET | /api/terminal_balance |
Balances |
| POST | /api/deposite |
Cashier operations |
| POST | /api/withdraw |
Cashier operations |
| POST | /api/refund |
Cashier operations |
| POST | /api/promo/check |
Promo codes |
| POST | /api/referrals/check |
Invite codes |