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
Card Provisioning Flow

When a consumer requests an Affirm Card, the system: (1) verifies consumer identity and credit eligibility, (2) generates a virtual card number (PAN) ...

Real-Time Authorization Flow

When the consumer makes a purchase: 1. Merchant's terminal sends authorization request to acquiring bank 2. Acquiring bank routes to card network (Vi...


Submit Your Answer
Markdown supported

Related Questions