Predictu
Wallet System

Wallet Integration

Predictu is designed so that operators keep full control of player wallets. The platform never holds player funds. Instead, every balance operation — debits, credits, refunds, and rollbacks — is routed through secure server-to-server callbacks to the operator’s own wallet system.

Why this matters: The casino operator is the house and owns all player balances. Predictu’s trading engine, risk engine, and settlement engine all communicate with the operator’s wallet through the same standardized interface. This decoupling is what makes the B2B integration possible — your existing wallet infrastructure works as-is.

How It Works

Every time a player’s balance needs to change — whether from buying shares, selling a position, winning a settled market, or receiving a refund — Predictu sends a signed callback to the operator’s registered endpoint. The operator processes the request against their own wallet system and responds with the updated balance.

1
Trade or settlement triggers a balance operation — The trading engine determines that a player’s balance needs to change.
2
Operator configuration is resolved — The system loads the operator’s wallet integration settings, including their callback endpoint and currency preferences.
3
Signed callback is sent — A cryptographically signed request is sent to the operator’s server with full context about the transaction.
4
Operator processes and responds — The operator’s server adjusts the player’s balance and returns the result. Predictu records the transaction and continues.

Supported Operations

The wallet integration supports every balance operation that occurs during trading and settlement:

  • Balance queries — Check a player’s current balance before executing a trade.
  • Debits — Deduct funds when a player purchases shares in a prediction market.
  • Credits for wins — Add funds when a market resolves in the player’s favor.
  • Credits for sells — Add funds when a player sells their position back to the market.
  • Refunds — Return the original purchase amount when a market is voided or cancelled.
  • Rollbacks — Reverse a debit when a trade fails after the balance was already adjusted.
  • Loss notifications — Inform the operator when a market resolves against a player. No funds move, but the event is recorded.

Currency Handling

The wallet integration supports both whole currency units and subunit formats. During onboarding, operators specify their preferred format, and all amounts are automatically converted in both directions. This means operators can receive amounts in whichever format their existing wallet system expects, with no additional development work.

Reliability and Failover

The wallet integration is built for resilience:

  • Automatic retries — Network errors and transient failures trigger automatic retries with exponential backoff. The system makes multiple attempts before giving up.
  • Idempotency — Every callback includes a unique request identifier. If the same request is received twice (due to retries), the operator can safely ignore the duplicate.
  • Rollback guarantees — If a debit succeeds but the subsequent trade recording fails, the system automatically sends a rollback to restore the player’s balance.
  • Error escalation — Permanent failures (such as player-not-found or business rule violations) are immediately surfaced to the trading engine, which rejects the trade cleanly.
Operator configuration is cached for performance. The wallet integration does not hit the database on every trade. Configuration is refreshed periodically, keeping latency low while ensuring settings stay current.

Integration Benefits

The wallet integration architecture provides several key advantages for operators:

  • No fund custody — Predictu never holds or controls player funds. The operator’s existing compliance and custody arrangements remain unchanged.
  • Use existing infrastructure — The integration works with any wallet system that can receive HTTP callbacks. No migration required.
  • Full transaction visibility — Every callback and its response is logged, providing a complete audit trail for reconciliation.
  • Consistent state — The compensating transaction pattern ensures the operator’s wallet is always in sync with Predictu’s internal state, even when errors occur.