Answer-first: The PayPay architecture scales to handle millions of payment transactions by isolating promotional campaign logic from the core ledger. Using a distributed SQL transactional layer (TiDB) and asynchronous event streaming via Apache Kafka, the system maintains 99.99% availability and data consistency during high-concurrency campaigns.

This is a deep-dive research series exploring the backend architecture of PayPay, Japan’s leading mobile payment platform with over 70 million users and 7.8 billion annual transactions.


Executive Summary: PayPay’s Engineering Evolution

Context: From Zero to Japan’s Payment Infrastructure

PayPay launched in October 2018 as a joint venture between SoftBank, Yahoo! JAPAN, and Paytm. Today, the platform supports:

The Solution: Four Architectural Pillars

  1. Microservices with Domain-Driven Design (DDD): Over 100 microservices communicating via gRPC/Protobuf.
  2. GitOps with Argo CD and Argo Rollouts: Progressive canary deployments and declarative infrastructure management.
  3. Event-Driven Resilience with Apache Kafka: Asynchronous event streams buffer high-volume campaign traffic to protect database ledgers.
  4. Distributed SQL with TiDB: Multi-master distributed database providing horizontal write scaling with full ACID guarantees.

Series Contents



FAQ

Implementing _Index demands strict ACID transactional isolation and pessimistic row locking during balance or inventory updates. Distributed Saga orchestration coordinates multi-stage rollbacks, preventing partial state writes across heterogeneous databases.

How does PayPay handle 7.8 billion transactions per year without downtime?

PayPay uses three layers of reliability: (1) microservices with circuit breakers isolate failures to individual services without cascading; (2) Kafka-backed event sourcing with idempotency keys prevents double-processing on retry; (3) campaign pre-scaling — before major promotions, PayPay pre-warms the compute fleet based on historical traffic models.

Why did PayPay migrate from Amazon Aurora to TiDB?

PayPay migrated from Aurora to TiDB to eliminate read/write replica lag during high-concurrency campaigns. TiDB’s Raft-based distributed SQL provides multi-master writes with linearizable consistency.

What is PayPay's approach to campaign pre-scaling?

Before a major promotion, PayPay’s SRE team runs a capacity planning model against historical data. 48 hours before the campaign, they scale the compute fleet to 150–200% of projected peak and run chaos engineering drills to validate fallback paths.

PayPay Microservices: GitOps & Kubernetes Blueprint

Prerequisite: This is the starting part of the series — no prior part is required. Later parts assume the concepts introduced here. Answer-first: PayPay scales over 100 microservices for 60+ million users in Japan by combining Domain-Driven Design boundaries with GitOps CD automation using ArgoCD and Argo Rollouts. Automated canary deployments validate new code against live production metrics before full traffic shifting. Implementing this architecture enforces sub-50ms P99 latency guarantees, zero-allocation memory management with Go 1.24 unique.Handle, and fault-tolerant Dapr 1.15 component orchestration. ...

May 5, 2026 · 8 min · Lê Tuấn Anh

PayPay Event-Driven Architecture: Kafka at Scale

Prerequisite: Familiarity with the concepts introduced in Part 1 — Microservices Gitops. Review it first if the terminology in this part is unfamiliar. Answer-first: Managing transaction surges during PayPay’s massive marketing campaigns requires event-driven architecture powered by Apache Kafka. Partition key tuning, Go consumer worker pools, and channel-based backpressure prevent message loss during peak traffic spikes. Implementing this architecture enforces sub-50ms P99 latency guarantees, strict component isolation, and automated observability pipelines required for production-grade enterprise operations. ...

May 5, 2026 · 8 min · Lê Tuấn Anh

PayPay Data Infrastructure: TiDB & MySQL Sharding in Go

Prerequisite: Familiarity with the concepts introduced in Part 2 — Event Driven Kafka. Review it first if the terminology in this part is unfamiliar. Answer-first: PayPay migrated its database layer from AWS Aurora MySQL to TiDB Distributed SQL to overcome vertical scaling limitations. TiDB’s Raft-based auto-sharding and horizontal compute/storage separation deliver linear scaling under billion-row transaction tables. Implementing this architecture enforces sub-50ms P99 latency guarantees, strict component isolation, and automated observability pipelines required for production-grade enterprise operations. ...

May 5, 2026 · 8 min · Lê Tuấn Anh

PayPay SRE Practices: Chaos Engineering & Resilience

Prerequisite: Familiarity with the concepts introduced in Part 3 — Data Layer Tidb. Review it first if the terminology in this part is unfamiliar. Answer-first: Ensuring 99.99% availability for payment systems demands proactive SRE practices and automated Chaos Engineering. Injecting synthetic latency, pod failures, and network partitions via Chaos Mesh validates microservice circuit breakers before real production incidents occur. Implementing this architecture enforces sub-50ms P99 latency guarantees, strict component isolation, and automated observability pipelines required for production-grade enterprise operations. ...

May 5, 2026 · 10 min · Lê Tuấn Anh

PayPay Campaign Engine: Peak Sales & Wallet Rewards

Prerequisite: Familiarity with the concepts introduced in Part 4 — Sre Chaos Engineering. Review it first if the terminology in this part is unfamiliar. Answer-first: Scaling for billion-yen cashback campaigns requires pre-warmed Redis cluster caching, token-bucket rate limiting at the API gateway, and async queue-based payment processing to shave peak traffic spikes. Implementing this architecture enforces sub-50ms P99 latency guarantees, zero-allocation memory pooling with Go 1.24 unique.Handle, and fault-tolerant Dapr 1.15 component orchestration for resilient production scaling. ...

May 5, 2026 · 9 min · Lê Tuấn Anh

PayPay AI Platform: Machine Learning & Fraud Engine

Prerequisite: Familiarity with the concepts introduced in Part 5 — Campaign Architecture. Review it first if the terminology in this part is unfamiliar. Answer-first: Integrating AI capabilities into payment platforms involves embedding real-time LLM RAG hubs for customer support and ML fraud detection models into transaction evaluation pipelines, enforcing sub-20ms model inference SLAs. Deploying this architecture guarantees sub-50ms P99 latency bounds, zero-allocation memory pooling with Go 1.24 string interning, and automated OpenTelemetry GenAI streaming observability. ...

May 5, 2026 · 10 min · Lê Tuấn Anh