← Daily insights

wm casino api: Fence Wallet Writes During Regional Failover

December 6, 2026

A wm casino api integration needs more than a backup endpoint to survive a regional outage. If the original wallet service remains reachable while a replacement starts processing transactions, both regions may accept writes against the same player balance. The practical objective is not simply restoring traffic: it is restoring one authoritative wallet writer without losing accepted transactions or processing them twice.

This guide covers operator-side failover controls for a seamless-wallet deployment. These are architectural recommendations, not claims about WM’s specific callback protocol. Confirm authentication, retry behavior, transaction identifiers, and response semantics with your integration partner before implementing recovery rules.

wm casino api failover starts with wallet authority

A routing change does not transfer financial authority. DNS updates, load balancer changes, and application health checks can send traffic toward a recovery region, but they do not necessarily stop an isolated primary region from writing to its database.

Consider this sequence:

  • Region A receives a debit and commits it locally.
  • Connectivity between regions fails before that commit reaches Region B.
  • An automated health check sends new traffic to Region B.
  • A retry of the original debit reaches Region B, which has no record of it.

Both regions might now contain an accepted version of the same transaction. Even without retries, separate valid bets can spend the same available funds if each region believes its balance is current.

For a single-writer wallet, define the invariant explicitly: only one region may authorize wallet mutations for a given wallet partition at any moment. Promotion must enforce that invariant at the storage boundary, not merely in the traffic router.

Establish the recovery contract before launch

Document provider-facing behavior

Your failover procedure depends on what the upstream integration actually supports. Obtain written answers to these questions:

  • Which identifiers remain stable across transaction retries?
  • How are debit, credit, cancellation, and adjustment events distinguished?
  • Which responses trigger retries, and for how long?
  • Can unresolved transactions be queried or exported for reconciliation?
  • Can callback destinations change, and how quickly does that change propagate?
  • Does a successful response mean the wallet operation has completed, or can it mean durable receipt for later processing?

Do not invent a temporary-success response to keep dashboards green. If success means that funds were applied, acknowledging a queued but unapplied credit would misrepresent the wallet state.

Set recovery objectives around money

Recovery time objective describes how quickly service should return. Recovery point objective describes how much committed data could be missing after recovery. For wallet operations, losing even a small interval can leave accepted debits or credits absent from the replacement ledger.

If replication is asynchronous, document the consequences. A short recovery target does not justify opening a stale wallet. The safe outcome may be a longer interruption while missing transactions are recovered or affected accounts remain restricted.

Fence the old writer at the commit boundary

A fencing mechanism gives each authorized writer generation a monotonically increasing token, sometimes called an epoch. When Region B takes over, it receives a newer generation. Writes from Region A must then be rejected even if its processes are still running.

An application-level variable saying “I am primary” is insufficient. So is a lease check performed only when a request begins: authority can change before the request commits.

A correct design requires:

  • A strongly consistent mechanism for assigning writer authority.
  • A storage-level check that rejects stale generations atomically with the mutation.
  • A promotion sequence that prevents overlapping write authority.
  • Defined behavior when the authority mechanism is unreachable.

The last point matters. If a region cannot verify authority, continuing to accept money-moving writes can defeat the entire design.

Independent databases that each validate a token against their own stale local state do not provide effective fencing. Use a database topology with enforceable single-writer promotion, or another mechanism that prevents the former primary from committing before the replacement becomes writable. Have the infrastructure team demonstrate this property under a network partition.

Recover transaction history with the balances

Treat deduplication records as financial data

A recovered balance is not enough. The replacement also needs the records explaining which external transactions produced that balance.

For each accepted wallet event, persist the relevant information together:

  • An idempotency key scoped according to the documented identifier guarantees.
  • Player or wallet identity and currency.
  • Operation type and amount.
  • Ledger reference and processing outcome.
  • Information needed to reproduce the contractually required retry response.

