Skip to content

Wallet callbacks

What we send to your wallet, what each provider fills in, and what you must answer.

On this page

How it works#

  1. 1Player bets or wins
  2. 2The provider calls AGIXX
  3. 3We POST to your callbackUrl
  4. 4You return the new balance

There is one callbackUrl per account, set by the AGIXX team: send the URL and any later change to integration@agixx.net. It must answer directly; a redirect counts as a failed call.

HeaderContent
X-AGIXX-Timestamp / Key-Id / SignatureThe signature, see Verify the signature
X-Aggregator-EventThe canonical action (live traffic only)
X-AGIXX-Deprecated-FieldsThe fixed list of older field names to stop using (live traffic only)
X-AGIXX-Sunset-Date2027-04-20: planned removal of the older fields
X-AGIXX-DocsLink to this documentation

Payload#

A JSON body. The canonical names are the same for every provider; older provider-specific names come alongside them.

A SOFTGAMING bet, as sentJSON
{
  "action":           "bet",
  "provider":         "SOFTGAMING",
  "playerId":         "player_123",
  "providerPlayerId": "u7c1d0e2a9b84f3c6d5e1",
  "sessionId":        "clxyz1234567890",
  "roundId":          "5581203",
  "transactionId":    "990017352",
  "refTransactionId": null,
  "gameId":           "960:vs20olympgate",
  "amount":           "-10.00",
  "bet":              "10.00",
  "win":              null,
  "currency":         "TRY",

  "_originalPlayerId": "player_123",
  "_sessionId":        "clxyz1234567890",
  "UserLogin":         "u7c1d0e2a9b84f3c6d5e1",
  "TID":               "990017352",
  "betAmount":         10
}
FieldMeaning
actionbet, win, betwin, rollback, balance or auth
providerProvider key. Part of the idempotency key.
playerIdYour player id from launch
sessionIdThe session returned by launch
transactionIdThe transaction. null on a rollback of the GitSlotPark family.
refTransactionIdThe original transaction this rollback / win refers to; PRAGMATIC_PLAY, PG_SOFT, AMATIC, AMUSNET rollbacks carry ONLY this id
roundIdThe round. One round can hold many transactions.
bet / win / amountDecimal strings, see below
currency, gameIdCan be null, and gameId can differ from the launched one. Take both from the session you launched (sessionId).
freespinIdPresent on free-spin traffic, see Free-spin callbacks
replayUrlALGNET bet / win / rollback, when available: a link to the round replay. Store it for player disputes.
rollback_transactionsGAME_AGGREGATOR rollback: list of transactions to reverse (array, or an object with numeric keys)

Fields per provider#

One rule for amountsFields can be null per provider: on bet use bet, else abs(amount); on win use win, else abs(amount); on betwin use bet and win. amount is negative on SOFTGAMING and ALGNET bets. On rollback, use the bet you stored.
ProvideractionbetwinamounttransactionIdrefTransactionIdroundId, currency
GitSlotPark family: PRAGMATIC_PLAY, PG_SOFT, AMATIC, AMUSNETbetnullnull"10.00"idnullroundId; currency usually null
winnullnull"4.50"idoriginal or nullroundId
betwin"1.00""3.00"nullidnullroundId
rollbacknullnullnullnulloriginal idboth null
GAME_AGGREGATORbetnullnull"10.00"idnullboth; gameId null
winnullnull"25.00"idnullboth
rollback (refund)nullnull"10.00"own idoriginal betboth
rollback (list)nullnullnullown idnullsee Rollback
SOFTGAMINGbet"10.00"null"-10.00"idnullboth
winnull"4.00""4.00"idnullboth
rollback"10.00"null"10.00"own idoriginal or nullboth
ALGNETauth, balancenullnullnullnullnullcurrency
bet"10.00"null"-10.00"idnullboth
winnull"12.00""12.00"idnullboth
rollback"6.00"null"6.00"id, can equal the bet'snullboth
VALIDATIONbalance, bet, win, refundabsentabsent"10.00"as transaction_idabsentas round_id

The table lists what AGIXX forwards. A provider may leave out a field, so treat every field except action, provider, playerId and sessionId as nullable. betwin exists only in the GitSlotPark family, auth only on ALGNET.

Actions#

actionWhat to doMoney
balanceReturn the current balancenone
authSession check at game start: return the current balancenone
betDebit the bet. Free-spin bet (freespinId present, GAME_AGGREGATOR / SOFTGAMING): do not debit; reply with the current balance.debit
winCredit the win, also inside free spinscredit
betwinbalance - bet + win in one step (bet = 0 on a free spin). Reject it when the balance is below the bet.debit + credit
rollbackRefund the original bet, see Rollbackcredit
anything elseReturn the current balance with code 0none

