Wallet callbacks
What we send to your wallet, what each provider fills in, and what you must answer.
On this page
How it works#
- 1Player bets or wins
- 2The provider calls AGIXX
- 3We POST to your callbackUrl
- 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.
| Header | Content |
|---|---|
X-AGIXX-Timestamp / Key-Id / Signature | The signature, see Verify the signature |
X-Aggregator-Event | The canonical action (live traffic only) |
X-AGIXX-Deprecated-Fields | The fixed list of older field names to stop using (live traffic only) |
X-AGIXX-Sunset-Date | 2027-04-20: planned removal of the older fields |
X-AGIXX-Docs | Link to this documentation |
Payload#
A JSON body. The canonical names are the same for every provider; older provider-specific names come alongside them.
{
"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
}| Field | Meaning |
|---|---|
action | bet, win, betwin, rollback, balance or auth |
provider | Provider key. Part of the idempotency key. |
playerId | Your player id from launch |
sessionId | The session returned by launch |
transactionId | The transaction. null on a rollback of the GitSlotPark family. |
refTransactionId | The original transaction this rollback / win refers to; PRAGMATIC_PLAY, PG_SOFT, AMATIC, AMUSNET rollbacks carry ONLY this id |
roundId | The round. One round can hold many transactions. |
bet / win / amount | Decimal strings, see below |
currency, gameId | Can be null, and gameId can differ from the launched one. Take both from the session you launched (sessionId). |
freespinId | Present on free-spin traffic, see Free-spin callbacks |
replayUrl | ALGNET bet / win / rollback, when available: a link to the round replay. Store it for player disputes. |
rollback_transactions | GAME_AGGREGATOR rollback: list of transactions to reverse (array, or an object with numeric keys) |
Fields per provider#
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.| Provider | action | bet | win | amount | transactionId | refTransactionId | roundId, currency |
|---|---|---|---|---|---|---|---|
| GitSlotPark family: PRAGMATIC_PLAY, PG_SOFT, AMATIC, AMUSNET | bet | null | null | "10.00" | id | null | roundId; currency usually null |
win | null | null | "4.50" | id | original or null | roundId | |
betwin | "1.00" | "3.00" | null | id | null | roundId | |
rollback | null | null | null | null | original id | both null | |
| GAME_AGGREGATOR | bet | null | null | "10.00" | id | null | both; gameId null |
win | null | null | "25.00" | id | null | both | |
rollback (refund) | null | null | "10.00" | own id | original bet | both | |
rollback (list) | null | null | null | own id | null | see Rollback | |
| SOFTGAMING | bet | "10.00" | null | "-10.00" | id | null | both |
win | null | "4.00" | "4.00" | id | null | both | |
rollback | "10.00" | null | "10.00" | own id | original or null | both | |
| ALGNET | auth, balance | null | null | null | null | null | currency |
bet | "10.00" | null | "-10.00" | id | null | both | |
win | null | "12.00" | "12.00" | id | null | both | |
rollback | "6.00" | null | "6.00" | id, can equal the bet's | null | both | |
| VALIDATION | balance, bet, win, refund | absent | absent | "10.00" | as transaction_id | absent | as 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#
| action | What to do | Money |
|---|---|---|
balance | Return the current balance | none |
auth | Session check at game start: return the current balance | none |
bet | Debit the bet. Free-spin bet (freespinId present, GAME_AGGREGATOR / SOFTGAMING): do not debit; reply with the current balance. | debit |
win | Credit the win, also inside free spins | credit |
betwin | balance - bet + win in one step (bet = 0 on a free spin). Reject it when the balance is below the bet. | debit + credit |
rollback | Refund the original bet, see Rollback | credit |
anything else | Return the current balance with code 0 | none |
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
rollback_transactionspresent (GAME_AGGREGATOR): reverse every listed transaction you have; give back a listed bet, take back a listed win. - 2Otherwise use
refTransactionId: the stored bet or betwin of this player and provider with that transactionId. - 3No
refTransactionId: a bet with the sametransactionId(the provider may reuse it), else the bet of thisroundIdwith the same amount. - 4Refund what you really debited: 0 for a free spin. For a betwin refund only the bet and keep the win.
- 5Mark the original as reversed so it can never be refunded twice, even under another rollback id.
- 6If a bet arrives after its rollback, reject it with code 1.
{
"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
}{
"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.
// 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" }| Reply | How AGIXX reads it |
|---|---|
| Any 2xx, code 0 or no code, numeric balance | Confirmed |
code: 1 | Insufficient funds |
code: 2 or error_code: PLAYER_NOT_FOUND | Player not found |
Any other code, error, error_code, success: false, or status other than ok / success | Rejected |
| Late, not 2xx, redirect, not JSON, or no numeric balance | Failed: we do not know whether you applied it |
balanceis the real money balance in the session currency, with at most 2 decimals. Round down, never up.transaction_idis optional on live traffic but required to pass the Validator;balancemust 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: 1on a bet makes the provider refuse it.
Idempotency and retries#
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.