Project 6: Full Payment Processing Simulator (Capstone)
Project 6: Full Payment Processing Simulator (Capstone)
Project Overview
| Attribute | Value |
|---|---|
| Difficulty | Level 5: Expert |
| Time Estimate | 2-3 months |
| Programming Language | Multi-language (system components) |
| Knowledge Area | Full Payment Ecosystem |
| Key Technologies | All previous projects + Settlement, Fraud Detection |
| Coolness Level | Level 5: Industry Expert |
| Business Potential | 5. Deep Domain Expertise |
Learning Objectives
By completing this capstone project, you will:
- Build a complete payment ecosystem - All parties from merchant to issuer
- Understand multi-party cryptographic trust - Each partyโs keys and certificates
- Implement authorization AND settlement - Dual-message transaction flow
- Handle chargebacks and disputes - What happens when security fails
- Integrate fraud detection - Risk scoring and decision rules
- Master the four-party model - Merchant, Acquirer, Network, Issuer
The Core Question Youโre Answering
โHow does money actually move when you swipe a credit card?โ
Most developers understand authorization (โcard approvedโ), but thatโs only half the story. This project teaches the complete flow from card swipe to money in the merchantโs bank account.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ THE COMPLETE PAYMENT LIFECYCLE โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ PHASE 1: AUTHORIZATION (milliseconds) โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ "Can this card pay $100?" โ
โ โ
โ Customer โ Merchant โ Acquirer โ Network โ Issuer โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ "APPROVED" or "DECLINED" โ
โ โ
โ NO MONEY MOVES YET! Just a promise from the issuer. โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ PHASE 2: CAPTURE (hours later) โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ "I'm ready to collect that $100" โ
โ โ
โ Merchant โ Acquirer: "Here's my authorized transaction" โ
โ (Batch of all day's transactions) โ
โ โ
โ STILL NO MONEY MOVES! Just confirmation to collect. โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ PHASE 3: CLEARING (that night) โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ "Everyone reconcile your transactions" โ
โ โ
โ Acquirer โ Network: "I have $1M in Visa transactions" โ
โ Network: "Let me match these with issuers..." โ
โ Network โ Issuer: "Your cardholders spent $500K" โ
โ โ
โ NUMBERS ARE AGREED, but still no money. โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ PHASE 4: SETTLEMENT (next business day) โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ "Move the money!" โ
โ โ
โ Issuer Bank โ Fed Wire โ Acquiring Bank โ
โ โ
โ FINALLY: Money moves from cardholder's bank to merchant's bank โ
โ โ
โ Total time: 1-3 business days โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Deep Theoretical Foundation
1. The Four-Party Model
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ FOUR-PARTY MODEL โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ CARDHOLDER โ โ MERCHANT โ โ
โ โ โ โ โ โ
โ โ Has card โโโโโโโPURCHASEโโโโโโโโโโโบโ Sells goods โ โ
โ โ from issuer โ โ โ โ
โ โโโโโโโโฌโโโโโโโโ โโโโโโโโฌโโโโโโโโ โ
โ โ โ โ
โ โ Account โ Account โ
โ โ relationship โ relationship โ
โ โผ โผ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ ISSUER โ โ ACQUIRER โ โ
โ โ โ โ โ โ
โ โ Cardholder'sโโโโโโSETTLEMENTโโโโโโโโโโโบโ Merchant's โ โ
โ โ bank โ โ bank โ โ
โ โ โ โ โ โ
โ โ โข Issues โ โ โข Processes โ โ
โ โ cards โ โ payments โ โ
โ โ โข Authorizesโ โ โข Settles โ โ
โ โ purchases โ โ funds โ โ
โ โ โข Bears โ โ โ โ
โ โ credit โ โ โ โ
โ โ risk โ โ โ โ
โ โโโโโโโโฌโโโโโโโโ โโโโโโโโฌโโโโโโโโ โ
โ โ โ โ
โ โ โ โ
โ โโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โผ โ
โ โโโโโโโโโโโโโโโโโโโโ โ
โ โ CARD NETWORK โ โ
โ โ (Visa, MC) โ โ
โ โ โ โ
โ โ โข Routes auth โ โ
โ โ โข Clears txns โ โ
โ โ โข Sets rules โ โ
โ โ โข Manages โ โ
โ โ disputes โ โ
โ โโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ MONEY FLOW: โ
โ Cardholder โโโบ Issuer โโโบ Network โโโบ Acquirer โโโบ Merchant โ
โ (credit) (settlement) (settlement) (deposit) โ
โ โ
โ FEE FLOW: โ
โ Merchant pays: Interchange (to Issuer) + Network Fee + Acquirer Fee โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
2. ISO 8583 Message Format
ISO 8583 is THE standard for authorization messages:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ISO 8583 MESSAGE STRUCTURE โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ MTI (4 bytes): Message Type Indicator โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ โ โ
โ โ Format: XYZW where: โ โ
โ โ X = Version (0=1987, 1=1993, 2=2003) โ โ
โ โ Y = Class (1=Auth, 2=Financial, 4=Reversal, 8=Network) โ โ
โ โ Z = Function (0=Request, 1=Response, 2=Advice) โ โ
โ โ W = Origin (0=Acquirer, 1=Repeat, 2=Issuer) โ โ
โ โ โ โ
โ โ Examples: โ โ
โ โ 0100 = Authorization Request (acquirer to network) โ โ
โ โ 0110 = Authorization Response (network to acquirer) โ โ
โ โ 0200 = Financial Request (purchase) โ โ
โ โ 0400 = Reversal Request โ โ
โ โ 0800 = Network Management Request (echo, key exchange) โ โ
โ โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ BITMAP (8-16 bytes): Which data elements are present โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ โ โ
โ โ Primary bitmap: 64 bits for data elements 1-64 โ โ
โ โ Secondary bitmap: 64 bits for data elements 65-128 โ โ
โ โ โ โ
โ โ Example: 7234054020C00000 โ โ
โ โ Binary: 0111 0010 0011 0100... โ โ
โ โ โโโ โ โ โ
โ โ โโโโ DE3 โโ DE7 โ โ
โ โ โโโโ DE2 โ โ
โ โ โโโโ Secondary bitmap present โ โ
โ โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ DATA ELEMENTS: The actual transaction data โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ โ โ
โ โ DE2: Primary Account Number (PAN) โ โ
โ โ DE3: Processing Code (what kind of transaction) โ โ
โ โ DE4: Transaction Amount โ โ
โ โ DE7: Transmission Date/Time โ โ
โ โ DE11: System Trace Audit Number (STAN) โ โ
โ โ DE12: Local Transaction Time โ โ
โ โ DE13: Local Transaction Date โ โ
โ โ DE14: Expiration Date โ โ
โ โ DE22: Point of Service Entry Mode โ โ
โ โ DE23: Card Sequence Number โ โ
โ โ DE35: Track 2 Data โ โ
โ โ DE37: Retrieval Reference Number โ โ
โ โ DE38: Authorization Identification Response โ โ
โ โ DE39: Response Code โ โ
โ โ DE41: Card Acceptor Terminal ID โ โ
โ โ DE42: Card Acceptor Merchant ID โ โ
โ โ DE43: Card Acceptor Name/Location โ โ
โ โ DE55: ICC System Related Data (EMV chip data) โ โ
โ โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
3. Settlement and Clearing
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ SETTLEMENT PROCESS โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ END OF BUSINESS DAY โ
โ โโโโโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ MERCHANT BATCH CLOSE โ โ
โ โ โ โ
โ โ Terminal batches all day's transactions: โ โ
โ โ - TXN001: $50.00 (Visa, captured) โ โ
โ โ - TXN002: $125.00 (MC, captured) โ โ
โ โ - TXN003: $30.00 (Visa, void) โ โ
โ โ - TXN004: $200.00 (Visa, captured) โ โ
โ โ โ โ
โ โ Batch total: $375.00 (2 Visa, 1 MC) โ โ
โ โ โ โ
โ โ Sent to Acquirer โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โผ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ ACQUIRER AGGREGATION โ โ
โ โ โ โ
โ โ Combines batches from all merchants: โ โ
โ โ โ โ
โ โ Visa transactions: $5,234,567.00 (12,456 txns) โ โ
โ โ Mastercard: $3,456,789.00 (8,234 txns) โ โ
โ โ Amex: $1,234,567.00 (2,345 txns) โ โ
โ โ โ โ
โ โ Creates clearing files for each network โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โผ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ NETWORK CLEARING (VisaNet, Mastercard Network) โ โ
โ โ โ โ
โ โ 1. Receives clearing files from all acquirers โ โ
โ โ 2. Matches transactions with original authorizations โ โ
โ โ 3. Routes to issuing banks โ โ
โ โ 4. Calculates interchange fees โ โ
โ โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ โ INTERCHANGE CALCULATION โ โ โ
โ โ โ โ โ โ
โ โ โ Transaction: $100.00 โ โ โ
โ โ โ Interchange: 1.80% + $0.10 = $1.90 โ โ โ
โ โ โ โ โ โ
โ โ โ Merchant receives: $100 - $1.90 - fees โ โ โ
โ โ โ Issuer receives: $1.90 (for card benefits, fraud) โ โ โ
โ โ โ โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โผ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ SETTLEMENT (Money Movement) โ โ
โ โ โ โ
โ โ Network calculates net positions: โ โ
โ โ โ โ
โ โ Issuer A owes: $1,234,567 โ โ
โ โ Issuer B owes: $2,345,678 โ โ
โ โ Acquirer X receives: $2,567,890 โ โ
โ โ Acquirer Y receives: $1,012,355 โ โ
โ โ โ โ
โ โ Wire transfers via Federal Reserve or correspondent banks โ โ
โ โ โ โ
โ โ COMPLETE: Merchant's bank account credited โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
4. Chargeback Flow
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ CHARGEBACK PROCESS โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ REASON CODES (Examples): โ
โ โโโโโโโโโโโโโโโโโโโโโโโ โ
โ โข 10.4: Fraud - Card-Absent Environment โ
โ โข 13.1: Merchandise/Services Not Received โ
โ โข 13.3: Not as Described โ
โ โข 12.6: Duplicate Processing โ
โ โ
โ TIMELINE (Visa): โ
โ โโโโโโโโโโโโโโโโโ โ
โ โ
โ Day 0 โ Day 75 โ Day 90 โ Day 120 โ
โ โโโโโโโโโโผโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโ โ
โ Purchase โ Cardholder โ Issuer files โ Representment โ
โ โ disputes โ chargeback โ deadline โ
โ โ โ โ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ STEP 1: CARDHOLDER DISPUTE โ โ
โ โ โ โ
โ โ Cardholder: "I don't recognize this $200 charge" โ โ
โ โ Contacts: Issuing bank โ โ
โ โ Bank investigates, may issue provisional credit โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โผ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ STEP 2: CHARGEBACK FILED โ โ
โ โ โ โ
โ โ Issuer โ Network โ Acquirer โ Merchant โ โ
โ โ โ โ
โ โ Chargeback message includes: โ โ
โ โ - Original transaction details โ โ
โ โ - Reason code โ โ
โ โ - Documentation required from merchant โ โ
โ โ โ โ
โ โ Merchant's account DEBITED for transaction amount โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โผ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ STEP 3: MERCHANT REPRESENTMENT (optional) โ โ
โ โ โ โ
โ โ Merchant can fight the chargeback with evidence: โ โ
โ โ - Signed receipt โ โ
โ โ - Delivery confirmation โ โ
โ โ - AVS/CVV match confirmation โ โ
โ โ - 3D Secure authentication proof โ โ
โ โ โ โ
โ โ If successful: Merchant re-credited, cardholder debited โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โผ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ STEP 4: ARBITRATION (if still disputed) โ โ
โ โ โ โ
โ โ Network makes final decision โ โ
โ โ Losing party pays arbitration fee ($500+) โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ LIABILITY SHIFT WITH 3D SECURE: โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ If merchant used 3D Secure and cardholder authenticated: โ
โ - Fraud liability shifts to ISSUER โ
โ - Chargeback reason 10.4 not available to cardholder โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
5. Fraud Detection
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ FRAUD DETECTION SIGNALS โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ VELOCITY CHECKS: โ
โ โโโโโโโโโโโโโโโ โ
โ โข Same card, multiple transactions in short time โ
โ โข Same card, multiple merchants in different locations โ
โ โข Same IP, multiple different cards โ
โ โข Same device fingerprint, multiple cards โ
โ โ
โ BEHAVIORAL ANOMALIES: โ
โ โโโโโโโโโโโโโโโโโโโโ โ
โ โข Purchase amount unusually high for cardholder โ
โ โข Purchase category unusual (e.g., electronics for groceries card) โ
โ โข Geographic anomaly (card used 1000 miles from home) โ
โ โข Time anomaly (3AM purchase, normally 9-5 usage) โ
โ โ
โ DEVICE/NETWORK SIGNALS: โ
โ โโโโโโโโโโโโโโโโโโโโโโโ โ
โ โข Known fraud proxy/VPN โ
โ โข TOR exit node โ
โ โข Device previously used in fraud โ
โ โข Browser fingerprint mismatch โ
โ โ
โ RISK SCORING MODEL: โ
โ โโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ โ
โ โ Signal โ Points โ Threshold Action โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ New card, first purchase โ +20 โ โ โ
โ โ High-risk merchant category โ +15 โ โ โ
โ โ Amount > 3x average โ +25 โ โ โ
โ โ IP in different country โ +30 โ โ โ
โ โ Known good device โ -40 โ โ โ
โ โ Previous 3DS success โ -20 โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ Score < 30 โ โ Approve โ โ
โ โ Score 30-60 โ โ 3DS Challenge โ โ
โ โ Score 60-80 โ โ Manual Review โ โ
โ โ Score > 80 โ โ Auto-Decline โ โ
โ โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Project Specification
What Youโll Build
A complete payment ecosystem simulator including:
- Merchant Checkout System - Web interface for purchases
- Payment Gateway - Merchantโs processor (from Project 5)
- Card Network Switch - Routes between acquirers and issuers
- Issuer Authorization System - Approves/declines transactions
- Settlement System - Batch clearing and money movement
- Chargeback System - Dispute handling workflow
- Fraud Detection Engine - Real-time risk scoring
- Admin Dashboard - Visualize money flow and security events
System Overview
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ FULL ECOSYSTEM COMPONENTS โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ WEB INTERFACE โ โ
โ โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ โ
โ โ โ Merchant โ โ Admin โ โ Cardholder โ โ โ
โ โ โ Checkout โ โ Dashboard โ โ Portal โ โ โ
โ โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ ACQUIRER DOMAIN โ โ
โ โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ โ
โ โ โ Payment Gateway โ โ 3DS Server โ โ Settlement โ โ โ
โ โ โ (Project 5) โ โ (Project 4) โ โ Engine โ โ โ
โ โ โโโโโโโโโโฌโโโโโโโโโ โโโโโโโโโโฌโโโโโโโโโ โโโโโโโโโโฌโโโโโโโโโ โ โ
โ โ โ โ โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ โ Token Vault (Project 2) โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ NETWORK DOMAIN โ โ
โ โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ โ
โ โ โ Switch (Router) โ โ Clearing House โ โ Dispute Manager โ โ โ
โ โ โ โ โ โ โ โ โ โ
โ โ โ โข BIN routing โ โ โข Match txns โ โ โข Chargeback โ โ โ
โ โ โ โข Load balance โ โ โข Calc fees โ โ โข Represent โ โ โ
โ โ โ โข Fallback โ โ โข Net settle โ โ โข Arbitration โ โ โ
โ โ โโโโโโโโโโฌโโโโโโโโโ โโโโโโโโโโฌโโโโโโโโโ โโโโโโโโโโฌโโโโโโโโโ โ โ
โ โ โ โ โ โ โ
โ โโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโ โ
โ โ โ โ โ
โ โโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโ โ
โ โ ISSUER DOMAIN โ โ
โ โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ โ
โ โ โ Authorization โ โ Fraud Engine โ โ ACS (3DS) โ โ โ
โ โ โ System โ โ โ โ โ โ โ
โ โ โ โ โ โข Velocity โ โ โข Risk decide โ โ โ
โ โ โ โข Check funds โ โ โข Behavior โ โ โข Challenge โ โ โ
โ โ โ โข Apply rules โ โ โข ML scoring โ โ โข Authenticate โ โ โ
โ โ โ โข Respond โ โ โ โ โ โ โ
โ โ โโโโโโโโโโฌโโโโโโโโโ โโโโโโโโโโฌโโโโโโโโโ โโโโโโโโโโฌโโโโโโโโโ โ โ
โ โ โ โ โ โ โ
โ โ โโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโ โ โ
โ โ โ Cardholder Accounts โ โ โ
โ โ โ โโโโโโโโโ โโโโโโโโโ โโโโโโโโโ โโโโโโโโโ โ โ โ
โ โ โ โCard A โ โCard B โ โCard C โ โCard D โ โ โ โ
โ โ โ โ$5000 โ โ$2500 โ โ$10000 โ โ$1500 โ โ โ โ
โ โ โ โโโโโโโโโ โโโโโโโโโ โโโโโโโโโ โโโโโโโโโ โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Expected Demo Output
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PAYMENT ECOSYSTEM SIMULATOR โ
โ Live Transaction Dashboard โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
โ โ
โ REAL-TIME TRANSACTION FLOW โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ TXN: 7f3a9b2c โ Amount: $149.99 โ Card: Visa ****4242 โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ โ
โ โ [14:32:17.001] MERCHANT โ Checkout initiated โ โ
โ โ [14:32:17.023] GATEWAY โ Card tokenized: tok_xyz โ โ
โ โ [14:32:17.045] GATEWAY โ Auth request to network โ โ
โ โ [14:32:17.067] NETWORK โ Routing to Visa (BIN: 424242) โ โ
โ โ [14:32:17.089] ISSUER โ Fraud check: Score 23 (LOW) โ โ
โ โ [14:32:17.112] ISSUER โ Balance check: $5000 available โ โ
โ โ [14:32:17.134] ISSUER โ โ APPROVED (Auth: A12345) โ โ
โ โ [14:32:17.156] NETWORK โ Response routed to acquirer โ โ
โ โ [14:32:17.178] GATEWAY โ Response to merchant โ โ
โ โ [14:32:17.200] MERCHANT โ Order confirmed โ โ
โ โ โ โ
โ โ Total latency: 199ms โ โ
โ โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ DAILY STATISTICS โ
โ โโโโโโโโโโโโโโโโ โ
โ โ
โ Authorizations: 15,234 โ Approved: 14,123 (92.7%) โ
โ Captures: 13,891 โ Refunds: 342 (2.5%) โ
โ Chargebacks: 23 โ Fraud: 12 (0.08%) โ
โ โ
โ Settlement Status: PENDING (closes at 23:00 UTC) โ
โ Pending Amount: $1,234,567.89 โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ FRAUD ALERTS โ
โ โโโโโโโโโโโโ โ
โ โ
โ ๐จ [14:31:45] High-risk transaction declined โ
โ Card: ****9876 โ Amount: $2,500 โ Score: 87 โ Reason: Velocity โ
โ โ
โ โ ๏ธ [14:28:12] Transaction sent to manual review โ
โ Card: ****5555 โ Amount: $800 โ Score: 65 โ Reason: New device โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Project Structure
payment_ecosystem/
โโโ services/
โ โโโ merchant/ # Merchant checkout system
โ โ โโโ checkout-web/ # Web frontend
โ โ โโโ checkout-api/ # Backend
โ โ
โ โโโ acquirer/ # Acquirer domain
โ โ โโโ gateway/ # Payment gateway (Project 5)
โ โ โโโ threeds-server/ # 3DS Server (Project 4)
โ โ โโโ token-vault/ # Token vault (Project 2)
โ โ โโโ settlement/ # Settlement engine
โ โ
โ โโโ network/ # Card network
โ โ โโโ switch/ # Message router
โ โ โโโ clearing/ # Clearing house
โ โ โโโ disputes/ # Chargeback management
โ โ
โ โโโ issuer/ # Issuing bank
โ โโโ authorization/ # Auth engine
โ โโโ fraud-engine/ # Fraud detection
โ โโโ acs/ # 3DS ACS (Project 4)
โ โโโ accounts/ # Cardholder accounts
โ
โโโ shared/
โ โโโ iso8583/ # Message format library
โ โโโ crypto/ # Cryptography utilities
โ โโโ audit/ # Logging framework
โ
โโโ infrastructure/
โ โโโ docker-compose.yml # Full system orchestration
โ โโโ k8s/ # Kubernetes configs (optional)
โ โโโ scripts/
โ โโโ generate-keys.sh # Key generation
โ โโโ simulate-day.sh # Day of transactions
โ โโโ run-settlement.sh # Settlement batch
โ
โโโ admin-dashboard/ # Visualization UI
โ โโโ src/
โ โโโ public/
โ
โโโ tests/
โ โโโ integration/ # End-to-end tests
โ โโโ performance/ # Load tests
โ โโโ security/ # Penetration tests
โ
โโโ docs/
โโโ architecture.md
โโโ message-flows.md
โโโ security-controls.md
Implementation Guide
Phase 1: ISO 8583 Message Library
Goal: Build the messaging foundation.
# iso8583/message.py
from dataclasses import dataclass
from typing import Dict, Optional
import struct
@dataclass
class ISO8583Message:
mti: str # Message Type Indicator
bitmap: bytes # Which fields present
data_elements: Dict[int, bytes] # Field number -> value
def encode(self) -> bytes:
"""Encode message to bytes for transmission"""
result = self.mti.encode('ascii')
result += self.bitmap
for de_num in sorted(self.data_elements.keys()):
result += self._encode_field(de_num, self.data_elements[de_num])
return result
@classmethod
def decode(cls, data: bytes) -> 'ISO8583Message':
"""Decode bytes to message"""
mti = data[0:4].decode('ascii')
bitmap = data[4:12] # Primary bitmap
# Parse data elements based on bitmap...
@dataclass
class AuthorizationRequest(ISO8583Message):
"""0100 - Authorization Request"""
pan: str # DE2
processing_code: str # DE3
amount: int # DE4 (in cents)
transmission_datetime: str # DE7
stan: str # DE11
expiry: str # DE14
pos_entry_mode: str # DE22
terminal_id: str # DE41
merchant_id: str # DE42
def __post_init__(self):
self.mti = "0100"
self.data_elements = {
2: self.pan.encode(),
3: self.processing_code.encode(),
4: str(self.amount).zfill(12).encode(),
7: self.transmission_datetime.encode(),
11: self.stan.encode(),
14: self.expiry.encode(),
22: self.pos_entry_mode.encode(),
41: self.terminal_id.encode(),
42: self.merchant_id.encode(),
}
self.bitmap = self._calculate_bitmap()
Phase 2: Network Switch
Goal: Route authorization requests to correct issuer.
# network/switch.py
class CardNetworkSwitch:
def __init__(self):
self.issuer_connections: Dict[str, IssuerConnection] = {}
self.routing_table = BINRoutingTable()
async def process_authorization(self, request: AuthorizationRequest) -> AuthorizationResponse:
# 1. Validate message format
self._validate_message(request)
# 2. Determine issuer from BIN
bin_prefix = request.pan[:6]
issuer_id = self.routing_table.lookup(bin_prefix)
if not issuer_id:
return AuthorizationResponse(
response_code="14", # Invalid card number
message="Unknown issuer"
)
# 3. Route to issuer
issuer = self.issuer_connections.get(issuer_id)
if not issuer or not issuer.is_connected:
# Try fallback
issuer = self._get_fallback_issuer(issuer_id)
# 4. Forward and await response
response = await issuer.send_authorization(request)
# 5. Log for clearing
await self.clearing_queue.enqueue(ClearingRecord(
request=request,
response=response,
timestamp=datetime.utcnow()
))
return response
Phase 3: Issuer Authorization
Goal: Implement cardholder account management and authorization logic.
# issuer/authorization.py
class IssuerAuthorizationEngine:
def __init__(self, fraud_engine: FraudEngine, account_db: AccountDatabase):
self.fraud_engine = fraud_engine
self.account_db = account_db
async def authorize(self, request: AuthorizationRequest) -> AuthorizationResponse:
# 1. Look up cardholder account
account = await self.account_db.get_by_pan(request.pan)
if not account:
return self._decline("14", "Invalid card")
# 2. Check card status
if account.card_status != CardStatus.ACTIVE:
return self._decline("05", f"Card {account.card_status}")
# 3. Check expiry
if self._is_expired(request.expiry):
return self._decline("54", "Expired card")
# 4. Fraud check
fraud_result = await self.fraud_engine.evaluate(request, account)
if fraud_result.action == FraudAction.DECLINE:
return self._decline("59", "Fraud suspected")
if fraud_result.action == FraudAction.CHALLENGE:
return self._request_3ds(request)
# 5. Check available funds
if account.available_credit < request.amount:
return self._decline("51", "Insufficient funds")
# 6. Place hold on funds
hold = await self.account_db.place_hold(
account_id=account.id,
amount=request.amount,
merchant=request.merchant_id,
expiry=datetime.utcnow() + timedelta(days=7)
)
# 7. Return approval
return AuthorizationResponse(
response_code="00",
auth_code=self._generate_auth_code(),
available_balance=account.available_credit - request.amount
)
Phase 4: Fraud Detection Engine
Goal: Real-time risk scoring.
# issuer/fraud_engine.py
class FraudEngine:
def __init__(self):
self.velocity_checker = VelocityChecker()
self.behavior_analyzer = BehaviorAnalyzer()
self.device_intelligence = DeviceIntelligence()
async def evaluate(self, request: AuthorizationRequest,
account: CardholderAccount) -> FraudResult:
score = 0
signals = []
# Velocity checks
velocity_result = await self.velocity_checker.check(request.pan)
if velocity_result.txn_count_1h > 5:
score += 30
signals.append("HIGH_VELOCITY")
# Behavior analysis
behavior = await self.behavior_analyzer.analyze(request, account)
if behavior.amount_unusual:
score += 25
signals.append("UNUSUAL_AMOUNT")
if behavior.merchant_category_unusual:
score += 15
signals.append("UNUSUAL_MCC")
if behavior.time_unusual:
score += 10
signals.append("UNUSUAL_TIME")
# Device/location checks
device_result = await self.device_intelligence.check(
ip=request.source_ip,
device_fingerprint=request.device_id
)
if device_result.is_known_fraud_proxy:
score += 40
signals.append("FRAUD_PROXY")
if device_result.geo_distance_from_home > 1000: # km
score += 20
signals.append("GEO_ANOMALY")
# Known good signals (reduce score)
if await self._is_trusted_device(request.device_id, account):
score -= 30
if await self._recent_3ds_success(account):
score -= 20
# Make decision
if score >= 80:
action = FraudAction.DECLINE
elif score >= 50:
action = FraudAction.CHALLENGE
elif score >= 30:
action = FraudAction.STEP_UP
else:
action = FraudAction.APPROVE
return FraudResult(
score=max(0, score),
action=action,
signals=signals
)
Phase 5: Settlement Engine
Goal: Batch processing and money movement.
# acquirer/settlement.py
class SettlementEngine:
def __init__(self):
self.transaction_store = TransactionStore()
self.network_client = NetworkSettlementClient()
async def run_settlement(self, settlement_date: date):
"""Run end-of-day settlement"""
# 1. Collect all captured transactions for the day
transactions = await self.transaction_store.get_captured_for_date(settlement_date)
# 2. Group by card network
by_network = self._group_by_network(transactions)
settlement_results = []
for network, txns in by_network.items():
# 3. Calculate totals
gross_amount = sum(t.amount for t in txns)
interchange_fees = sum(self._calc_interchange(t) for t in txns)
net_amount = gross_amount - interchange_fees
# 4. Create clearing file
clearing_file = self._create_clearing_file(network, txns)
# 5. Submit to network
result = await self.network_client.submit_clearing(network, clearing_file)
settlement_results.append(SettlementResult(
network=network,
transaction_count=len(txns),
gross_amount=gross_amount,
interchange=interchange_fees,
net_amount=net_amount,
clearing_reference=result.reference
))
# 6. Update transaction statuses
for txn in txns:
txn.status = TransactionStatus.SETTLED
txn.settlement_date = settlement_date
txn.clearing_reference = result.reference
await self.transaction_store.update(txn)
return settlement_results
def _calc_interchange(self, txn: Transaction) -> Decimal:
"""Calculate interchange fee based on card type and MCC"""
# Simplified - real interchange tables are complex
base_rate = Decimal("0.0180") # 1.80%
fixed_fee = Decimal("0.10") # $0.10
return (txn.amount * base_rate) + fixed_fee
Phase 6: Chargeback System
Goal: Handle disputes and representment.
# network/disputes.py
class DisputeManager:
def __init__(self):
self.dispute_store = DisputeStore()
self.acquirer_client = AcquirerNotificationClient()
async def file_chargeback(self, chargeback: Chargeback):
"""Process a chargeback from issuer"""
# 1. Validate chargeback
if not self._is_valid_reason_code(chargeback.reason_code):
raise InvalidChargebackError("Unknown reason code")
# 2. Check timeframes
original_txn = await self._get_original_transaction(chargeback.original_txn_id)
if not self._within_chargeback_window(original_txn):
raise ChargebackWindowExpired()
# 3. Check if 3DS protected
if original_txn.eci in ["05", "02"]: # Fully authenticated
if chargeback.reason_code.startswith("10."): # Fraud
# Liability shift - reject chargeback
return ChargebackResult(
status="REJECTED",
reason="Liability shift applies - 3DS authenticated"
)
# 4. Store chargeback
dispute = Dispute(
id=generate_dispute_id(),
original_transaction=original_txn,
chargeback=chargeback,
status=DisputeStatus.PENDING,
created_at=datetime.utcnow(),
representment_deadline=datetime.utcnow() + timedelta(days=30)
)
await self.dispute_store.create(dispute)
# 5. Notify acquirer/merchant
await self.acquirer_client.notify_chargeback(dispute)
# 6. Debit merchant account (provisional)
await self._debit_merchant(original_txn.merchant_id, original_txn.amount)
return ChargebackResult(
status="ACCEPTED",
dispute_id=dispute.id
)
async def representment(self, dispute_id: str, evidence: RepresentmentEvidence):
"""Merchant disputes the chargeback"""
dispute = await self.dispute_store.get(dispute_id)
if datetime.utcnow() > dispute.representment_deadline:
raise RepresentmentWindowExpired()
# Update dispute with evidence
dispute.representment = evidence
dispute.status = DisputeStatus.REPRESENTMENT_FILED
await self.dispute_store.update(dispute)
# Route to issuer for review
await self.issuer_client.send_representment(dispute)
Phase 7: Admin Dashboard
Goal: Visualization of the entire system.
Build a web dashboard showing:
- Real-time transaction flow (WebSocket updates)
- Authorization statistics
- Fraud alerts
- Settlement status
- Chargeback queue
- Money flow visualization
Testing Strategy
End-to-End Tests
# tests/integration/test_full_flow.py
async def test_complete_purchase_to_settlement():
"""Test entire lifecycle: auth โ capture โ settle"""
# 1. Create test cardholder with balance
account = await create_test_account(credit_limit=1000)
# 2. Initiate purchase
response = await merchant_checkout(
pan=account.pan,
amount=Decimal("100.00")
)
assert response.status == "APPROVED"
# 3. Capture
capture_response = await gateway_capture(response.transaction_id)
assert capture_response.status == "CAPTURED"
# 4. Run settlement
settlement_result = await run_settlement(date.today())
# 5. Verify
assert settlement_result.net_amount == Decimal("98.10") # After fees
assert account.balance == Decimal("100.00") # Cardholder charged
async def test_fraud_decline():
"""Test high-risk transaction gets declined"""
account = await create_test_account()
# Simulate suspicious activity
await inject_fraud_signals(
pan=account.pan,
ip="185.x.x.x", # Known fraud proxy
velocity=10 # 10 transactions in 1 hour
)
response = await merchant_checkout(
pan=account.pan,
amount=Decimal("2500.00") # High amount
)
assert response.status == "DECLINED"
assert response.reason == "Fraud suspected"
async def test_chargeback_with_3ds():
"""Test that 3DS blocks fraud chargebacks"""
# Purchase with 3DS authentication
response = await merchant_checkout_with_3ds(
pan="4111111111111111",
amount=Decimal("500.00")
)
assert response.eci == "05" # Fully authenticated
# Attempt fraud chargeback
chargeback_result = await issuer_file_chargeback(
transaction_id=response.transaction_id,
reason_code="10.4", # Fraud
amount=Decimal("500.00")
)
assert chargeback_result.status == "REJECTED"
assert "Liability shift" in chargeback_result.reason
Load Testing
# tests/performance/load_test.py
async def test_authorization_throughput():
"""Verify system handles target TPS"""
target_tps = 100 # Transactions per second
duration_seconds = 60
results = await run_load_test(
endpoint="/authorize",
tps=target_tps,
duration=duration_seconds
)
assert results.successful_rate > 0.999 # 99.9% success
assert results.p99_latency_ms < 500 # Under 500ms
assert results.p50_latency_ms < 100 # Median under 100ms
Self-Assessment Checklist
Core Functionality
- Authorization requests flow through entire system
- Responses route back correctly
- Settlement batches process nightly
- Money totals match at each stage
Security
- All components use proper encryption
- Keys managed with split knowledge
- Audit logs capture all transactions
- No PAN leakage anywhere
Fraud Detection
- Velocity checks block rapid-fire fraud
- Behavior analysis flags anomalies
- Risk scores drive decisions
- 3DS integration works correctly
Compliance
- Can map each component to PCI requirement
- Data retention policies enforced
- Chargeback handling follows network rules
Understanding
- Can explain four-party model to anyone
- Understand authorization vs. settlement
- Know how interchange fees work
- Understand liability shift
Resources
Specifications
- ISO 8583 (1987, 1993, 2003 versions)
- Visa BASE I and II
- Mastercard Network Rules
- EMVCo specifications
Books
| Topic | Book | |โโ-|โโ| | Distributed Systems | โDesigning Data-Intensive Applicationsโ by Kleppmann | | Fraud Detection | โData Science for Businessโ by Provost & Fawcett | | Payment Systems | Industry white papers from Visa/Mastercard |
Conclusion
By completing this capstone project, you will have built the most comprehensive payment system simulation possible outside of an actual financial institution. Youโll understand:
- Every party in a credit card transaction
- How money actually moves through the system
- Why each security control exists
- What happens when things go wrong (chargebacks, fraud)
- The economics of payment processing
This knowledge is rare and valuable. Most developers never get this deep into payment infrastructure.
Youโre not just building softwareโyouโre learning how global commerce works.