requestId.Authorization: Bearer {token}LOTTO_CREATE_TICKET)LOTTO/g/lotto, so system maintenance and Lotto's own maintenance window both answer 503 99915.requestId, roomId, roundId (lower-case d); the returned ticket id is betID (capital ID).requestId is a client-generated idempotency key, unique per player (not per round). After a timeout or a dropped connection, resend the SAME requestId to get the same ticket back with no second debit. Use a new one for every new ticket: an old one returns the old ticket (200) and places nothing, even in a later round or with a different body.balance is the balance at the original debit, and rate / isLucky / potentialWin are recomputed from the current lucky number, so after the round settles they can differ from the first response.99964 means another request with the same requestId is in progress; retry with the same requestId to receive that ticket.betType + number (exact strings: 3-TOAD "917" and "179" are different; 3-BOTTOM "917" plus 3-TOAD "917" is allowed).amount > 0 and ≥ the room minimum (limits.minPerItem). The round-wide total on one bet type + number across all players must stay ≤ limits.maxPerNumber (equal is allowed).totalAmount, amount and potentialWin are JSON numbers but balance is a decimal string.potentialWin = amount × rate truncated to 2 decimals (gross, stake included). isLucky is true only for 2-BOTTOM lines on the current lucky number, and their rate includes the lucky multiplier.99942.createdAt: a fresh create returns the server's local time offset with nanoseconds; a replay returns UTC with milliseconds. Parse it as a date.99911 with a description listing the fields, e.g. requestId is required; betType is required.requestId, return it (no new debit).betting), the game's availability and the room.seed_slot_updated; a failed claim never fails the ticket.curl --location 'https://dev-api.ambfairgame.com/gapi/v1/gapi/v1/g/lotto/tickets/create?token=8d0c6a4e2b9f4f1c9a7e3b5d1c2e4f60' \
--header 'Authorization: Bearer 3f9a1c7e5b2d4f6081a3c5e7f9b1d3f5a7c9e1b3d5f7a9c1e3b5d7f9a1c3e5b7' \
--header 'Accept-Language: th' \
--header 'Content-Type: application/json' \
--data '{
"requestId": "c1b8f0e2-6a4d-4f7e-9b3a-2d5c8e1f0a97",
"roomId": 1,
"roundId": "tm64903fa91c2e",
"items": [
{
"betType": "2-BOTTOM",
"number": "17",
"amount": 10
},
{
"betType": "3-TOAD",
"number": "358",
"amount": 5
},
{
"betType": "1-TOP",
"number": "9",
"amount": 20
}
]
}'{
"code": "0",
"description": "Success.",
"traceID": "0f8e2c1a-6b3d-4e5f-9a7b-1c2d3e4f5a6b",
"data": {
"betID": "2_1001_tm64903fa91c2e_9f1c0b7a4d2e6f8a1b3c5d7e9f0a2b4c",
"createdAt": "2026-09-30T08:07:31.482915Z",
"totalAmount": 35,
"balance": "965",
"items": [
{
"betType": "2-BOTTOM",
"number": "17",
"amount": 10,
"rate": 360,
"isLucky": true,
"potentialWin": 3600
},
{
"betType": "3-TOAD",
"number": "358",
"amount": 5,
"rate": 150,
"isLucky": false,
"potentialWin": 750
},
{
"betType": "1-TOP",
"number": "9",
"amount": 20,
"rate": 3,
"isLucky": false,
"potentialWin": 60
}
]
}
}