#Payments

Payment systems require idempotency, audit trails, and strict regulatory compliance. These articles cover UPI integration with NPCI, idempotent payment processing patterns, Kafka-based settlement pipelines, and the engineering controls needed to handle financial transactions reliably at scale.

54 posts tagged with payments. ← All posts

#A2A (14)#ADK (8)#AG-UI (6)#AI (9)#AI Agents (311)#AI Architecture (10)#AI Cost (10)#AI Cost Optimization (8)#AI Engineering (201)#AI Evaluation (8)#AI Governance (29)#AI Red Teaming (9)#AI Research (9)#AI Safety (8)#AI Security (21)#AI in Production (12)#AML (3)#API Design (10)#API Security (8)#APIs (55)#AWS (17)#Accounting (9)#Agent Skills (3)#Agentic AI (24)#Agentic Commerce (12)#Agentic RAG (8)#Agents (4)#Amazon Bedrock (8)#Analytics (3)#Architecture (36)#Audit (3)#Authentication (11)#Authorization (3)#Automation (6)#Azure (11)#Azure AI Foundry (9)#Backend Engineering (310)#Benchmarks (3)#Best Practices (3)#BigQuery (6)#Business Finance (8)#Business Strategy (55)#C (8)#CI/CD (8)#Caching (10)#Capital Markets (14)#Card Payments (12)#Cards (13)#Career (24)#Checkpointing (4)#Claude Code (8)#Cloud (5)#Cloud Architecture (3)#Cloud Native (10)#Code Review (8)#Collaboration (5)#Communication (9)#Compliance (52)#Computer Networking (9)#Computer Science (32)#Computer Vision (5)#Concurrency (37)#Consulting (3)#Containers (10)#Context Engineering (10)#Cost Optimisation (5)#Credit (14)#Credit Risk (14)#CrewAI (8)#Crypto (12)#Cryptocurrency (12)#Cryptography (8)#Custody (9)#DSPy (8)#Data (13)#Data Engineering (12)#Data Structures (9)#Databases (37)#Deployment (3)#Design Patterns (10)#DevOps (16)#DevSecOps (11)#Developer Experience (5)#Developer Tools (5)#Distributed Systems (94)#Documentation (3)#Edge AI (8)#Embeddings (15)#Emotional Intelligence (8)#Energy (8)#Engineering (11)#Engineering Culture (3)#Engineering Practices (16)#Error Handling (4)#Evaluation (53)#Event-Driven Architecture (8)#FREE-AI (8)#FX (5)#Feedback (4)#FinOps (23)#FinTech (6)#Financial AI (14)#Financial Systems (129)#Fine-Tuning (11)#Fintech (131)#Flutter (8)#Foreign Exchange (5)#Forward Deployed Engineer (8)#Forward Deployed Engineering (8)#Fraud (10)#Function Tools (5)#Functional Programming (3)#Fundraising (8)#GCP (5)#Gemma (4)#Generative AI (3)#Git (8)#Go (220)#Go-to-Market (8)#Google ADK (36)#Governance (56)#Granite (6)#GraphQL (3)#Growth (3)#Guardrails (25)#HIPAA (3)#HTTP (3)#Harness Engineering (8)#Hiring (8)#Hugging Face (8)#Human-in-the-Loop (8)#IBM watsonx (8)#Identity (11)#Integration (3)#Intellectual Property (8)#Interfaces (3)#JavaScript (8)#KYC (11)#KYC and AML (12)#Kafka (10)#Kubernetes (17)#LLM (5)#LLM Inference (8)#LLM-as-Judge (3)#LLMs (135)#LangChain (8)#LangGraph (11)#Leadership (26)#Ledger (12)#Legal (8)#Lending (14)#LlamaIndex (8)#MCP (22)#MLOps (31)#Machine Learning (32)#Marketing (16)#Markets (4)#Memory (15)#Memory Management (5)#Metrics (6)#Microservices (3)#Microsoft Agent Framework (150)#Middleware (6)#Migration (9)#Monitoring (3)#Multi-Agent (10)#Multi-Agent AI (14)#Multi-Agent Systems (73)#Multimodal (3)#Multimodal AI (8)#NIM (5)#NVIDIA (8)#OAuth (3)#OWASP (7)#Observability (44)#On-Device AI (8)#Open Source (7)#OpenTelemetry (5)#Operating Systems (8)#Operations (10)#Opinion (6)#Orchestration (10)#Organizational Design (8)#Payment Rails (16)#Payments (54)#People (8)#Performance (43)#Platform Engineering (9)#PreSales (8)#Privacy (5)#Privacy Engineering (3)#Process (4)#Product (27)#Product Management (8)#Production (8)#Programming (10)#Programming Languages (48)#Prompt Engineering (66)#Prompt Injection (6)#Protocol Buffers (3)#Protocols (9)#Providers (4)#Pydantic AI (8)#Python (142)#Quality (3)#RAG (58)#RBI (3)#REST (5)#Rails (16)#Reasoning Models (8)#Reconciliation (3)#RegTech (8)#Regulation (9)#Reliability (48)#Resilience (4)#Responsible AI (5)#Retrieval (3)#Risk (13)#Rust (32)#SRE (21)#Sales (9)#Scalability (3)#Security (81)#Security Engineering (8)#Self-Evolving Agents (16)#Sessions (3)#Settlement (9)#Soft Skills (8)#Software (3)#Software Architecture (36)#Software Engineering (144)#Spanner (4)#Startups (30)#Strands (8)#Streaming (28)#Structured Output (4)#Sustainability (8)#System Design (32)#Systems Programming (48)#Testing (49)#Tool Use (22)#Tooling (4)#Tools (3)#Trading (8)#Treasury (6)#Type System (3)#Type Systems (11)#TypeScript (8)#Vector Databases (21)#Vector Search (11)#Venture Capital (8)#Version Control (8)#Web Development (6)#Workflows (14)#gRPC (13)#smolagents (8)
Pratik Dhanave · ·6 min read

