Skip to content
BACK TO PROJECTS
[04]LIVE(2026)

3-Step Payment Orchestration

Modular payment framework enabling independent Authentication, Authorization, and Capture workflows.

Supports delayed capture & independent workflow stages

[01]SYSTEM OVERVIEW

Core payment orchestration framework enabling Authentication, Authorization, and Capture to function as independent, extensible workflows across Juspay's payment stack.

The Engineering Challenge

Legacy monolithic authorization flows tightly coupled authentication, authorization, and capture stages, preventing delayed capture support and limiting merchant payment lifecycle flexibility.

Implemented Solution

Designed a modular 3-step orchestration framework where each stage operates independently with its own state machine, enabling flexible sequencing, delayed capture, and merchant-configurable lifecycles.

[02]SYSTEM ARCHITECTURE

  • Independent state machines per stage (Auth, AuthZ, Capture) with defined transition contracts
  • Event-driven coordination via Kafka for cross-stage communication without tight coupling
  • PostgreSQL for durable state persistence with optimistic locking for concurrent stage transitions
  • Pre-auth revamp: simplified multi-stage authorization with extensible feature hooks per service

[03]TECHNOLOGIES UTILIZED

HaskellPostgreSQLMicroservicesRedisKafka

[04]KEY FINDINGS & TAKEAWAYS

Explicit state machine design surfaces edge cases that implicit flow-control through conditionals hides
Decoupling capture from authorization immediately unblocks a wide category of merchant integration patterns