DashForDevsDocs
DocsNewsAPI v1
dashfordevs.comSign in

© 2026 DashForDevs

DocsNewsdashfordevs.comLegalStatus
DocsWebhooksOverview
Introduction
Getting Started
Authentication
Products
Categories
Cart
Checkout
Blog
Reviews
Webhooks
OverviewEvent TypesVerifying Signatures
Customers
Orders
Inventory
Shipping
Discounts
Affiliates
Email
Media & Files
Analytics & Tracking
Locations
Tax
Global Data
SEO
Error Handling
Geography
Finance
Automations
Page Types
Surveys
Billing & Subscriptions
Storefront Payments
SDK Reference
REST API
Storefront Architecture
Notifications
Security
Team & Permissions
Migrations & Import
Calendar & Appointments
Contact Forms
AI Bots
Dashboard API
Deployment
Changelog
Troubleshooting
Recipes
CLI & Deployment
Image Pipeline
White-label Platforms
Records Engine
Platform Modules
Platform Security
Site Keys & Client Sites
Use Cases
Operations

Overview

How webhooks work and when to use them.

Updated March 29, 2026

On this page
  • What Are Webhooks?
  • How It Works
  • Setting Up Webhooks
  • Webhook Payload
  • Example Handler (Next.js API Route)
  • Retry Policy
  • Next Steps

What Are Webhooks?

Webhooks let your application receive real-time notifications when events happen in your store. Instead of polling the API for changes, DashForDevs sends an HTTP POST request to your server when events like new orders, customer signups, or inventory changes occur.

How It Works

1. You register a webhook URL in the dashboard
2. An event occurs (e.g., new order placed)
3. DashForDevs sends a POST request to your URL
4. Your server processes the event and responds with 200 OK

Setting Up Webhooks

  1. Go to Settings → Webhooks in the dashboard
  2. Click Add Webhook
  3. Enter your endpoint URL (must be HTTPS)
  4. Select which events to subscribe to
  5. Copy the signing secret for verification

Webhook Payload

Every webhook request includes:

json
{
  "event": "order.created",
  "timestamp": "2025-01-15T10:30:00Z",
  "data": {
    "id": "ord_abc123",
    "order_number": "ORD-1042",
    "status": "pending",
    "total": "77.73",
    "customer": { ... },
    "items": [ ... ]
  }
}

Example Handler (Next.js API Route)

typescript
// app/api/webhooks/dash4devs/route.ts
import { NextRequest, NextResponse } from "next/server"
import crypto from "crypto"

const WEBHOOK_SECRET = process.env.DASH4DEVS_WEBHOOK_SECRET!

export async function POST(req: NextRequest) {
  const body = await req.text()
  const signature = req.headers.get("x-dash4devs-signature")

  // Verify the signature
  const expected = crypto
    .createHmac("sha256", WEBHOOK_SECRET)
    .update(body)
    .digest("hex")

  if (signature !== expected) {
    return NextResponse.json({ error: "Invalid signature" }, { status: 401 })
  }

  const event = JSON.parse(body)

  switch (event.event) {
    case "order.created":
      // Handle new order
      console.log("New order:", event.data.order_number)
      break
    case "customer.created":
      // Handle new customer
      break
  }

  return NextResponse.json({ received: true })
}

Retry Policy

If your endpoint returns a non-2xx status or times out (30 seconds), DashForDevs will retry:

  • 1st retry: 1 minute after failure
  • 2nd retry: 5 minutes after
  • 3rd retry: 30 minutes after
  • 4th retry: 2 hours after
  • Final retry: 24 hours after

After 5 failed attempts, the webhook is marked as failing and you'll receive a notification in the dashboard.

Next Steps

  • Event Types — All available webhook events
  • Verifying Signatures — Secure webhook handling
  • Security: Webhook Signatures — In-depth security guide
PreviousSubmit ReviewNextEvent Types

On this page

  • What Are Webhooks?
  • How It Works
  • Setting Up Webhooks
  • Webhook Payload
  • Example Handler (Next.js API Route)
  • Retry Policy
  • Next Steps