Mandates and Verifiable Credentials: Proving an Agent Was Authorized

When an AI agent spends your money, "the user said so" is not evidence. A signed mandate chain is.

A deep dive on the mandate chain as evidence: verifiable credentials (VCs), signing, the non-repudiable Intent→Cart→Payment chain, revocation and expiry, and why this replaces 'trust me, the user said so' with cryptograp…

Pratik Dhanave · ·6 min read

Card Authorization, Capture, and Clearing: One Transaction, Three Money States

How to model the card payment as a two-phase auth-then-capture flow plus a clearing tail — handling incremental auths, partial captures, reversals, expiry, and the auth-vs-settled reconciliation that trips up every ledger.

Teaches how to model the card transaction as a two-phase (auth then capture) plus clearing/settlement state machine, handling partial captures, incremental auths, auth expiry/reversal, and the auth-vs-settled amount reconciliation.

Pratik Dhanave · ·6 min read

Integrating 3-D Secure 2 Without Breaking Your Checkout

Wiring the 3DS Server, Directory Server, and issuer ACS into a handshake that produces a cryptogram your authorization message can carry.

Teaches how to integrate 3-D Secure 2: the 3DS Server, Directory Server and issuer ACS handshake, frictionless vs challenge decisioning, device data collection, and liability-shift outcomes feeding the authorization.

Pratik Dhanave · ·6 min read

Network Tokenization and How a Token Vault Shrinks Your PCI-DSS Scope

How a token vault and scheme-issued network tokens push the raw PAN out of your application systems, so most of your services fall out of PCI-DSS scope entirely.

Teaches how a token vault and network tokens (TR-31/EMV payment tokens) remove PAN from application systems, cutting PCI-DSS scope, and how token provisioning, cryptograms, and detokenization boundaries are architected.

Pratik Dhanave · ·6 min read

Engineering SEPA: Mandates, Sequence Types, and the R-Transaction State Machine

How to engineer SEPA SCT and SDD flows: mandate lifecycle storage, pre-notification timing, FIRST/RCUR sequence types, and the R-transaction taxonomy modeled as an explicit state machine.

Teaches how to engineer SEPA SCT and SDD flows: mandate lifecycle storage, pre-notification timing, FIRST/RCUR sequence types, and the R-transaction taxonomy (reject/return/refund/reversal/revocation) as a state machine.

Pratik Dhanave · ·6 min read

Threading a UETR Through SWIFT MT-to-MX Migration

How to parse legacy MT103/MT202 fields, map them to MX pacs equivalents during coexistence, and thread a gpi UETR end-to-end so a cross-border payment stays trackable across correspondent hops.

Teaches how to parse legacy MT103/MT202 fields, map them to MX pacs equivalents during coexistence, and thread a gpi UETR end-to-end so a cross-border payment is trackable across correspondent hops.

Pratik Dhanave · ·6 min read

