UPI Switch

Transaction lifecycle, designed for certainty.

How SwitchX takes in, validates, routes, tracks and reconciles a UPI-style transaction.

This is a software architecture demonstration. SwitchX here isn't connected to NPCI or any live UPI network. Real UPI participation needs authorized ecosystem connections, sponsor-bank arrangements and regulatory approvals.
Request intake

Authenticated API requests with an Idempotency-Key and a correlation ID.

Request validation

Schema, decimal-safe amounts, institution authorization and supported types.

Routing decisions

Versioned, priority-ordered rules select an eligible partner, with a full evaluation trace.

Partner adapter architecture

One adapter per partner maps requests, responses, timeouts and status inquiry.

Lifecycle tracking

received → validated → routing → processing → success / failed / pending verification.

Response mapping

Partner codes map to SwitchX codes (SX00, SX51, SX91…) with clear messages.

Timeout & unknown outcome

A timeout becomes pending_verification. It's never marked failed without a status inquiry.

Idempotency

Retries return the stored response; a reused key with a different body is rejected.

Reconciliation & monitoring

Partner reports are matched daily, and alerts flag failure-rate and latency changes.