Design a virtual card provisioning and transaction system

Last updated: August 6, 2025

Quick Overview

Design the system behind Affirm Card, which provisions virtual debit cards that let consumers split any purchase into installments. Cover card issuance, real-time transaction authorization, and installment plan creation.

Affirm
System Design
Software Engineer
Affirm
August 6, 2025
Software Engineer
System Design Round
System Design
Hard

9

7

2,060 solved


Design the system behind Affirm Card, which provisions virtual debit cards that let consumers split any purchase into installments. Cover card issuance, real-time transaction authorization, and installment plan creation.

The Affirm Card is a strategic product that extends BNPL beyond e-commerce to in-store purchases. This question tests your ability to design systems that interact with card network protocols (Visa/Mastercard) while maintaining Affirm's installment logic.

What the Interviewer Expects
  • Design card provisioning with tokenization and secure storage
  • Explain the real-time authorization flow when a consumer taps to pay
  • Handle the bridge between card network authorization and BNPL plan creation
  • Discuss PCI DSS compliance and data security requirements
  • Design for sub-100ms authorization response times
Key Topics to Cover
Card network protocols (ISO 8583)
Real-time authorization systems
PCI DSS compliance
Tokenization and secure card storage
BNPL integration with card rails
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • How would you handle an authorization request when the credit decisioning service is temporarily unavailable?
  • How do you handle authorization reversals and partial captures?
  • What happens when a consumer exceeds their spending limit mid-transaction?
  • How would you support adding the Affirm Card to Apple Pay and Google Pay?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Functional Requirements

  1. Virtual Card Issuance: Users can apply for a virtual card through the Affirm app, which generates an ISO 8583 compliant virtual card.
  2. **Real-time Transaction Auth...
Capacity Estimation

Assuming Affirm serves 10 million users, with an average of 1 transaction per user per week:

  • Total Transactions per Week: 10 million transactions
  • Transactions per Second (TPS): 10 million ...

Submit Your Answer
Markdown supported

Related Questions