Callback (TALOS calls you)
Wallet callback
post
{walletUrl}JSON POST to the walletUrl configured on the merchant. Default timeout of 8 s (WALLET_TIMEOUT_MS). Always reply with JSON; HTTP 5xx, a timeout or an invalid body leave the transaction with an unknown result.
Authentication#
TALOS signs the request with your merchant secret, using the same scheme as the API. Check the signature and the time window before touching the balance — see Validating calls from TALOS.
Headers#
| Field | Description |
|---|---|
X-Merchant-Idstringrequired | Merchant code |
X-Timestampstringrequired | Epoch in milliseconds |
X-Noncestringrequired | 32 hex characters, unique per request |
X-Signaturestringrequired | hex(HMAC_SHA256(secret, ${timestamp}.${nonce}.POST.${pathWithQuery}.${rawBody})) |
Body#
application/json
| Field | Description |
|---|---|
action"balance" | "bet" | "win" | "refund" | "rollback"required | — |
player_idstringrequired | Player id at the merchant (the launch player_id) |
currencystringrequired | Merchant currency |
providerstringrequired | Game provider code |
gamestringrequired | Game code |
tx_idstring | Unique transaction id (absent in balance). Idempotency key: the same tx_id must never be applied twice. |
ref_tx_idstring | Only in refund/rollback: tx_id of the reverted bet (refund) or win (rollback) |
round_idstring | Round/bet at the provider (absent in balance) |
amountnumber | Amount in the major currency unit (up to 2 decimals; CLP has no cents). Absent in balance.minimum 0 |
Example#
{
"action": "balance",
"player_id": "user-123",
"currency": "BRL",
"provider": "PGSOFT",
"game": "fortune-tiger"
}{
"action": "bet",
"tx_id": "PGSOFT:982341:bet",
"player_id": "user-123",
"amount": 2.5,
"currency": "BRL",
"round_id": "982341",
"provider": "PGSOFT",
"game": "fortune-tiger"
}{
"action": "win",
"tx_id": "PGSOFT:982341:win",
"player_id": "user-123",
"amount": 10,
"currency": "BRL",
"round_id": "982341",
"provider": "PGSOFT",
"game": "fortune-tiger"
}{
"action": "refund",
"tx_id": "PGSOFT:982341:refund",
"ref_tx_id": "PGSOFT:982341:bet",
"player_id": "user-123",
"amount": 2.5,
"currency": "BRL",
"round_id": "982341",
"provider": "PGSOFT",
"game": "fortune-tiger"
}{
"action": "rollback",
"tx_id": "PGSOFT:982341:rollback",
"ref_tx_id": "PGSOFT:982341:win",
"player_id": "user-123",
"amount": 10,
"currency": "BRL",
"round_id": "982341",
"provider": "PGSOFT",
"game": "fortune-tiger"
}Responses#
200Operation result (any status < 500 with JSON is read from the body)
| Field | Description |
|---|---|
oktruerequired | — |
balancenumberrequired | Player balance AFTER the transaction, in the major currency unit |
errorstringrequired | Error code, e.g. INSUFFICIENT_FUNDS |
Response example
{
"ok": true,
"balance": 0
}