How it works
A thin proxy in front of Betway's real API.
Nothing here is mocked. Every action calls Betway's own booking-code API, live, the same one betway.com.ng itself calls.
01 — The shape
A Betway booking code is a short ID for a bet-slip cart. Betway's backend turns a list of selections (match, market, pick) into a code. Pasting the code back into Betway restores that cart. One Nuxt project holds the whole thing: app/ is the UI, server/api/* is the backend, in one deployable. There is no database and no auth. Betway is the only source of truth.
02 — The three actions
Decode
GET /api/slip/:codeProxies Betway's FindBookABet. No account, no cookies, no headless browser. Works with a plain server-to-server request.
Encode
POST /api/slipCalls Betway's real BookABet with a rich per-outcome object (value, selected, payment, and a handful of boolean flags Betway's own frontend sends), not a bare outcome-ID list. Also no account needed.
Convert
POST /api/convert/:codeResolves the given code, then feeds its selections straight into the same encode path. Resolve, then create, on the same selections.
03 — The trickiest decision
The first real investigation into create/encode concluded, with good evidence, that Betway needed an authenticated account: sibling endpoints failed the same generic way, and 63 catalogued frontend chunks never showed a dedicated "mint a code" call. That conclusion was wrong. The real blocker was a payload shape, a rich object per outcome that nothing in Betway's own frontend exposed. The real shape turned up in a public GitHub repository (ronnynkhori/tipster), reverse-engineered by someone else. Once tested against the real endpoint, it worked immediately, no account, a real code, resolved back successfully.
The full trail, including the wrong conclusion, stays on record in doc/02-betway-api.md, not deleted once corrected.
04 — Full documentation
Every block of this build has its own doc, committed alongside the code that block added. The full set lives in /doc on GitHub.
00-overview.mdArchitecture, build plan, decision log01-nuxt-scaffold.mdWhat was reused from the matchcorner prototype02-betway-api.mdThe full Betway API investigation, including the wrong turn03-resolve-endpoint.mdThe resolve endpoint04-decode-ui.mdThe decode UI05-create-convert.mdCreate and convert, with screenshot proof