Phoenix Prediction Docs

Reconciliation

Match Phoenix wallet operations to the operator ledger

Reconciliation proves that Phoenix Prediction wallet operations and the operator wallet ledger agree.

The practical question is simple: every Phoenix Prediction idempotency key should affect the operator wallet exactly once.

Reconcile by environment

Keep sandbox and prod reports separate. The same player identifier or market pattern can appear in both environments during rollout, but money movement belongs to only one ledger.

What to Store

For every money-moving wallet operation, store:

FieldWhy
idempotency_keyThe primary join key. Always present, opaque, and platform-generated
operationreserve_cash, release_cash, capture_cash, or credit_cash
operator_id and environmentEnvironment-scoped reconciliation (sandbox or prod)
player.external_idOperator-side player account
currency_code and amount objectExact wallet movement amount
references objectStore it verbatim. Under wallet API 1.0 the keys Phoenix sends are order_id (reserve, capture, release, a maker rebate on a mint), taker_order_id plus maker_order_id (trade and merge credits), claim_side (settlement payouts), and payout_id plus claim_side (payout corrections). Under 1.1 every move also carries venue_id, market_id, outcome and final, and a final move its mode (Positions)
Request fingerprintDetects idempotency key reuse with different payloads
Request bodyAudit and support
Response bodyProves what your wallet returned
Final available and reserved balanceSupport and accounting
Signature resultSecurity audit
Processed timestampOrdering and investigation

Join on idempotency_key first. It is the platform-generated dedup identity and the only field guaranteed on every operation, so it is the spine of every report. The references keys are correlation hints to map a wallet move back to a Phoenix order or settlement: order_id ties a reserve, capture, or release to one buy order; taker_order_id plus maker_order_id tie a sell-proceeds or merge credit to the matched trade; claim_side tags a settlement payout. Treat idempotency_key as opaque and never parse it; its internal prefix records the trigger (for example reserve:, capture:, release:, credit:, settle:) but that format is internal and not a contract.

Daily Reconciliation

Run these checks at least daily during launch:

Count reserve_cash operations against accepted buy orders.

Count capture_cash operations against buy-side fills.

Count release_cash operations against cancelled, expired, partially filled and refused orders, and buys that filled below the price they reserved for.

Count credit_cash operations against sell and merge proceeds, maker rebates, settlement payouts and refunds (including zero-amount finals under wallet API 1.1), and corrections.

Find duplicate idempotency keys and confirm they had one wallet effect.

Compare Phoenix trading ledger totals with operator available and reserved wallet movement.

Player Support Flow

When a player asks about a prediction:

  1. Find the player by your player.external_id.
  2. Find Phoenix Prediction wallet transactions by idempotency_key (primary), then narrow with the references keys you stored: order_id for a reserve, capture, or release; taker_order_id and maker_order_id for a trade or merge credit; claim_side for a settlement payout.
  3. Confirm whether cash was reserved for the order.
  4. Confirm whether reserved cash was captured or released.
  5. Confirm whether settlement, refund, void, or correction credit was applied.
  6. Compare final balance with your wallet ledger.

Do not rely only on iframe UI state for wallet support. The operator wallet ledger is the financial source of truth.

Phoenix's Side of the Ledger

Your finance team can compare against Phoenix's own records in the back office:

  • Finance > Reconciliation lists one row per day and currency: the day's money totals (staked, sold, paid out, refunded, and so on down to the net) and the number of wallet moves.
  • Finance > Wallet moves lists every wallet move, searchable by idempotency key, player or order id.
  • Trades shows each player action with the wallet moves it caused and their keys.

Each can be exported as CSV. See Players, Trades and Finance.

Common Mismatches

SymptomLikely cause
Player cash reserved twiceDuplicate reserve_cash idempotency key was not handled correctly
Player has stuck reserved cashrelease_cash failed, is still retrying, or was applied against the wrong order_id
Player missing proceedscredit_cash is still being retried, or your wallet refused it for 24 hours and Phoenix has raised it with you
Player missing a payoutThe payout is still being retried, or your wallet refused it for 24 hours and it shows as Refused in the back office
Operator captured too muchCumulative capture plus release exceeded the original reservation
Operator ledger has unknown Phoenix transactionMissing request logging or shared wallet endpoint reuse
An order was rejected with a wallet reasonYour wallet declined the reservation (wallet_declined:<code>), did not fund it within 60 seconds (expired), or Phoenix did not send the call (wallet_not_called:<code>, for example wallet_url_not_public)

Launch Recommendation

During the first production rollout, reconcile more often than usual. Prediction markets create new support questions because players are watching open positions, market close, resolution, and wallet settlement as separate moments.