API & Integration Layer
All endpoints are served by the NestJS backend behind an Nginx reverse proxy (/api → backend).
Task Endpoints
POST /tasks
Create and enqueue a task for execution.
- Validated via
CreateTaskDto(class-validator, whitelist, forbidNonWhitelisted). - Calls
OrchestratorService.handleTask(). - Returns full
TaskDetailswith status and logs.
GET /tasks
List tasks with filters.
The
wallet filter searches across metadata.walletAddress, metadata.recipient, metadata.destinationAddress, metadata.sourceAddress, and their payload equivalents.
Returns { data: { items: TaskDetails[], total: number } }.
GET /tasks/:id
Poll a single task. Returns TaskDetails including:
- Status and metadata
- All
TaskLogentries (chronological) - All
TaskUnitrecords with individual statuses - All
TaskTransactionrecords with tx hashes and poll attempts
POST /tasks/payroll/init
Validate and batch a payroll run. Does not enqueue for execution.
POST /tasks/swap/init
Create a legacy on-chain swap task.
Required fields: tokenIn, tokenOut, amountIn, recipient.
Default/prod behavior: rejected unless WIZPAY_ENABLE_LEGACY_FX=true is set
for isolated non-production testing. Official StableFX RFQ should use the FX
quote/execute endpoints.
POST /tasks/liquidity/init
Create a legacy LP liquidity task.
Required fields: operation (add | remove), token, amount.
Default/prod behavior: rejected unless WIZPAY_ENABLE_LEGACY_LIQUIDITY=true is
set for isolated non-production testing. The user-facing liquidity page is
disabled during the official StableFX migration.
POST /tasks/:taskId/units/:unitId/report
Report the result of a single task unit. Used by the frontend after client-side execution (PASSKEY mode).
POST /tasks/fx/quote
Get an FX quote. Required: sourceCurrency, targetCurrency, sourceAmount.
POST /tasks/fx/execute
Execute an FX trade. Required: quoteId, signature, senderAddress.
Wallet Endpoints
All require
userToken in the request body.
Bridge Endpoints
/bridge/intents creates and retrieves External Wallet CCTP V2 lifecycle records. Stage endpoints bind and verify user-submitted approval and source burn evidence, recover the Circle attestation, lease one destination wallet authorization, bind its transaction hash, and strictly verify the destination mint. API retries return the existing binding; no bridge endpoint signs or submits a transaction.
External System Interfaces
The backend communicates with these external systems:Constraints
- No direct frontend-to-chain calls in W3S mode. All on-chain operations route through the backend.
- No concurrent task execution for the same wallet. BullMQ processes jobs sequentially per queue (except payroll at concurrency 5). No explicit wallet-level locking exists.
- Circle rate limits apply. The backend does not implement its own rate limiting against Circle APIs. High-throughput payroll runs may encounter Circle-side throttling.
- USDC-only, testnet-only bridge. Only registry-approved Arc Testnet hub-and-spoke routes are accepted. Non-USDC, mainnet, Robinhood, Solana, and spoke-to-spoke requests fail closed.
- Passkey AA is EVM-only. Solana operations in PASSKEY mode return unsigned intents. The backend cannot sign Solana transactions for passkey wallets.
- No webhook ingestion. Settlement confirmation relies on polling (tx_poll queue), not on-chain event subscriptions or Circle webhooks.