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
1
Open the Accelebit Dashboard
Go to dashboard.accelebit.com and sign in to your account.
2
Navigate to the Webhooks section
In the left sidebar, select Developers, then click Webhooks.
3
Add your endpoint URL
Click Add endpoint and enter the URL where Accelebit should send events. Your endpoint must use HTTPS in production.
4
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.
5
Copy your webhook signing secret
After saving the endpoint, copy the webhook signing secret. You will use this to verify that incoming requests originate from Accelebit.
Webhook payload structure
Every webhook request includes the following HTTP headers:
The request body uses this structure:
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:
After seven failed attempts, the delivery is marked as permanently failed. You can manually trigger a retry for any failed delivery from the Webhooks section of the Dashboard.
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.