Upstream names such as Withdraw or RollbackTransaction never appear in action. One exception: the Validator sends refund; treat it as rollback.

Rollback#

Refund: find the original bet by refTransactionId and return its stored bet amount; amount may be null. If the original was never debited, change nothing and return the current balance with code 0.

  1. 1rollback_transactions present (GAME_AGGREGATOR): reverse every listed transaction you have; give back a listed bet, take back a listed win.
  2. 2Otherwise use refTransactionId: the stored bet or betwin of this player and provider with that transactionId.
  3. 3No refTransactionId: a bet with the same transactionId (the provider may reuse it), else the bet of this roundId with the same amount.
  4. 4Refund what you really debited: 0 for a free spin. For a betwin refund only the bet and keep the win.
  5. 5Mark the original as reversed so it can never be refunded twice, even under another rollback id.
  6. 6If a bet arrives after its rollback, reject it with code 1.
PRAGMATIC_PLAY, PG_SOFT, AMATIC, AMUSNET: only refTransactionId (main fields)JSON
{
  "action":           "rollback",
  "provider":         "PRAGMATIC_PLAY",
  "playerId":         "player_123",
  "sessionId":        "clxyz1234567890",
  "roundId":          null,
  "transactionId":    null,
  "refTransactionId": "tx_50c7f7c5319",
  "gameId":           null,
  "amount":           null,
  "bet":              null,
  "win":              null,
  "currency":         null
}
GAME_AGGREGATOR: rollback_transactions (main fields)JSON
{
  "action":           "rollback",
  "provider":         "GAME_AGGREGATOR",
  "playerId":         "player_123",
  "sessionId":        "clxyz1234567890",
  "transactionId":    "rb_77120",
  "refTransactionId": null,
  "amount":           null,
  "currency":         "TRY",
  "rollback_transactions": [
    { "action": "bet", "amount": "7.00", "transaction_id": "b_3001" },
    { "action": "win", "amount": "3.00", "transaction_id": "w_3002" }
  ]
}

Your response#

Answer within 3 seconds, with HTTP 200 and a JSON body that contains a numeric balance. Business errors also use HTTP 200, with a non-zero code.

JSONC
// Bet / win / betwin / rollback processed
{ "code": 0, "balance": 990.00, "transaction_id": "your_tx_id" }

// balance / auth
{ "code": 0, "balance": 990.00 }

// Not enough money: bet / betwin only
{ "code": 1, "balance": 100.00, "message": "Insufficient funds" }

// Unknown player: balance / auth / bet / betwin only
{ "code": 2, "error_code": "PLAYER_NOT_FOUND", "message": "Player not found" }

// Same transaction again: the stored reply, unchanged
{ "code": 0, "balance": 990.00, "transaction_id": "your_tx_id" }
ReplyHow AGIXX reads it
Any 2xx, code 0 or no code, numeric balanceConfirmed
code: 1Insufficient funds
code: 2 or error_code: PLAYER_NOT_FOUNDPlayer not found
Any other code, error, error_code, success: false, or status other than ok / successRejected
Late, not 2xx, redirect, not JSON, or no numeric balanceFailed: we do not know whether you applied it
Never reject win or rollbackNever reject win or rollback with code != 0: a reply like that is final and the provider will not resend it. If you could not credit, return HTTP 500 so it is retried. Reject only bet / betwin.
  • balance is the real money balance in the session currency, with at most 2 decimals. Round down, never up.
  • transaction_id is optional on live traffic but required to pass the Validator; balance must be a JSON number there (live traffic also accepts a numeric string).
  • On a SOFTGAMING balance and on ALGNET balance / auth, an error reply is not passed on: the player sees 0.
  • code: 1 on a bet makes the provider refuse it.

Idempotency and retries#

You may receive the same callback more than onceIt carries the same transactionId. Store the reply by transactionId and return the same reply on a duplicate, without moving money. Key it on provider + action + transactionId; when transactionId is null (rollback) use refTransactionId. The same round can contain many transactions.
  • Do the check, the balance change and the stored reply in one database transaction, with a row lock on the player and a unique key on the transaction. Copies and other callbacks of the same player can arrive in parallel.
  • Keep stored transactions permanently; at the very least as long as a bet can still be rolled back.
  • Do not store a rejected bet as done: the provider may send it again and it should be checked again.
  • AGIXX does not retry by itself. A transaction you already confirmed is not sent to you again; a failed one is forwarded each time the provider resends it.
  • After a failed bet the provider may cancel it: expect a rollback for a bet you did apply. A late answer is therefore not a refusal.
  • A duplicate with a different amount: return the stored reply, change nothing, and log it.
Questions about your integration?Write to us with your account name and, if you have one, a sessionId or transactionId. integration@agixx.net
Wallet callbacks - API Documentation | AGIXX