Building for Instant Payments: RTP, FedNow, and Request-for-Payment

How to engineer for 24x7 irrevocable instant credit — synchronous ISO 20022 messaging, request-for-payment flows, and idempotent liquidity checks with no batch cutoff.

Teaches how to build for 24x7 irrevocable instant credit: synchronous ISO 20022 request/response, request-for-payment (RfP) flows, credit-transfer timeouts, and idempotent liquidity checks at the rail with no batch cutoff.

Pratik Dhanave · ·7 min read

The FIX Protocol: Engineering a Session and Order Gateway

The 40-year-old tag=value protocol still carrying most of the world's equity orders — and how to build an engine that survives a dropped connection.

How FIX session layer (logon, heartbeat, sequence-number gap-fill, resend) and application layer (NewOrderSingle, ExecutionReport) actually work, and how to build a resilient FIX engine.

Pratik Dhanave · ·6 min read

Modeling ISO 20022 Payment Messages Without Losing Your Mind

How to treat pain, pacs, and camt as one typed, schema-driven domain instead of a pile of XML you concatenate by hand.

Teaches how to model, validate, and generate ISO 20022 XML payment messages (pain.001 initiation, pacs.008 interbank, camt.053 statements) with schema-driven typing, structured references, and idempotent message identifiers.

Pratik Dhanave · ·6 min read

Building a Byte-Level ISO 8583 Codec for Card Authorization

A field-by-field guide to decoding bitmaps, data elements, and MTI so a raw TCP frame becomes a typed auth request you can trust.

Teaches how to build a byte-level ISO 8583 encoder/decoder: primary/secondary bitmaps, data-element (DE) field definitions, MTI parsing, and stan/RRN correlation for card authorization messaging.

Pratik Dhanave · ·7 min read

Building a NACHA ACH File Processor: Records, Hash Totals, and Return Codes

Model the fixed-width record hierarchy, warehouse entries until their effective date, and turn R-series returns into automated re-presentment.

Teaches how to build a NACHA file processor: fixed-width file/batch/entry/addenda record hierarchy, hash totals, effective-entry-date windows, and handling R-series return/NOC codes with automated re-presentment logic.

Pratik Dhanave · ·7 min read

Consuming APIs and Handling Webhooks

Talking to a payment rail is the least reliable part of your system. Treat every outbound call as fallible and every inbound webhook as hostile.

Talking to a payment rail is the least reliable part of your system. Treat every outbound call as fallible and reconcile on ambiguity; treat every inbound webhook as hostile — verify, dedupe, ack fast, and go read the truth.

Pratik Dhanave · ·7 min read

Executing Money Flows: Invariants, Reservations, and Overdrafts

A transfer is a state machine with money on the line. Model the states explicitly, reserve funds before you commit, and decide up front what an overdraft even means.

A transfer is a state machine with money on the line. Model the states explicitly, reserve funds before you commit, enforce invariants at every transition, and decide up front what an overdraft even means.

Pratik Dhanave · ·6 min read

The Card Payment Actors Map: Who Actually Does What

One reference model of every party in a card transaction — cardholder, merchant, gateway, acquirer/processor, scheme, and issuer — and the settlement path that moves the real money back the other way.

One reference map of who does what in a card payment: cardholder, merchant, gateway, acquirer/processor, scheme, issuer, and the settlement return path.

Pratik Dhanave · ·7 min read

AP2 vs ACP vs x402 vs Network Tokens: How the Approaches Compare

A clear-eyed look at trust models, who signs what, rails, credential handling, and settlement — and why these four overlap more than they compete.

A clear-eyed comparison across trust model, who signs what, payment rails supported, credential handling, settlement, and best-fit use cases.

Pratik Dhanave · ·8 min read

Building an Agent-Ready Merchant

The surface a store must expose when the buyer is an AI agent, not a browser — and why it is the fintech reliability playbook wearing a new hat.

What a store must expose to sell to agents: a machine-readable product feed/catalog, agentic checkout endpoints, acceptance of delegated payment tokens, idempotency keys for retried agent calls, webhooks for async status…

Pratik Dhanave · ·7 min read

"My Agent Did It": Fraud, Disputes, and Liability in Agentic Commerce

When software holds the card and clicks "buy," the old questions — was this the cardholder, did they mean to, who pays if not — all get harder to answer.

