UNDERSTAND
Bring these concepts with you
BUILD
Your implementation
- Implement verifyWebhookIdempotency(processor) to deliver the same charge.succeeded event twice.
- Send an out-of-order order.shipped event against an unpaid order and assert it is rejected.
- Assert chargeCount === 1 and final order status === 'paid'.
export function verifyWebhookIdempotency(processor) {
// Deliver duplicate charge and out-of-order shipment events.
}Need a hint?
- Assert both the return value of the duplicate event (ignored) and the persisted state (chargeCount === 1).
- State-machine tests must exercise forbidden transitions.
Saved on this device · 0 / 6000 · Do not include passwords or private data.
VERIFY
Acceptance checks
From the folder containing your downloaded files, run:
node checks.mjs ./starter.mjs 5This runs checks up to this step. Earlier steps must work first. Mark each result only after checking your implementation; the website does not run or grade it.
Record your attempt to enable the checklist and reference comparison.
Compare with the reference
Attempt the step first, then compare decisions and behavior. There can be more than one correct implementation.
EXPLAIN
Your interviewer asks
How do you prove a payment retry did not charge the customer twice?
Say your answer aloud, then record the trade-offs and evidence in your notes above.
LOCAL VOICE REHEARSAL
Rehearse your step walkthrough aloud
00:00/ 02:00