Documentation Index
Fetch the complete documentation index at: https://docs.wizpay.xyz/llms.txt
Use this file to discover all available pages before exploring further.
Core Concepts
WizPay operates on four primitives: batch, execution, settlement, and orchestration. Every payment flow in the system reduces to these concepts.Batch
A batch is a set of payment instructions grouped into a single processing unit.- The frontend composes a list of recipients (address, amount, token).
- The backend validates the list and splits it into
TaskUnitrecords — one per batch. - Each unit is processed independently. A task with 3 batches produces 3 units.
Execution
Execution is the process of converting aTaskUnit into one or more on-chain transactions.
- The orchestrator picks up a queued task and routes it to an agent (Payroll, Swap, Bridge, FX, Liquidity).
- The agent calls the appropriate adapter (Circle API, viem, Solana) to submit the transaction.
- For async operations (payroll), each submitted transfer is tracked as a
TaskTransactionrecord and polled separately.
tx_poll queue.
Settlement
Settlement is the on-chain confirmation that a transaction has been included in a block and reached a terminal state. Two settlement models exist:| Model | Used By | Behavior |
|---|---|---|
| Sync | Swap, Bridge, FX, Liquidity | Agent blocks until the operation completes. Task is marked executed or failed immediately. |
| Async | Payroll | Agent submits all transfers, enqueues poll jobs, and returns. TransactionPollerService confirms each tx individually. Task finalizes when all transactions reach a terminal state. |
TaskTransaction:
completed— On-chain confirmation received,txHashpopulated.failed— Transfer rejected or timed out,errorReasonpopulated.
Orchestration
The orchestration layer is the coordination logic between HTTP ingestion, queue dispatch, agent execution, and state persistence. Key components:OrchestratorService— The single entry point. ExposeshandleTask()(called by HTTP) andexecuteTask()(called by workers). No other component creates or executes tasks.ExecutionRouterService— CheckswalletMode(W3S vs PASSKEY) and dispatches to the correct execution engine.AgentRouterService— Dispatches to the type-specific agent (PayrollAgent,BridgeAgent, etc.).QueueService— Enqueue-only. Never processes jobs.