Download OpenAPI specification:
The excalibur game-side API that the GAGA Web Shop calls.
Language: ไทย · English
The game-side API the GAGA Web Shop (gaga-portal-be) calls to list servers and characters,
deliver what players buy into the game, and redeem gift codes.
Scope:
excaliburonly, for now · every other game that connects to the GAGA Web Shop should implement this spec as the standard (same paths · fields ·md5str·status), differing only in its host and secretStatus: drafted from the endpoint list the customer sent · anything marked ⚠️ TBD still needs the game team to confirm — see Open questions below
| Term | Meaning | On the GAGA side |
|---|---|---|
xluserid |
The player's account on the GAGA platform | GAGA ID (users.gagaId), e.g. THGG327120152161 |
aid |
The player's account id inside the game | game_accounts.accountUid (not stored yet) |
cid |
One character inside the game | game_accounts.characterUid · Funtap role_id |
sid |
A game server | Funtap server_id = excalibur_s<sid> |
orderid |
One Web Shop order | orders.externalOrderId, e.g. EXC-… |
| GAGA flow | Calls |
|---|---|
Web Shop (paid through ChillPay): pick a server + character when buying a DIRECT package · bind a character · Funtap: Get servers and checking server_id on every call |
Get server list |
| Funtap Find role · binding a character on the Web Shop | Query character |
Delivering a DIRECT package (paid through ChillPay or Funtap) |
Fulfil an order |
| Rewards that are not purchases (events · compensation) | Send mail with items |
| Redeem codes (not built yet) | Redeem a gift code |
status · "1" = success · other values ⚠️ TBDmd5str and carry time (unix seconds, ±300 s) —
formula and secret ⚠️ TBDorders on orderid, sendmail on refid (proposed) ·
a repeat must answer success without delivering againGET · write = POST) ⚠️ TBDmd5str formula: which fields · in which order · with which secretstatus value and what it means · the response body of endpoints 2–5role/query: which type values it accepts · how many characters it returns · can it take a
GAGA ID and return a list (the proposed type=gagaid)?role/orders: what a repeated orderid returns — it must answer success without delivering again,
not an error · what productid maps to on your side · what price / currency / payment are
used for · can it take a quantity · can it accept the proposed promotionid / originalprice /
discount (GAGA already sends them, inside md5str)?role/sendmail: the allowed <Type> values in items · how many items per call ·
can it de-duplicate on the proposed refid (same rule as orderid)?role/giftcode: can it take the optional productid / items for codes GAGA created · can it return
what it granted · which status tells "no such code" / "already used" / "expired" apart?time and refuse a request more than 300 s old? Which status for that?server/list, role/query): role/query returns a
player's accounts and characters, so it should not be open. We propose an IP allow-list at
minimum (GAGA sends its egress IPs per environment), and ideally the same md5str + time
as the write endpoints. Which can you support?Every server of the game, with the name players see.
Used by GAGA:
| Where | What for |
|---|---|
Web Shop (paid through ChillPay) — GraphQL gameServers |
The server picker when a player binds a character, and when buying a DIRECT package after pre-registration closes (no DIRECT is sold during pre-registration) |
Web Shop — binding a character (bindGameCharacter) |
Checks that the sid the player picked exists |
| Funtap Get servers (after pre-registration closes) | Lists every sid to Funtap as excalibur_s<sid>, with the game's own name |
| Funtap Find role · List item · Check item | Checks that the sid in Funtap's server_id is still listed, or refuses it |
| status required | string (GameStatus)
|
required | Array of objects (Server) |
{- "status": "1",
- "servers": [
- {
- "sid": "1",
- "name": "Server1"
}, - {
- "sid": "2",
- "name": "Server2"
}
]
}Looks a player up by an in-game id and returns the owner's GAGA account (xluserid).
Used by GAGA: to confirm whose character a cid is before delivering to it · when a player
binds a character, GAGA sends type=cid and compares xluserid with the binder's GAGA ID; only a
match is saved to game_accounts
We ask the game team to also accept type=gagaid and return every character of that account
across servers, so the Web Shop and Funtap can offer a character picker without the player typing
a cid:
GET /gmtool/role/query?type=gagaid&data=THGG327120152161
→ { "status": "1", "characters": [ { "xluserid", "aid", "cid", "sid", "name" }, … ] }
GAGA checks the GAGA ID pattern (country · kind · Damm check digit) before choosing type.
| type required | string Enum: "aid" "cid" "gagaid" Example: type=cid Which id |
| data required | string Example: data=10023 The id to look up |
| status required | string (GameStatus)
|
| xluserid | string (XlUserId) The player's GAGA ID ( |
| sid | string (Sid) The game server id, as the server list returns it |
| name | string The character's name · without it GAGA uses the |
Array of objects (Character) Proposed — every character found (one for |
{- "status": "1",
- "xluserid": "THGG327120152161",
- "sid": "1",
- "name": "Arthur"
}Deliver what a player bought on the Web Shop · idempotent on orderid, so a retry never delivers twice
Delivers what a player bought on the Web Shop (items or G Coin) to one character. The most important endpoint for Web Shop purchases.
Used by GAGA: delivery of every DIRECT package, whether paid through ChillPay (our site)
or Funtap · one call per order
Idempotent on orderid: we send orders.externalOrderId and may call again for the same order
after a timeout, or from the retry pass (every 10 minutes, for up to 24 hours) · a repeated orderid
must answer success without delivering again
| xluserid required | string (XlUserId) The player's GAGA ID ( |
| sid required | string (Sid) The game server id, as the server list returns it |
| cid required | string (Cid) The character id inside the game |
| orderid required | string Our order number — the game's de-duplication key |
| productid required | string What was bought — the package SKU ( |
| price required | string What was paid for the whole order, in major units with the currency's decimals —
|
| currency required | string ISO 4217 currency code |
| payment required | string Who collected the money — |
| promotionid | string (Proposed) The promotion the package was sold through ( |
| originalprice | string (Proposed) The whole order's full price before the discount, in major units like |
| discount | string (Proposed) The whole order's discount in major units = |
| time required | string (Time) ^\d{10}$ (Proposed) Unix timestamp in seconds when GAGA sent the request · part of |
| md5str required | string (Md5Str) The request signature · formula and secret ⚠️ TBD by the game team · until then GAGA sends
|
| status required | string (GameStatus)
|
| message | string Why it failed, when it did |
xluserid=THGG327120152161&sid=1&cid=10023&orderid=EXC-20261008-7F3K2Q&productid=gcoin_500&price=100000¤cy=VND&payment=funtap_s2s&promotionid=6aa00dda4ba751e268914a54&originalprice=120000&discount=20000&time=1791360000&md5str=%3CTBD%3E
{- "status": "1"
}Sends an in-game mail carrying items to one character — for rewards that are not purchases (events · compensation) · purchases go through Fulfil an order
Used by GAGA: not yet — no flow needs it
| uid required | string (XlUserId) The player's GAGA account — the same value as |
| sid required | string (Sid) The game server id, as the server list returns it |
| cid required | string (Cid) The character id inside the game |
| title required | string The mail's subject |
| body required | string The mail's text |
| items required | string (ItemList) ^\d+:\w+:\d+(,\d+:\w+:\d+)*$ Comma-separated |
| refid required | string (RefId) <= 64 characters (Proposed) GAGA's id for this mail — the game's de-duplication key, same rule as |
| time required | string (Time) ^\d{10}$ (Proposed) Unix timestamp in seconds when GAGA sent the request · part of |
| md5str required | string (Md5Str) The request signature · formula and secret ⚠️ TBD by the game team · until then GAGA sends
|
| status required | string (GameStatus)
|
| message | string Why it failed, when it did |
uid=THGG327120152161&sid=1&cid=10023&title=Event%20reward&body=Thank%20you%20for%20joining%20the%20launch%20event%21&items=1%3A1001%3A5%2C1%3A2002%3A1&refid=EVT-LAUNCH-2026-000123&time=1791360000&md5str=%3CTBD%3E
{- "status": "1"
}Validates a promotional serial code and gives its in-game rewards to one character. Important for marketing events.
Used by GAGA: planned — the Web Shop does not redeem codes through the game yet
| Case | Send productid / items |
What the game does |
|---|---|---|
| The game created the code, or GAGA already exported it to the game | No | Validates the code and grants what it already knows |
| GAGA created the code and the game does not know what it grants | One of the two | Checks the code is unused, then grants what GAGA sent |
If both are sent the game should refuse · GAGA validates the code on its side before every call — what it sends never comes from the player
| xluserid required | string (XlUserId) The player's GAGA ID ( |
| sid required | string (Sid) The game server id, as the server list returns it |
| cid required | string (Cid) The character id inside the game |
| code required | string The serial code the player entered |
| productid | string (Optional · proposed) For a code GAGA created that grants a whole package — the package
SKU ( |
| items | string (ItemList) ^\d+:\w+:\d+(,\d+:\w+:\d+)*$ (Optional · proposed) For a code GAGA created that grants individual items · leave it out for a code the game already knows |
| time required | string (Time) ^\d{10}$ (Proposed) Unix timestamp in seconds when GAGA sent the request · part of |
| md5str required | string (Md5Str) The request signature · formula and secret ⚠️ TBD by the game team · until then GAGA sends
|
| status required | string (GameStatus)
|
| message | string Why it failed, when it did |
| items | string (ItemList) ^\d+:\w+:\d+(,\d+:\w+:\d+)*$ (Proposed) What was actually granted |
xluserid=THGG327120152161&sid=1&cid=10023&code=EXCAL-LAUNCH-2026&time=1791360000&md5str=%3CTBD%3E
{- "status": "1",
- "items": "1:1001:5,1:2002:1"
}