SpinTheMic
Pro

Interview practice question

Designing a pluggable payment module

Backend Engineering · OOP and Design Patterns · Experienced

Design the class structure for a payment module that supports multiple providers, retries, idempotency and webhooks.

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • PaymentGateway interface; adapter per provider.
  • PaymentService orchestrates with idempotency keys.
  • Payment entity with state machine.
  • Webhook handler maps provider events.
  • Decorators for retries, logging, metrics.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics