Backend

The Inbox Pattern on AWS

event duplicate (rejected) failure → DLQ
Stripe
Payment provider
API Gateway
Webhook ingress
Webhook Receiver
AWS Lambda
· verify signature· validate type· conditional PutItem
Webhook Inbox
DynamoDB
Payment Worker
AWS Lambda
EventBridge
PaymentSucceeded
Order Service
AWS Lambda
Orders
DynamoDB
Payments
DynamoDB
Failure Queue
SQS · DLQ
Webhook POSTconditional PutItemStreams · INSERT-onlypublishPaymentSucceededstatus = SUCCEEDEDretries exhaustedsame eventId → rejectedduplicate eventId → 2xx · ignored (no-op)⚠ dual-write gap
not atomic → Outbox (next post)
The Inbox Pattern on AWS: webhooks are deduplicated at the conditional write, drained in order by the worker, and fanned out through EventBridge - with the dual-write gap that the Outbox pattern closes next.