Decouple Receipt from Processing
Return 200 immediately, process asynchronously. This is the foundation of a reliable webhook integration.1
Receive the webhook
Your endpoint receives the POST request from Smartcar
2
Persist immediately
Write the raw payload to a queue, database, or object storage
3
Return 200
Acknowledge receipt with a 200 status code (within 15 seconds)
4
Process asynchronously
A background worker processes the persisted payload
Why This Matters
- Prevents timeouts from slow business logic
- Allows retry of processing without requesting redelivery
- Enables processing updates without losing historical events
- Survives outages in downstream systems
Implementation Examples
Production-Ready Pattern
For a complete serverless implementation, see the Webhook Receiver Recipe, which provides:- API Gateway for HTTPS endpoint
- Lambda function for webhook receipt
- SQS queue for async processing
- Dead letter queue for failed messages
- CloudWatch monitoring and alerts