The ledger mutation and its deduplication outcome should commit atomically. Otherwise, recovery can produce either a debit without evidence that it was processed or a processed marker without the corresponding balance change.

Replication and backup policies must cover both. Keeping idempotency keys in an ephemeral regional cache creates a recovery gap even when the main ledger survives.

Verify a recovery boundary

Before promotion, establish which committed records the replacement actually possesses. Use database commit positions or another authoritative replication marker rather than assuming that a recent timestamp proves completeness.

If the old region acknowledged transactions beyond that boundary, investigate the gap before reopening affected wallets. Use available transaction queries, callback records, and provider reports to resolve it. External reports are reconciliation evidence, not permission to overwrite balances blindly.

Use a staged failover runbook

1. Contain new activity

Pause new launches and block new wager authorization where your integration supports those controls. Existing live sessions may still generate callbacks, so removing lobby entries alone is not containment.

Keep authenticated ingress reachable where practical, but return only documented responses. Queue events only if their semantics allow it, with durable storage and a clear processing deadline. Do not report a completed debit or credit merely because its payload was saved.

2. Remove the old region’s authority

Fence the former writer using the approved database or infrastructure mechanism. Record the authority generation, action time, and operator responsible.

An unreachable region is not necessarily a stopped region. If the recovery team cannot prove that stale writes will be rejected, keep money-moving service paused rather than promoting a competing writer.

3. Validate the replacement

Check ledger completeness, deduplication history, callback credentials, currency configuration, and access to the writer-authority mechanism. Test a stale-generation write and confirm rejection.

Also confirm that only one recovery worker can claim each pending event. Background settlement workers can create overlapping execution just as easily as public callback handlers.

4. Reopen in controlled stages

Restore documented callback processing first, then permit new activity only after financial checks pass. Monitor unresolved events, duplicate detections, rejected stale writes, and reconciliation differences.

Failback is another authority transfer, not a simple routing reversal. Rebuild or resynchronize the former primary before considering it eligible to write again.

Test failures that ordinary health checks miss

Run these scenarios in a production-like environment using test accounts:

  • Partial isolation: Region A loses replication connectivity but still receives callbacks. Verify that promotion cannot leave both regions writable.
  • Commit without response: A debit commits before its response is lost. Retry it after failover and verify one ledger mutation.
  • In-flight stale write: Pause a request before commit, transfer authority, then resume it. The stale write must fail.
  • Replica lag: Leave acknowledged transactions missing from the replica. Confirm that reopening is blocked or appropriately restricted.
  • Old-region return: Bring Region A back with queued jobs. Verify that those jobs cannot bypass fencing or deduplication.

Keep test evidence: transaction identifiers, commit positions, authority changes, and final ledger results. Endpoint availability alone is not a pass condition.

Put recovery requirements into integration discussions

GamingAPI offers 16,000+ games from 150+ studios through one API, with a seamless wallet, multi-currency support, and USDT deposits. Commercial pricing is a $350 one-time setup fee plus 10% of positive GGR; see pricing.

For a WM project, confirm current availability, applicable market requirements, and the specific callback and recovery contract through contact. Aggregation simplifies connectivity, but wallet authority, replication, and reconciliation still need explicit ownership between the operator and integration partners.

FAQ

Is switching DNS enough to fail over a casino wallet?

No. DNS changes affect routing, not database write permissions. Existing connections and background workers can remain active in the old region. Fence its writes before enabling the replacement.

Can we acknowledge settlement callbacks during recovery?

Only according to the documented protocol. If acknowledgment means the credit was applied, durable queuing alone is insufficient. Confirm supported retry or deferred-processing behavior before an incident.

Should the wallet automatically fail back after recovery?

Not simply because the original region becomes healthy. First reconcile its data, eliminate stale jobs, and verify synchronization. Failback must use the same controlled transfer of write authority as failover.

Top Game Providers

150+ Studios. One integration.

Slots, live casino, crash and sports — all connected through one API. Browse our studios and explore their free-play demos.