Skip to content

aws-sadaf/stripe

Repository files navigation

Stripe Connect Interview Preparation

Complete solution for Part 1 of the Stripe Solutions Architect interview - building an on-demand delivery service with Stripe Connect.

📁 Files Overview

  • part1-solution.md - Complete written solution with detailed explanations
  • demo-code.js - Working Node.js demo you can run live
  • visual-diagram.md - ASCII diagrams for presentation
  • presentation-guide.md - 15-minute presentation script with timing
  • quick-reference.md - Cheat sheet for quick lookup
  • package.json - Node.js dependencies

🚀 Quick Start

1. Setup Stripe Account

  1. Go to https://dashboard.stripe.com/register
  2. Create a test account (no activation needed)
  3. Navigate to DevelopersAPI Keys
  4. Copy your Secret Key (starts with sk_test_)
  5. Go to Connect in dashboard and click "Get started"
  6. Click "Save and exit" to skip the guide

2. Install Dependencies

cd stripe
npm install

3. Configure API Key

Edit demo-code.js and replace the API key:

const stripe = require('stripe')('sk_test_YOUR_SECRET_KEY_HERE');

4. Run the Demo

npm run demo

You should see output showing:

  • Restaurant account creation
  • Courier account creation
  • Payment collection
  • Funds routing

📊 What to Present

During the Interview (15 min):

  1. Open these files:

    • visual-diagram.md - For showing architecture
    • demo-code.js - For walking through code
    • Stripe Dashboard (test mode)
    • Stripe API docs (have tabs ready)
  2. Follow this structure:

    • Use presentation-guide.md for timing and talking points
    • Reference quick-reference.md for API calls
    • Show visual-diagram.md for architecture diagrams
  3. Be ready to:

    • Run the demo live
    • Show created accounts in Stripe Dashboard
    • Explain your decision-making process
    • Discuss edge cases and alternatives

🎯 Key Points to Emphasize

Why Custom Accounts?

  • Full control over onboarding UX
  • Collect specific business information
  • Handle compliance directly
  • Maintain brand consistency

Why Destination Charges?

  • Automatic fund routing to restaurant
  • Platform collects application fee easily
  • Central dispute management
  • Full transaction visibility

Why Separate Transfers?

  • Flexible courier payment timing
  • Can transfer after delivery confirmation
  • Different amounts to different parties
  • Easy to implement complex fee structures

💡 Architecture Summary

Customer ($50)
    ↓
Platform (Destination Charge)
    ↓
    ├─→ Restaurant ($40 - fees) [automatic via transfer_data]
    ├─→ Courier ($10) [manual via Transfer API]
    └─→ Platform keeps ($4) [via application_fee_amount]

🧪 Testing

Test Cards (use any future expiry, any CVC):

  • Success: 4242 4242 4242 4242
  • Decline: 4000 0000 0000 0002
  • Requires SCA: 4000 0025 0000 3155

Test Bank Accounts:

  • Routing: 110000000
  • Account: 000123456789 (success)

📚 Stripe Documentation Links

Keep these open during the interview:

❓ Common Interview Questions

Q: Why not Standard accounts? A: Less control over UX, redirects to Stripe, harder to customize for our specific needs.

Q: What about Direct charges? A: Connected account would be liable for disputes. Destination charges give platform more control.

Q: How do you handle refunds? A: Use reverse_transfer: true to reverse the restaurant transfer, and refund_application_fee to refund platform fee.

Q: What about taxes? A: Enable automatic_tax on PaymentIntent. Stripe handles 1099 reporting for connected accounts.

Q: Payout timing? A: Default 2-day rolling. Configurable per account. Instant payouts available for additional fee.

Q: International support? A: Connect supports 40+ countries. Need to handle multiple currencies and local payment methods.

🎬 Demo Script

  1. Show architecture (visual-diagram.md)
  2. Explain onboarding (walk through account creation code)
  3. Demonstrate payment (show PaymentIntent creation)
  4. Show funds routing (explain transfer to courier)
  5. Discuss edge cases (refunds, disputes, failures)
  6. Open for questions

✅ Pre-Interview Checklist

  • Stripe test account created
  • Connect enabled in dashboard
  • API keys copied
  • Demo code tested and working
  • All files reviewed
  • Presentation guide read through
  • Stripe docs tabs open
  • Screen sharing tested
  • Confident and ready!

🔥 Pro Tips

  1. Start with the "why" - Explain your architectural decisions
  2. Use diagrams - Visual aids help communicate complex flows
  3. Think like a SA - Consider stakeholders, edge cases, scalability
  4. Be conversational - This is a discussion, not a lecture
  5. Ask clarifying questions - Shows you think critically
  6. Mention production considerations - Webhooks, monitoring, error handling
  7. Stay calm - You know this material!

📞 Support

If you have questions about the solution:

  • Review part1-solution.md for detailed explanations
  • Check quick-reference.md for API call syntax
  • Consult Stripe docs for official documentation

Good luck with your interview! 🚀

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published