1 USD ≈ 27,000 credits · display only
Reference rate may change over time.
1 USD ≈ 27,000 credits · display only
Reference rate may change over time.
Gommo Developer is an API platform — your users authenticate with Gommo user tokens; your server holds merchant and admin secrets. This page covers what must stay private and how the gateway handles sensitive data.
Browser / mobile app Your server (optional) Gommo upstream
───────────────────── ───────────────────── ──────────────
User email/password → (proxy login optional) → api.gommo.net
User access_token → Bearer on v2 + platform → v2.api.gommo.net + api.gommo.net
(optional self-host API — Deploy advanced)
GOMMO_ACCESS_TOKEN → /admin, billing fulfill
ADMIN_API_KEY → protects /admin/*
PayOS keys (legacy) → webhook verify onlyRule: anything in the right column of server-only secrets must never ship to browsers, mobile apps, or public repos.
| Credential | Where it lives | Exposed to clients? | Used for |
|---|---|---|---|
User access_token | Client storage (after login) | Yes — Bearer header | Gommo public API (v2.api.gommo.net, api.gommo.net) |
| User password | Login form only | Never store long-term | One-time login via proxy |
GOMMO_ACCESS_TOKEN | Server .env / secrets | Never | /admin/*, Gommo billing fulfill, credit_plans sync |
ADMIN_API_KEY | Server .env / secrets | Never | Header x-admin-key on /admin/* |
| PayOS keys (legacy) | Server .env | Never | Legacy PayOS topup only |
See Authentication for login flow.
The optional self-host API does not return or accept merchant secrets in client responses:
GOMMO_ACCESS_TOKENADMIN_API_KEYchecksumKey or API secretsBilling uses user Bearer + username — fulfillment calls merchant APIs inside the server process. Details → Deploy → Self-host (advanced).
/admin is server-only All /admin/* routes require x-admin-key: {ADMIN_API_KEY} when configured. Intended for:
If ADMIN_API_KEY is unset, admin routes return 503 NOT_CONFIGURED.
Never in frontend code
Do not embed ADMIN_API_KEY or GOMMO_ACCESS_TOKEN in SPAs, React Native bundles, or public GitHub repos.
Credit topup flow (Gommo bank transfer):
POST /billing/payment/create (user Bearer).POST /billing/payment/sync (or gateway background sync) until paid.sendCreditsToUser() — no client involvement in merchant APIs.Requirements:
GOMMO_ACCESS_TOKEN configured for fulfillment and live package sync (GET /billing/packages).orderCode) must match exactly — users should not edit it.See Billing & credits.
Legacy PayOS topup (POST /billing/topup/create) is still supported when PayOS env is set:
POST /billing/topup/create (user Bearer)./billing/webhook/payos with signed payload.PAYOS_CHECKSUM_KEY.PAID, internal credit fulfillment.Requirements:
PAYOS_WEBHOOK_URL must be a public HTTPS URL pointing to your API.Do log (operations):
code (not raw upstream secrets)GET /health for uptime checksDo not log:
GOMMO_ACCESS_TOKEN, ADMIN_API_KEY, PayOS keysAuthorization headers in productionUser prompts and media URLs may appear in upstream logs on Gommo's side — treat per your privacy policy and Gommo terms.
CORS is off by default (GATEWAY_CORS_ORIGIN empty). When enabled:
credentials: true — use explicit origins, not * in production unless you understand the risk.User tokens in browser localStorage/sessionStorage are your app's responsibility — use HTTPS, short TTL, and secure logout.
Dev playground at /portal/ is disabled in production unless GATEWAY_PORTAL=true.
The portal can run authenticated API tests — exposing it publicly increases attack surface. Prefer internal VPN or dev-only deploys.
| Practice | Why |
|---|---|
Copy from .env.example, never commit .env | Prevents secret leaks |
| Use platform secrets (Railway/Fly) in prod | Rotation without git history |
| Rotate tokens if accidentally shared | Merchant + admin keys |
| Separate dev/prod merchant tokens if possible | Blast radius |
After sendBalances, Gommo requires merchant balance > 500,000 credits — that is the rule the gateway enforces. Optional env TOPUP_MERCHANT_BUFFER_CREDITS (default 300k) only adds a stricter guard when set above 500k; it is not in .env.example.
→ Report feedback — mark as security; do not paste live tokens in public issues.