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#

FieldDescription
X-Merchant-Id
stringrequired
Merchant code
X-Timestamp
stringrequired
Epoch in milliseconds
X-Nonce
stringrequired
32 hex characters, unique per request
X-Signature
stringrequired
hex(HMAC_SHA256(secret, ${timestamp}.${nonce}.POST.${pathWithQuery}.${rawBody}))

Body#

application/json

FieldDescription
action
"balance" | "bet" | "win" | "refund" | "rollback"required
—
player_id
stringrequired
Player id at the merchant (the launch player_id)
currency
stringrequired
Merchant currency
provider
stringrequired
Game provider code
game
stringrequired
Game code
tx_id
string
Unique transaction id (absent in balance). Idempotency key: the same tx_id must never be applied twice.
ref_tx_id
string
Only in refund/rollback: tx_id of the reverted bet (refund) or win (rollback)
round_id
string
Round/bet at the provider (absent in balance)
amount
number
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"
}

Responses#

200Operation result (any status < 500 with JSON is read from the body)

FieldDescription
ok
truerequired
—
balance
numberrequired
Player balance AFTER the transaction, in the major currency unit
error
stringrequired
Error code, e.g. INSUFFICIENT_FUNDS
Response example
{
  "ok": true,
  "balance": 0
}