Webhooks
Receive incoming webhooks from external platforms (e.g., Shopify, ShipStation) to trigger real-time data syncs. Each bridge has its own webhook URL that accepts events from the connected platform.
Receive Webhook
/api/webhooks/:bridgeIdReceive an incoming webhook event for a specific bridge.
Accepts incoming webhook payloads from external platforms. The bridge ID in the URL determines which bridge processes the event. Orderly validates the webhook signature (if configured) and queues the event for processing.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
bridgeId | string | The bridge ID that should process this webhook |
Headers
Webhook verification varies by platform. Common patterns include:
| Header | Platform | Description |
|---|---|---|
X-Shopify-Hmac-Sha256 | Shopify | HMAC signature for payload verification |
X-Shipstation-Hmac-Sha256 | ShipStation | HMAC signature |
X-Hook-Secret | Generic | Shared secret verification |
Webhook URL Format
Your bridge webhook URL follows this pattern:
https://api.orderly.dev/api/webhooks/{bridge_id}Register this URL in the external platform’s webhook settings.
Request Body
The request body contains the raw webhook payload from the external platform. The format depends on the platform and event type.
# Example: Shopify order creation webhook
curl -X POST "https://api.orderly.dev/api/webhooks/550e8400-e29b-41d4-a716-446655440000" \
-H "Content-Type: application/json" \
-H "X-Shopify-Hmac-Sha256: abc123..." \
-d '{
"id": 123456789,
"order_number": "#1001",
"email": "jane@example.com",
"line_items": [...]
}'Response
Returns 200 OK to acknowledge receipt. The webhook is processed asynchronously.
{
"data": {
"received": true,
"event_id": "uuid"
}
}Error Responses
| Status | Description |
|---|---|
400 | Invalid payload or missing required fields |
401 | Webhook signature verification failed |
404 | Bridge not found or inactive |
Webhook Processing
After receiving a webhook, Orderly:
- Validates the webhook signature against the bridge’s configured secret
- Queues the event for asynchronous processing via QStash
- Executes the appropriate bridge task (e.g.,
grab-ordersfor a new order event) - Updates the relevant records in Orderly
- Triggers any matching dispatchers