Webhook Integration Guides: Direct Ingestion & HMAC Verification
Traditional webhook pipelines require API gateways, verification functions, message queues (SQS/Kafka), and background workers just to validate signatures and deduplicate retries. TimesinkDB ingests webhooks directly over HTTPS—verifying HMAC signatures at the network boundary, extracting metrics and raw JSON blobs under webhooks.{webhookKey}.*, and deduplicating retries automatically.
Provider → API Gateway → Verification Lambda → SQS / Kafka → Ingestion Worker → Relational Database.
Requires multi-resource lifecycle management, connection pool coordination, and custom idempotency tables.
Stripe / GitHub → https://{node}.timesinkdb.com/databases/{id}/webhooks/{webhookKey}
Zero intermediate lambdas. Native database API HMAC validation. Monotonic Last-Write-Wins deduplication. Raw points available for SIMD downsampled queries in <1ms server-side ingest execution.
Database API HMAC Signature Verification
TimesinkDB verifies webhook signatures at the HTTP boundary before touching storage. Requests exceeding the 10 MB ceiling reject upfront with 413 Payload Too Large (PayloadTooLarge). For valid payloads, the engine computes HMAC-SHA256 against the raw body using your configured signing secret—rejecting malformed headers with 400 Bad Request (InvalidPayload) and missing, forged, or expired signatures with 401 Unauthorized (InvalidSignature / ExpiredSignature).
| Provider | Signature Header | Algorithm | Tolerance Window |
|---|---|---|---|
| Stripe | Stripe-Signature |
HMAC-SHA256 (t, v1) | 300 seconds (Replay Defense) |
| GitHub | X-Hub-Signature-256 |
HMAC-SHA256 (sha256=) | Immediate Signature Match |
| Shopify | X-Shopify-Hmac-Sha256 |
HMAC-SHA256 (Base64) | Immediate Signature Match |
| Clerk / Svix | svix-signature |
HMAC-SHA256 (svix-id, svix-timestamp) | 300 seconds (Replay Defense) |
| Custom HMAC | X-Signature (or custom headerName) |
HMAC-SHA256 (Hex or Base64) | N/A (Payload-only HMAC) |
Query-Time Retry Deduplication (Last-Write-Wins)
Webhook delivery guarantees from providers are almost exclusively at-least-once. If your server takes 500ms longer to acknowledge an HTTP request, Stripe or GitHub will retry the webhook 3–8 times. In relational databases, this causes duplicate rows, inflated revenue sums, or costly unique index conflicts.
TimesinkDB canonicalizes all incoming timestamps to 100-nanosecond tick resolution using the provider's authoritative event timestamp (supporting both top-level properties like Stripe's created and nested paths like GitHub's workflow_job.completed_at or Clerk's data.created_at). When multiple webhook retry attempts deliver the exact same series key and payload timestamp (tsProperty), the storage engine resolves them via Last-Write-Wins (LWW) during query scans and reclaims duplicate blocks during background compaction, ensuring accurate sums and counts without external idempotency tables.
High-Concurrency Stream Note: For webhook providers with 1-second timestamp resolution (such as Stripe's whole-second created field) where multiple distinct events can arrive within the same second on the same series key, set tsProperty: "" to assign unique 100ns server arrival ticks so concurrent events are preserved individually during fn=sum queries.
Named Webhook Configurations & Provider Presets
Every webhook endpoint URL corresponds to a named webhook configuration registered on your database (POST /databases/{databaseId}/webhooks/{webhookKey}). Extracted series and blobs are automatically namespaced under webhooks.{webhookKey}.*, keeping webhook URLs clean with zero required query parameters. When routing multiple event types from the same provider that share field names (such as data.object.amount across payment_intent.succeeded and charge.failed), register separate webhook keys (e.g., /webhooks/stripe and /webhooks/stripe-failures) so each stream is isolated under its own webhooks.{webhookKey}.* prefix.
Selecting a preset (Stripe, GitHub, Shopify, Clerk/Svix) automatically pre-fills signature header conventions, verification algorithms, replay tolerance windows, and authoritative event timestamp resolution (created, workflow_job.completed_at, data.created_at, or created_at). You only supply your signing secret.
Integrate internal microservices, proprietary payment gateways, and cellular IoT fleets with custom HMAC-SHA256 configurations: define your custom signature header (e.g. X-Signature), encoding format (Hex or Base64), and top-level or dot-path timestamp property (tsProperty).
Configure requireCommit: true (Pro+) for synchronous NVMe writes (HTTP 200 OK) on critical financial streams, or false for asynchronous in-memory buffering (HTTP 202 Accepted, ≤60s RPO). Stored server-side, eliminating URL query parameters.
Metric vs. Raw Blob Storage Modes
By default, TimesinkDB extracts numeric and boolean fields into columnar metric series (webhooks.{webhookKey}.{jsonPath}) for fast SIMD aggregation while ignoring string identifiers to protect your active series quota. When you also want to retain full customer metadata, line items, or string IDs for audit inspection, configure mode=blob or mode=both:
Flattens all numeric and boolean fields into webhooks.{webhookKey}.* columnar metric series for instant downsampling. Fixed 16 bytes per point.
Stores the unparsed UTF-8 JSON payload verbatim as an immutable event record under webhooks.{webhookKey}.blob. Ideal for full audit logs.
Simultaneously flattens numeric metrics into webhooks.{webhookKey}.* and stores the full raw JSON payload under webhooks.{webhookKey}.blob.
1. Stripe Webhooks: MRR & Transaction Velocity
Stream subscription payments, upgrade invoices, and refunds directly into high-speed time-series storage. Calculate monthly recurring revenue and transaction volume directly from time-series buckets without running analytical scans on transactional PostgreSQL tables.
Select the Stripe preset (mode=both), paste your signing secret (whsec_...), and subscribe the endpoint to invoice.payment_succeeded in the Stripe Dashboard.
POST /databases/42/webhooks/stripe HTTP/1.1
Host: fra1.timesinkdb.com
Stripe-Signature: t=1788624900,v1=5257abc98124...
Content-Type: application/json
{
"id": "evt_1MvL322eZvKYlo2C",
"type": "invoice.payment_succeeded",
"created": 1788624900,
"data": {
"object": {
"amount_paid": 4900,
"amount_due": 4900,
"paid": true,
"currency": "usd",
"customer": "cus_9x817a"
}
}
}
{
"status": "accepted",
"webhookKey": "stripe",
"eventId": "evt_1MvL322eZvKYlo2C",
"pointsIngested": 4,
"ingestedBytes": 218
}
webhooks.stripe.data.object.amount_paid→ 4900.0 (16B)webhooks.stripe.data.object.amount_due→ 4900.0 (16B)webhooks.stripe.data.object.paid→ 1.0 (16B)webhooks.stripe.blob→ Raw JSON event (16B + 154B = 170B)
GET /databases/42/query?seriesKey=webhooks.stripe.data.object.amount_paid&from=-30d&interval=1d&fn=sum
2. GitHub Actions: CI Runs & Retry Rates
Track CI job frequency, retry attempts (run_attempt), and complete workflow audit payloads across all repositories in real time. TimesinkDB automatically resolves GitHub's nested workflow_job.completed_at timestamp.
POST /databases/42/webhooks/github-ci HTTP/1.1
Host: fra1.timesinkdb.com
X-Hub-Signature-256: sha256=d579248b1...
Content-Type: application/json
{
"action": "completed",
"workflow_job": {
"node_id": "CR_kwDOK8192031",
"run_attempt": 1,
"runner_id": 14,
"name": "build-and-test",
"conclusion": "success",
"started_at": "2026-09-05T16:10:00Z",
"completed_at": "2026-09-05T16:12:45Z"
}
}
TimesinkDB extracts numeric fields such as webhooks.github-ci.workflow_job.run_attempt and webhooks.github-ci.workflow_job.runner_id into columnar metric streams while preserving the complete workflow job metadata and step statuses in webhooks.github-ci.blob (mode=both). Query hourly CI job throughput, runner utilization, or retry spikes in single-digit milliseconds:
GET /databases/42/query?seriesKey=webhooks.github-ci.workflow_job.run_attempt&from=-7d&interval=1h&fn=count
3. Shopify Orders: GMV & Order Audit Stream
Stream Shopify order creations and fulfillment updates directly to your TimesinkDB database. Numeric fields (such as total_price, subtotal_price, and total_weight) are extracted into webhooks.shopify-orders.* while the full order and line-item array is preserved in webhooks.shopify-orders.blob (mode=both).
POST /databases/42/webhooks/shopify-orders HTTP/1.1
Host: fra1.timesinkdb.com
X-Shopify-Hmac-Sha256: b341fa902...
Content-Type: application/json
{
"admin_graphql_api_id": "gid://shopify/Order/512938102",
"name": "#1042",
"created_at": "2026-09-05T16:14:02Z",
"total_price": 149.50,
"subtotal_price": 139.00,
"total_weight": 450,
"confirmed": true,
"currency": "USD",
"line_items": [
{ "title": "Hardware Gateway", "quantity": 1, "price": "149.50" }
]
}
4. Clerk & Auth0: User Signups & Auth Volume
Connect Clerk or Auth0 authentication event streams (via Svix or custom webhooks) to track user onboarding velocity, 2FA adoption (webhooks.clerk-auth.data.two_factor_enabled), and full signup audit blobs (webhooks.clerk-auth.blob). TimesinkDB automatically resolves Clerk's nested data.created_at Unix millisecond timestamp.
POST /databases/42/webhooks/clerk-auth HTTP/1.1
Host: fra1.timesinkdb.com
svix-id: msg_2X...
svix-timestamp: 1788624900
svix-signature: v1,g0hM9...
Content-Type: application/json
{
"type": "user.created",
"data": {
"id": "user_2Y8a91b...",
"created_at": 1788624900000,
"two_factor_enabled": true
}
}
5. Custom Webhook Playbook (Any Generic Service)
You can integrate webhooks from internal microservices, payment gateways, or cellular IoT dispatchers using standard HMAC SHA-256 signing. Numeric fields are automatically flattened into webhooks.custom-service.active_users and webhooks.custom-service.cpu_pct:
import crypto from "crypto";
const payload = JSON.stringify({
service: "checkout_api",
active_users: 142,
cpu_pct: 38.4
});
const secret = "whsec_custom_98a72b...";
const signature = crypto.createHmac("sha256", secret).update(payload).digest("hex");
await fetch("https://fra1.timesinkdb.com/databases/42/webhooks/custom-service", {
method: "POST",
headers: {
"X-Signature": `sha256=${signature}`,
"Content-Type": "application/json"
},
body: payload
});
Next Guides to Explore
Ready to ingest webhooks directly? Reserve your 1 GB Free Sandbox.
Includes native HMAC signature verification, 1,000 active series, and $0.00 write API fees with no credit card required.