Thursday, August 27, 2026

What is an Real Time payments (RTP)

 For an SRE interview, think of an RTP (Real-Time Payments) system as a highly available distributed system where a payment must move through multiple services within seconds without being duplicated or lost.

End-to-end RTP payment flow

Suppose A sends ₹10,000 to B:

Mobile App → API Gateway → Authentication → Payment Service → Fraud/Risk → Account/Ledger → RTP Network → Receiver Bank → Confirmation

The important stages are:

  1. Payment request — Customer submits amount and beneficiary information. The system creates a unique transaction/payment ID.

  2. Authentication — The bank verifies the customer using credentials, PIN, token, MFA, etc.

  3. Validation — Check account status, beneficiary details, transaction limits and available balance.

  4. Fraud/Risk check — Rules or models evaluate whether the transaction looks suspicious.

  5. Payment processing — The payment service records the transaction and coordinates the debit.

  6. RTP network — The sending institution sends the payment instruction through the relevant real-time payment rail/network.

  7. Receiving bank — The receiving institution validates the request and credits the beneficiary.

  8. Confirmation — Success/failure status travels back to the sender, and the transaction records are reconciled.

What an SRE needs to worry about

Imagine the customer taps Pay, but a network timeout occurs. The app doesn't know whether the bank actually processed the ₹10,000.

The customer taps Pay again.

You must prevent:

₹10,000 + ₹10,000 = ₹20,000 accidentally debited.

This is why idempotency is extremely important in payment systems. The same payment request should not create multiple financial transactions.

For example:

Payment ID: PAY-12345

Request #1 → timeout
Request #2 → same Payment ID

The payment service recognizes PAY-12345 and returns the existing transaction result instead of processing another debit.

Another important concept is transaction state:

CREATED
   ↓
VALIDATING
   ↓
PROCESSING
   ↓
SENT
   ↓
SUCCESS

Failures could lead to states such as:

FAILED
REJECTED
TIMED_OUT
PENDING

A PENDING transaction is particularly important. You cannot simply assume it failed, because the receiver may actually have been credited.

SRE monitoring

For RTP, I'd expect dashboards/alerts around:

Availability → latency → transaction success rate → error rate → pending transactions → timeout rate → duplicate attempts → queue lag → database health → downstream-bank/network failures.

Example SLO:

99.99% of payment API requests successfully processed, with 99% completing within the agreed latency target.

Very common interview question

Interviewer: "A customer says money was debited, but the beneficiary didn't receive it. How would you investigate?"

A strong SRE approach is:

Transaction ID → API logs → payment service → ledger/debit record → outbound message → RTP network response → receiving-bank response → transaction state → reconciliation

You should not immediately retry the payment, because that could create a duplicate.

This connects several important SRE topics you've been learning: SLA/SLO/SLI, load balancing, caching, Kubernetes, Prometheus, Elasticsearch and Kibana. RTP is a good system to use for practicing all of them together.

Payment Tech Key words

 RTP - real time payments

  • Payment rails: RTP, UPI, IMPS, NEFT, RTGS, ACH, SWIFT, SEPA, FedNow
  • Card payments: Issuer, Acquirer, Merchant, Payment Gateway, Payment Processor, Card Network, Authorization, Capture, Clearing, Settlement
  • Transaction lifecycle: Initiation, Authentication, Authorization, Processing, Clearing, Settlement, Reconciliation, Refund, Reversal, Chargeback
  • Payment messaging: ISO 8583, ISO 20022, SWIFT messages, pacs.008, pacs.002, pain.001
  • Security: PCI DSS, Tokenization, Encryption, HSM, TLS, 3-D Secure (3DS), MFA, CVV, Fraud Detection
  • Reliability/SRE: Idempotency, Retry, Timeout, Circuit Breaker, Rate Limiting, High Availability, Disaster Recovery, RTO, RPO
  • Distributed systems: Kafka, Event-driven architecture, Message Queue, API Gateway, Microservices, REST API, Eventual Consistency, Distributed Transactions
  • Observability: Prometheus, Grafana, Elasticsearch, Kibana, Distributed Tracing, Correlation ID, Transaction ID
  • Important payment states: Initiated, Pending, Authorized, Declined, Completed, Failed, Reversed, Refunded
  • Important metrics: TPS (Transactions Per Second), Success Rate, Decline Rate, P95/P99 Latency, Timeout Rate, Error Rate, Queue Lag