Skip to content
Sharp

Design patterns · interview question

Which pattern should you use to provide a consistent API for multiple e-commerce payment providers?

Multiple choiceMediumchapter-13-curatedpremiumdesign-patternsproxy-and-adapter
Choose one answer
Answer and explanation

Correct answer

D. Adapter

Why

The Adapter pattern can provide a consistent API by translating each payment provider's unique interface into a common one expected by the application.

Test yourself on Design patterns

A free test with instant, explained results. No account needed.

Start free test
All Design patterns questions →