Payments, ledgers and idempotency
The P1 reading stack for weeks 2 to 13, one post per build week.
This page is the reading stack for Ledgerline, your payments project in weeks 2 to 13. Read one post per build week, in order. Every design decision in P1 quotes one of these posts, so the reading is the design homework.
What to do
Take the post for the current week from the list below. Read it once before you open your editor. Then write three lines in your notes: the claim, one number, and the part of your ledger it touches. If the post has no number, write the failure it prevents instead.
Read in order. Each post assumes the vocabulary of the one before it. Do not skip a post until you can explain its idea to someone else in two sentences.
Canonical posts, by week
Week 2: idempotency
- 1. Stripe: Designing robust and predictable APIs with idempotency keys. The canonical idempotency design (a retry that cannot charge twice). Your
/transfersendpoint is a small version of it.
Week 3: storing the keys
- 2. Brandur: idempotency keys in Postgres. The reference implementation for your unique-index plus initial-request-row design.
Week 4: double-entry accounting
- 3. Modern Treasury: Accounting for Developers, Part I. Double-entry basics with no finance jargon.
- 4. Modern Treasury: Enforcing Immutability in your Double-Entry Ledger. Why a ledger row must never be updated. Read it before you write the first insert.
Week 5: outbox and scale
- 5. microservices.io: Transactional outbox. The pattern your week 3 worker implements.
- 6. Modern Treasury: How to Scale a Ledger, Part I. The start of a six-part series. Shows where your design hurts first as data grows.
Week 6: failure modes
- 7. The Excited Engineer: Never charge twice, exactly-once payments semantics. The failure catalogue your chaos tests copy.
Rotating blogs
These fill the days between build weeks. Open one and read the best recent post.
- PayPal Engineering: payments at platform scale, plus India hiring posts.
- Adyen: payments engineering at true global scale.
- Square Developer Blog: commerce and payments engineering. The engineering practices archive is the part to skim.
- Brex engineering blog and Brex on Medium: fintech infrastructure writing.
- Hyperswitch (Juspay) blog: open-source payments routing, close to the jobs you apply for.
- Wise Engineering: cross-border money movement. The Kafka-tagged posts also serve the P2 weeks.
Before a payments interview
Interview use
Re-read posts 1 to 4 and the PhonePe blog ledger and UPI posts. Then make sure your Ledgerline pitch quotes at least two of them. Interviewers notice when your reading list matches their domain.
Common mistakes
- Reading all seven posts in one weekend. The schedule exists so each post lands on the week you need it.
- Taking notes you cannot search. Keep the claim, number and project in one line.
- Quoting a post you cannot explain when an interviewer pushes back.