Skip to Content
devhelp shopDocs

Building Private Apps & Integrations

Connect ERPs, accounting tools, fulfillment systems, and custom services to a devhelp shop store.

You can build reliable server-side apps and integrations for any devhelp shop store today by combining Secret API Keys, the Admin API, and Standard Webhooks.

devhelp shop Store
   ├── Outbound events ──► HTTPS Webhook Receiver (verify signature, enqueue job)
   └── Inbound writes  ◄── Your App Worker (@devhelp/shop/server + Secret Key)

1. Subscribe to store events

Configure a webhook endpoint in Settings → Webhooks for the topics your app cares about:

  • Order & ERP sync: order.placed, order.confirmed, order.cancelled, refund.created, return.created
  • Warehouse & courier booking: fulfillment.created, fulfillment.dispatched, fulfillment.delivered, fulfillment.rto
  • Catalog & inventory sync: product.created, product.updated, inventory.low_stock, inventory.out_of_stock
  • Bookings & appointments: booking.booked, booking.rescheduled, booking.cancelled, booking.completed

2. Acknowledge fast and process asynchronously

Your webhook endpoint should verify the Standard Webhooks signature, persist the event.id for idempotency, enqueue background work, and return 200 OK quickly. Deliveries are at-least-once and may arrive out of order.

3. Write back via @devhelp/shop/server

Use the Admin client to push updates back into the store:

import { createAdminClient } from "@devhelp/shop/server";

const admin = createAdminClient({
  baseUrl: "https://api.devhelp.pk",
  secretKey: process.env.DEVHELP_SECRET_KEY!,
});

// Example: adjust inventory from your warehouse system
await admin.inventory.adjust({
  variantId,
  locationId,
  quantity: -2,
  mode: "adjust",
  reason: "sold",
  note: "Warehouse dispatch",
});

4. Reconcile periodically

Because webhooks are best paired with periodic reconciliation, run a scheduled sync job using cursor-paginated list endpoints (admin.orders.list, admin.products.list, admin.customers.list) so missed or delayed events never leave your system out of sync.

Built-in store apps

Merchants manage first-party apps (such as devhelp Email, Resend, Point of sale, and devhelp Protect) from Apps in the merchant dashboard. App installation and configuration require a signed-in dashboard session rather than a Secret API Key.

On this page