Skip to content

Active Game Balance Adjustment ​

Use this endpoint after the Agent has committed a late cross-game settlement, deposit, or reversal to its master wallet while the player remains in another game. Hub deduplicates retries by event_id and compares the source and current session wallet IDs. It applies the delta only when they are different; sessions sharing one physical Provider wallet are recorded without changing the balance again.

Endpoint ​

PropertyValue
PathPOST /papi/v1/player/balance-adjust
AuthenticationAgent Bearer Token
Content-Typeapplication/json or application/x-www-form-urlencoded

Request ​

FieldTypeRequiredDescription
member_idstringYesAgent player ID
currencystringYesCurrent game currency
session_idstringYesCurrent active Hub session
event_idstringYesStable idempotency key; reuse it for every retry
event_typestringYesFor example settlement, deposit, void, or rollback
deltadecimalYesNon-zero amount: positive credit or negative reversal
source_session_idstringNoSource game session for a cross-game event
reverses_event_idstringRequired for negative deltaOriginal positive event being reversed
json
{
  "member_id": "player001",
  "currency": "MYR",
  "session_id": "uu-current-session",
  "event_id": "CMD_SETTLED_84000010943916399_v1",
  "event_type": "settlement",
  "delta": 50.00,
  "source_session_id": "cmd-old-session"
}

Hub changes only the current active game wallet. The response includes applied_delta, the amount actually applied, and same_wallet. When two Brands share the same Provider wallet, Hub returns same_wallet=true and applied_delta=0; the event remains durably idempotent and its reversal is also skipped. A duplicate request with the same event data returns the original result with idempotent=true. Reusing the ID with different business data returns event_id_conflict. A reversal must reference an applied positive event, cannot exceed its remaining amount, and cannot make the current wallet negative.

For session_mismatch, resolve the latest active session and retry the same event ID. For no_active_game_session, keep the committed Agent ledger entry and let the next game launch initialize Hub from the full master-wallet balance; do not append the old delta after that snapshot. For a timeout or player_settlement_in_progress, retry the exact same event through the Agent outbox.

Offline callbacks may contain both a source wallet and the amount mirrored into the current wallet. Reconcile using mirrored_adjustments.event_id and net_balance_to_reconcile; never credit wallet_cleared_total directly to the master wallet.

VCT Gaming Integration Platform