How webhooks work
When an event occurs — such as a payment being captured or a refund being initiated — Accelebit delivers a POST request to every endpoint you have registered for that event type. Your server receives a JSON payload alongside a set of verification headers. You confirm receipt by returning a2xx response within 15 seconds.
Because delivery is guaranteed at least once, the same event may occasionally arrive more than once. Use the X-Webhook-Id header to deduplicate events in your handler.
Setting up webhooks
Open the Accelebit Dashboard
Go to dashboard.accelebit.com and sign in to your account.
Add your endpoint URL
Click Add endpoint and enter the URL where Accelebit should send events. Your endpoint must use HTTPS in production.
Select the events to receive
Choose which event types your endpoint should receive. You can subscribe to individual events or all events on your account.
Webhook payload structure
Every webhook request includes the following HTTP headers:| Header | Description |
|---|---|
Content-Type | Always application/json |
X-Webhook-Signature | HMAC-SHA256 signature of the raw request body |
X-Webhook-Id | Unique delivery identifier, used for deduplication |
X-Webhook-Timestamp | ISO 8601 timestamp of when Accelebit dispatched the event |
Webhook amounts are in minor units (cents). An
amount of 5500 in EUR represents 55.00 EUR. This differs from the REST API, which expresses amounts as decimal strings.Verifying signatures
Always verify theX-Webhook-Signature header before processing any webhook payload. This confirms the request originated from Accelebit and that the body has not been tampered with in transit.
Compute an HMAC-SHA256 digest of the raw request body using your webhook signing secret, then compare the result to the value in X-Webhook-Signature. Use a constant-time comparison to prevent timing attacks.
Responding to webhooks
Your endpoint must return a2xx status code within 15 seconds of receiving a webhook request. If Accelebit does not receive a 2xx response within that window — whether due to a timeout, a network error, or a non-2xx status — the delivery is considered failed and will be retried.
Retry behavior
When a delivery fails, Accelebit retries it with exponential backoff across up to seven attempts:| Attempt | Delay |
|---|---|
| 1 | Immediate |
| 2 | 1 minute |
| 3 | 5 minutes |
| 4 | 30 minutes |
| 5 | 2 hours |
| 6 | 12 hours |
| 7 | 24 hours |
Idempotency
Because webhooks are delivered at least once, your handler must be idempotent — processing the same event twice should produce no unintended side effects. Use theX-Webhook-Id header to detect and skip duplicate deliveries:
Best practices
- Always verify signatures before trusting or acting on any webhook payload.
- Return 200 immediately and move business logic to a background job to avoid timeouts.
- Deduplicate using
X-Webhook-Idand persist the ID store across process restarts. - Use HTTPS for your webhook endpoint in production environments.
- Do not rely solely on webhooks for critical flows. Before fulfilling an order, confirm payment status directly via
GET /v1/payments/:id. - Log webhook payloads to support debugging and payment reconciliation.