Documentation Index
Fetch the complete documentation index at: https://docs.belio.co.ke/llms.txt
Use this file to discover all available pages before exploring further.
HMAC Request Signing
Every callback we send to your endpoint is signed using HMAC-SHA256. This lets you verify that the request genuinely came from us and has not been tampered with.Signature Headers
Each signed callback includes two additional HTTP headers:| Header | Description |
|---|---|
X-Timestamp | Unix epoch seconds at the time the request was sent |
X-Signature | HMAC-SHA256 signature in the format sha256=<base64-encoded-value> |
How the Signature Is Computed
The signature is computed over the timestamp and the raw request body: wherebody is the exact JSON string of the request body (no reformatting or whitespace changes).
Verifying the Signature
Follow these steps in your callback handler to authenticate each inbound request:Check the timestamp
Reject the request if
X-Timestamp is too old or too far in the future (we recommend a 5-minute tolerance window). This protects against replay attacks where an attacker resends a previously captured request.Recompute the signature
Using your API client secret (UTF-8 encoded), compute:Make sure you use the raw, unmodified request body bytes — do not parse and re-serialize the JSON.
When you regenerate your API client secret, signed callbacks may continue to
be generated with your previous secret for up to 5 minutes. During this
propagation window, verify signatures against both the old and new secrets.
Code Examples
IP Whitelisting
As an additional layer of defense, you can restrict your callback endpoint to only accept inbound requests from our IP address ranges. Any request arriving from an address outside this list can be rejected at the network or application level before your handler code even runs.Our Callback IP Ranges
All outbound callback requests originate from the following IP addresses:| IP Address | Role | Location |
|---|---|---|
88.99.209.40 | Primary | Falkenstein, Saxony, Germany |
94.130.34.45 | Failover | Falkenstein, Saxony, Germany |
Circuit Breaking for Unreachable Callback URLs
To protect both your infrastructure and ours from cascading failures, we apply a per-URL circuit breaker to all outbound callbacks. If your endpoint becomes temporarily unavailable, the circuit breaker automatically backs off and retries without flooding your server.Circuit Breaker States
Each callback URL you register gets its own independent circuit breaker with three states:| State | Behaviour |
|---|---|
| Closed (normal) | Callbacks are delivered as usual |
| Open (tripped) | Callbacks to this URL are silently skipped — your endpoint is not contacted |
| Half-Open (testing) | One test callback is attempted; success closes the circuit, failure re-opens it with increased backoff |
Configuration
The circuit breaker behaviour is governed by the following parameters:| Parameter | Default | Description |
|---|---|---|
| Max failures | 5 | Number of consecutive failures within a call timeout window before the circuit opens |
| Reset timeout | 1 minute | How long the circuit stays open before moving to half-open and attempting a test request |
| Max reset timeout | 10 minutes | Upper bound on the reset timeout regardless of how many times backoff has multiplied it |
| Backoff factor | 2.0 | Multiplier applied to the reset timeout on each successive failure — e.g. 1 min → 2 min → 4 min → … |
| Randomization factor | 0.2 | Adds ±20 % jitter to each reset timeout to prevent synchronized reconnect storms across multiple URLs |
| Call timeout | 5 seconds | How long we wait for your endpoint to respond before counting the attempt as a failure |
Backoff Sequence
With the default settings, successive circuit opens produce the following reset timeouts (before jitter is applied):| Open # | Reset timeout |
|---|---|
| 1st | 1 minute |
| 2nd | 2 minutes |
| 3rd | 4 minutes |
| 4th | 8 minutes |
| 5th + | 10 minutes (capped) |
The ±20 % jitter means the actual wait time varies slightly around each value
above — for example, a 4-minute timeout becomes somewhere between 3 min 12
s and 4 min 48 s. This prevents multiple circuit breakers from all
attempting recovery at exactly the same moment.
Recommendations
- Return HTTP 200 quickly. Acknowledge the callback as soon as you receive it and process it asynchronously. This keeps your response time well under the 5-second call timeout.
- Keep your endpoint healthy. A single URL accumulates failures independently — a slow endpoint will trip its own breaker without affecting other URLs you have registered.
- Monitor for silent skips. While the circuit is open, callbacks are not delivered and are not retried after the circuit closes. Make sure your integration does not rely solely on callbacks for critical state updates.