The new fraud surface: prompt injection turning a shopping agent into an attacker's buyer, hijacked delegated credentials (Visa saw ~450% more dark-web 'AI Agent' chatter in H1 2026), and disputes when an agent acted on…

Pratik Dhanave · ·7 min read

The Agentic Checkout Flow, End to End

How an AI agent turns a shopper's intent into a settled purchase, and where ACP and AP2 plug into the same eight-stage skeleton.

A complete walkthrough: product discovery via an AI surface → cart assembly → user approval/mandate → delegated payment token → merchant checkout → authorization → fulfillment → receipts/webhooks.

Pratik Dhanave · ·5 min read

Building a Dunning and Retry Engine for Failed Payments

How decline-code classification, backoff scheduling, retry budgets, and network-token refresh recover subscription revenue without hammering the rails.

Teaches how to build a smart retry/dunning system: decline-code classification (hard vs soft), backoff and retry-window scheduling, retry-budget limits, and network-token refresh to recover subscription revenue.

Pratik Dhanave · ·6 min read

Building Marketplace Split Payments and Connected Payouts

Architecting platform balances, commission splits, delayed payouts, and negative-balance recovery without ever losing a cent.

Teaches how to architect marketplace money movement: platform vs connected-account balances, fee/commission splits, delayed payouts, negative-balance handling, and merchant-of-record vs facilitator models.

Pratik Dhanave · ·6 min read

Engineering Escrow: Conditional Hold and Release with Double-Entry Safety

How to build escrow and conditional hold/release — segregated ledger accounts, release conditions and approvals, partial releases, and expiry auto-refund that never strand money.

Teaches how to build escrow and conditional hold/release: segregated escrow ledger accounts, release conditions/approvals, partial releases, and expiry auto-refund with double-entry safety.

Pratik Dhanave · ·7 min read

Card Networks Enter Agentic Commerce: Visa Intelligent Commerce and Mastercard Agent Pay

How Visa and Mastercard are reshaping tokenization so an AI agent can pay on your behalf — with scoped credentials, agent-aware identity, and the network doing what it has always done: authenticate, authorize, tokenize.

How the card networks are adapting tokenization for agents.

Pratik Dhanave · ·7 min read

RTGS vs Deferred Net Settlement

Two ways to move interbank money, and the engineering tradeoff that decides which one you build: settle every payment gross and pay in liquidity, or net at a window and carry settlement risk.

Teaches the engineering tradeoffs between gross real-time settlement and deferred net settlement: liquidity vs finality, queue/gridlock resolution in RTGS, and settlement-risk windows in DNS.

Pratik Dhanave · ·6 min read

Payment-versus-Payment: Settling FX Without Principal Risk

How matched-leg submission, net pay-in scheduling, and conditional simultaneous settlement remove Herstatt risk from cross-currency trades.

Teaches how payment-versus-payment settlement eliminates Herstatt (principal) risk in FX: matched trade submission, pay-in schedules, simultaneous conditional settlement, and pay-out with net funding.

Pratik Dhanave · ·6 min read

Building a Deterministic Interchange Fee Engine

Turn card transaction attributes into interchange, scheme, and markup lines that reconcile to the cent.

Teaches how to build a deterministic fee engine that classifies each transaction into an interchange category (regulated debit, rewards, CPS qualification) and computes interchange + scheme + acquirer markup for merchant statements.

Pratik Dhanave · ·6 min read

Designing a Netting Engine That Collapses Gross Obligations Into Minimal Settlement

How to turn thousands of gross obligations into the fewest net positions per counterparty — with deterministic cutoff snapshots, netting cycles, and net-debit-cap enforcement.

Teaches how to build a netting engine that collapses many gross obligations into minimal net settlement positions per counterparty, handling netting cycles, cutoff snapshots, and net-debit-cap enforcement.

Pratik Dhanave · ·6 min read

Modeling Card Chargebacks as a State Machine

Modeling the full card dispute lifecycle with reason codes, evidence deadlines, representment, arbitration, and provisional-credit ledger entries at every transition.

Teaches how to model the full card dispute lifecycle as a state machine with reason codes, evidence deadlines, representment, pre-arbitration and arbitration, and provisional-credit ledger entries at each transition.

All posts on this site are written by Pratik Dhanave, an Agentic AI Architect with 7+ years building production distributed systems, multi-agent AI platforms, and cloud-native infrastructure. About the author → Each article includes working code, architecture diagrams, and references to the specific frameworks and standards discussed. Browse all posts or explore related topics using the tag cloud above.