Buffer Shopify Webhooks
Batch Shopify webhook events per shop.
Overview
Shopify sends webhooks for orders, products, customers and inventory. Webbu can batch them per shop using the X-Shopify-Shop-Domain header.
Setup
1. Create a buffer
curl -X POST https://webbu.dev/api/v1/admin/buffers \
-H "Content-Type: application/json" \
-H "X-API-Key: $WEBBU_API_KEY" \
-d '{
"bufferId": "b_shopify",
"projectId": "p_shop",
"name": "Shopify events",
"groupKey": { "mode": "header", "fallbackHeader": "x-shopify-shop-domain" },
"batch": { "maxItems": 200, "maxBytes": 1048576, "idleTimeoutMs": 15000, "maxWaitFromFirstMs": 60000 },
"delivery": { "url": "https://your-app.example.com/webhooks/shopify-batch" }
}'header mode reads the group key from the X-Shopify-Shop-Domain request header.
2. Configure Shopify
In the Shopify admin:
- Go to Settings → Notifications → Webhooks
- Create a webhook for each event (e.g.
Order creation) - Format: JSON
- URL:
https://webbu.dev/api/v1/ingest/p_shop/b_shopify - Save
Apps that register webhooks through the Shopify API can use the same URL.
3. Process batches
{
"webbu": { "bufferId": "b_shopify", "groupKey": "my-store.myshopify.com", "segment": 0, "…": "…" },
"window": { "firstItemAt": 1767225600000, "lastActivityAt": 1767225609000, "itemsCount": 2 },
"items": [
{ "messageId": "…", "receivedAt": 1767225600000, "payload": { "id": 123, "email": "customer@example.com", "total_price": "99.99" } },
{ "messageId": "…", "receivedAt": 1767225609000, "payload": { "id": 124, "email": "another@example.com", "total_price": "149.99" } }
]
}Things to know
- Event type: the topic is in the
X-Shopify-Topicheader, which isn't forwarded. Use one buffer per topic if you need to tell events apart. - Signatures:
X-Shopify-Hmac-Sha256can't be verified at your endpoint because Webbu forwards parsed payloads.
Use cases
- Batch order processing per shop
- Bulk inventory sync
- Customer activity aggregation