Interview practice question
Keeping the ledger consistent with a payment provider
Backend Engineering · Microservices · Experienced
Your payments service charges cards through an external provider and records results in its ledger. Sometimes the charge succeeds but the ledger write fails, or the call times out. How do you keep them consistent?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Record intent before calling provider.
- Idempotency key per charge.
- On timeout, query provider status.
- Webhooks update final state.
- Daily reconciliation with provider reports.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.