Overview
Webhooks allow your server to receive automatic notifications when events occur in your Atlas account. This is essential for:- Order fulfillment after successful payments
- Sending confirmation emails
- Updating inventory
- Handling failed payments
Setting Up Webhooks
- Go to your Dashboard
- Add your endpoint URL (e.g.,
https://yoursite.com/webhooks/atlas) - Select the events you want to receive
- Copy your webhook signing secret
Event Types
| Event | Description |
|---|---|
payment.authorized | Payment was authorized (manual capture) |
payment.captured | Payment was captured successfully |
payment.failed | Payment was declined or failed |
payment.refunded | Payment was refunded (full or partial) |
session.expired | Payment session expired |
session.canceled | Payment session was canceled |
Webhook Payload
Verifying Signatures
Always verify webhook signatures to ensure requests are from Atlas:Best Practices
- Return 200 quickly - Process webhooks asynchronously to avoid timeouts
- Handle duplicates - Use idempotency keys or check if you’ve already processed the event
- Verify signatures - Always verify the
x-atlas-signatureheader - Use HTTPS - Webhook endpoints must use HTTPS in production
- Retry logic - Atlas retries failed webhooks with exponential backoff
Retry Policy
If your endpoint returns a non-2xx status code, Atlas will retry:| Attempt | Delay |
|---|---|
| 1 | Immediate |
| 2 | 5 minutes |
| 3 | 30 minutes |
| 4 | 2 hours |
| 5 | 24 hours |