Skip to content
View MohdAzfara's full-sized avatar
⚡
Building idempotent payment rails
⚡
Building idempotent payment rails
  • Independent Engineer
  • Kaplan, LA
  • 14:46 (UTC -05:00)

Sponsors

@pvb010993

Block or report MohdAzfara

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Content in all repositories owned by your account will be closed.
Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
MohdAzfara/README.md

Hi, I'm Mohd Azfara 👋

Principal Fintech & Distributed Systems Architect

Fault-tolerant payment orchestration, multi-PSP failover routing, and zero-trust financial infrastructure.

TypeScript SemVer RFC 9116 TLA+


I design and maintain mission-critical payment systems where idempotency, strict auditability, and zero-data-loss recovery are non-negotiable.


🏛️ Core Engineering Focus

  • Payment Orchestration & Routing: Multi-PSP failover mechanisms, FSM circuit breakers, deterministic multi-rail payout routing, and secure client-side tokenization SDKs.
  • Formal Verification & Security: Applying TLA+ mathematical specifications for concurrency safety, STRIDE threat modeling, and zero-trust cryptographic payload attestation.
  • Ledger & Reconciliation Systems: Two-phase balance reservation, immutable double-entry bookkeeping, automated three-way settlement matching, and balance invariants.
  • Asynchronous Event Pipelines: Distributed background workers utilizing Redis Streams & BullMQ with Full-Jitter exponential backoff and Dead-Letter Queue (DLQ) isolation.
  • Security & Compliance: PCI-DSS scope reduction, RFC 9116 security disclosures, ISO 20022 control alignment, HMAC webhook verification, and constant-time signature comparison.

🛠️ Technical Stack & Tooling

Domain Technologies & Standards
Languages TypeScript, Node.js, Go, SQL
Data & State PostgreSQL (ACID / Serializable Locking), Redis (Streams & Redlock)
Messaging Apache Kafka, RabbitMQ, BullMQ
Infrastructure Docker, Kubernetes, AWS (ECS, KMS, SQS), GitHub Actions
Standards & Verification RESTful APIs, gRPC, OpenAPI 3.1, TLA+ Formal Specs, ISO 20022 Concepts

🚀 Featured Open-Source Architecture

Project Architecture Role Core Stack
checkout-flow-sdk Client-side checkout & tokenization SDK with multi-provider failover, TLA+ verification, and STRIDE security models TypeScript, WebCrypto, TLA+
payout-gateway-service High-throughput asynchronous payout microservice with two-phase balance locking and three-way reconciliation TypeScript, Node.js, PostgreSQL
automated-refund-worker Event-driven worker for idempotent refund pipelines & fraud audits TypeScript, Node.js, Redis, BullMQ
double-entry-ledger-core Production-grade immutable double-entry accounting ledger enforcing strict ACID invariants TypeScript, Node.js, PostgreSQL

📐 Architectural Design Principles

  1. Idempotency by Default: Every state-mutating request requires an Idempotency-Key, enforced at both the API boundary and database constraint layer to prevent duplicate ledger debits.
  2. Two-Phase Balance Integrity: Outbound fund disbursements enforce synchronous available-to-pending balance reservation locks before external banking dispatch.
  3. Event-Driven Decoupling: Critical payment paths respond synchronously only for authorization; settlement, notifications, and reconciliation audits process asynchronously via durable queues.
  4. Rigorous Formal Verification: Core business logic, idempotency invariants, and state machine transitions are backed by TLA+ mathematical models to eliminate concurrency anomalies.

📬 Contact & Security Disclosures

Pinned Loading

  1. checkout-flow-sdk checkout-flow-sdk Public

    ⁠Lightweight client-side checkout and payment flow SDK with multi-provider fallback and tokenization.⁠

    TypeScript 2

  2. payout-gateway-service payout-gateway-service Public

    High-throughput microservice handling asynchronous vendor payouts, reconciliation, and balance tracking.

    TypeScript 2

  3. automated-refund-worker automated-refund-worker Public

    Asynchronous background job worker for handling secure e-commerce refund pipelines and fraud audits.⁠

    TypeScript 2

  4. double-entry-ledger-core double-entry-ledger-core Public

    Production-grade immutable double-entry accounting ledger enforcing strict ACID balance invariants and audit trails.

    TypeScript 2