Design an Embeddable Drop-In Checkout Component for Merchant Websites

Last updated: November 29, 2026

Quick Overview

Design a JavaScript component that a merchant embeds on its checkout page to render the payment methods available for the shopper's country and currency, collect payment details securely, and handle redirects and 3D Secure challenges.

Adyen
System Design
Frontend Engineer
Adyen
November 29, 2026
Frontend Engineer
System Design Round
System Design
Medium

0

0

0 solved


Design a JavaScript component that a merchant embeds on its checkout page to render the payment methods available for the shopper's country and currency, collect payment details securely, and handle redirects and 3D Secure challenges.

Adyen ships Web Drop-in and Components so merchants can offer dozens of local payment methods without building each one. A frontend interviewer checks how the candidate keeps card data out of the merchant's page, keeps the bundle small despite many methods, and handles the asynchronous flows like 3D Secure and redirects.

What the Interviewer Expects
  • Fetch available payment methods from the server per session instead of hard-coding them
  • Isolate card fields in cross-origin iframes to keep merchants out of PCI scope
  • Lazy load code per payment method to keep the initial bundle small
  • Model the checkout as a state machine covering redirect and challenge flows
  • Expose a stable configuration and event API with versioning
  • Cover accessibility, localisation and theming
Key Topics to Cover
Secure iframes
Code splitting
Checkout state machine
3D Secure
Public API versioning
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 do you keep a merchant's custom CSS from breaking the secured card fields?
  • The shopper returns from a bank redirect in a new tab. How do you resume the payment?
  • How do you release a new version without breaking thousands of merchant integrations?
  • How would you measure and reduce checkout drop-off caused by the component?
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

Merchant includes a script and calls checkout.create('dropin', config).mount('#el') with a session from its server. The component lists payment methods valid for the session's amount, country and cu...

High-Level Design

Core runtime: session handling, a payment-method registry, a state machine, and an event bus to the merchant. On mount it calls the payment-methods endpoint with the session and receives an ordered li...


Submit Your Answer
Markdown supported

Related Questions