Claim commission
LivePOST
/api/v1/affiliate/claimMoves the member's entire accumulated commission into the wallet immediately (atomic) — no request body.
The claimed amount shows up in the transaction history as an AFFILIATE entry.
Headers
| Field | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Used — send Bearer <member access_token> |
| X-Api-Key | string | Yes | Agent API key (ak_…) from the bo screen |
| X-Timestamp | string | Yes | Signing time in unix milliseconds (±300s skew allowed) |
| X-Nonce | string | Yes | Unique per-request value (UUIDv4) for replay protection |
| X-Signature | string | Yes | hex(HMAC-SHA256(secret, canonical)) — see the Authentication page |
| X-Player-IP | string | — | The player's real IP (IPv4/IPv6) — recommended (used in login history) |
| X-Player-UA | string | — | The player's User-Agent (optional — recorded in login history) |
| X-Request-Id | string | — | Your correlation id — echoed back as request_uuid (recommended) |
| x-lang | string | — | th (default) or en — the language of message |
Response
Fields in data
| Field | Type | Required | Description |
|---|---|---|---|
| amount | string | — | Commission credited to the wallet this time (THB, string) |
| balance | string | — | Wallet balance after the credit (THB, string) |
Response example
{
"success": true,
"code": 0,
"message": "สำเร็จ",
"data": {
"amount": "245.75",
"balance": "421.25"
},
"request_uuid": "f1d8b3c6-7e42-4a09-95bd-2c8e6f0a3d71"
}Possible error codes
| code | Name | HTTP | Message |
|---|---|---|---|
| 6101 | AFFILIATE_NOTHING_TO_CLAIM | 400 | No affiliate commission to claimThere is no unclaimed commission |
| 6102 | AFFILIATE_BELOW_MIN_CLAIM | 400 | Affiliate balance is below the minimum claim amountThe accumulated amount is below the agent's minimum claim threshold |
| 6103 | AFFILIATE_NOT_ENABLED | 400 | Refer-a-friend program is not enabledThe agent has the refer-a-friend program disabled, or the member is under a SEAMLESS-wallet agent (both cases show enabled = false on the summary page) |
| 9002 | SERVICE_UNAVAILABLE | 503 | Service unavailableThe payment system is temporarily unavailable — the balance is untouched, retry later |
| 1001 | UNAUTHORIZED | 401 | Unauthorized |
| 1007 | TOKEN_INVALID | 401 | Token invalid |