Skip to main content

Build

Gopuff Webhooks

HookdeckOfficialCertified

Receive and verify Gopuff (Powered by Gopuff partner API) webhooks. Use when setting up a Gopuff webhook handler, debugging svix-id / svix-timestamp / svix-signature verification, or handling order.status, order.status.v2 and order.delivered events, delivery status (driver location) and delivery ETA updates.

  • New
  • v1.0.1
  • Reviewed Oct 21
  • No reviews yet

Capabilities

  • Verification (core)

    Each request carries svix-id, svix-timestamp (Unix seconds) and svix-signature (space-delimited v1, entries)

  • Common Event Types

    Pending (no event sent), Packing_Now, Packed, Delivery, Finished, Cancelled

  • Local Development

    No account required

Getting started

Full instructions

Example command

Local Development

npx hookdeck-cli listen 3000 gopuff --path /webhooks/gopuff

Instructions: SKILL.mdv1.0.1

Gopuff Webhooks

Gopuff's partner API (Powered by Gopuff) sends webhooks about order fulfillment: order status changes, driver location and delivery ETA. Endpoints are registered in the Svix App Portal, which signs every delivery. Gopuff's own pages have no signature section; the scheme comes from Svix's manual verification guide.

When to Use This Skill

  • How do I receive Gopuff webhooks?
  • How do I verify Gopuff webhook signatures (svix-signature)?
  • How do I handle order.status.v2 or order.delivered events?
  • How do I get the Svix App Portal link for my Gopuff partner account?
  • Why is my Gopuff webhook signature verification failing?

Verification (core)

Each request carries svix-id, svix-timestamp (Unix seconds) and svix-signature (space-delimited v1,<base64> entries). The signed content is {svix-id}.{svix-timestamp}.{raw body}, HMAC-SHA256 with the base64-decoded part of the whsec_ secret, base64-encoded. Use the raw body, never re-serialized JSON.

javascript
import crypto from 'node:crypto';

// toleranceSec = 0 (default) skips the timestamp window, because Hookdeck retries and replays
// keep the original svix-timestamp. A positive value opts in.
function verify(rawBody, { id, timestamp, signature }, secret, toleranceSec = 0) {
  if (!/^\d+$/.test(timestamp ?? '')) return false;
  if (toleranceSec > 0 && Math.abs(Date.now() / 1000 - Number(timestamp)) > toleranceSec) return false;
  const key = Buffer.from(secret.split('_')[1], 'base64'); // decode after "whsec_"
  const expected = crypto.createHmac('sha256', key)
    .update(`${id}.${timestamp}.`).update(rawBody).digest();
  return signature.split(' ').some((entry) => {
    const [version, sig] = entry.split(',');
    const got = Buffer.from(sig ?? '', 'base64');
    return version === 'v1' && got.length === expected.length &&
      crypto.timingSafeEqual(got, expected);
  });
}

The examples verify the same way and also accept the white-labeled webhook-* headers.

Why not the svix SDK? new Webhook(secret).verify(...) (npm) and Webhook(secret).verify(...) (PyPI) check the same signature, but they always enforce a 5-minute timestamp window with no way to turn it off. Hookdeck retries and replays carry the original svix-timestamp, so the SDK rejects them. The examples verify manually and make the window opt-in with GOPUFF_TIMESTAMP_TOLERANCE_SECONDS (default 0; a positive number of seconds turns it on; anything that isn't a whole number is treated as 0, with a warning at startup). If you never retry or replay late, the SDK is fine.

For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.

Common Event Types

Event types you select in the Svix App Portal (from Gopuff's webhook docs):

Event Type Description
order.status.v2 Order status changed (recommended; slim payload)
order.status Order status changed (full order object; end of support 08/15/2025)
order.delivered Order successfully delivered

Order statuses: Pending (no event sent), Packing_Now, Packed, Delivery, Finished, Cancelled. Gopuff also documents Delivery Status (driver location) and Delivery ETA payloads but does not list event-type strings for them.

The payloads contain no event-type field, and Svix sends no event-type header. The examples tell payloads apart by shape (order, driver, expected_delivery_time). Always keep a default branch for unknown shapes.

Environment Variables

bash
GOPUFF_WEBHOOK_SECRET=whsec_xxxxx   # Svix App Portal > Endpoints > Signing Secret
GOPUFF_TIMESTAMP_TOLERANCE_SECONDS=0   # Optional replay window; a positive value opts in

Local Development

bash
npx hookdeck-cli listen 3000 gopuff --path /webhooks/gopuff

No account required. Use the printed URL as the endpoint URL in the App Portal. (FastAPI example: port 8000.)

Reference Materials

  • references/overview.md - Events, payloads, order status flow
  • references/setup.md - App Portal link, endpoint, secret
  • references/verification.md - Signature details and debugging
  • Handler sequence
  • Idempotency
  • Error handling
  • Retry logic
  • svix-webhooks - The Svix signing scheme in general
  • guesty-webhooks - Another Svix-delivered provider
  • clerk-webhooks - Svix-signed auth events
  • nash-webhooks - Delivery and logistics webhooks
  • aftership-webhooks - Shipment tracking webhooks
  • shopify-webhooks - Commerce order webhooks
  • webhook-handler-patterns - Idempotency, error handling, retry logic
  • hookdeck-event-gateway - Production webhook infrastructure

Explore more skills

Browse all
This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Signing

SignedSLSA L2
Signed by
skills-hub.ai distributor
Method
Distributor-signed by skills-hub.aiSigned with the skills-hub.ai Ed25519 distributor key over this exact slug, version and content. Check it with `npx @skills-hub-ai/cli verify`.
Key
skills-hub-ed25519-2026-11
Signed

Reviews (0)

More from Hookdeck

View source →
razorpay-webhooksReceive and verify Razorpay webhooks. Use when setting up Razorpay webhook handlers, debugging X-Razorpay-Signature verification, or handling payment events like payment.captured, payment.failed, order.paid, refund.processed, or…3 installsvercel-log-drains-webhooksReceive and verify Vercel Log Drains deliveries. Use when setting up a Vercel log drain HTTP endpoint, debugging x-vercel-signature verification, passing the drain's endpoint test, or processing batched log entries from sources like…1 installsstripe-webhooksReceive and verify Stripe webhooks. Use when setting up Stripe webhook handlers, debugging signature verification, or handling payment events like payment_intent.succeeded, customer.subscription.created, or invoice.paid.1 installsalchemy-webhooksReceive and verify Alchemy Notify webhooks. Use when setting up Alchemy webhook handlers, debugging X-Alchemy-Signature verification, or handling onchain events like ADDRESS_ACTIVITY, NFT_ACTIVITY, or GRAPHQL (Custom Webhook).1 installstiktok-webhooksReceive and verify TikTok for Developers webhooks (Login Kit, Content Posting, Data Portability). Use when setting up TikTok webhook handlers, debugging TikTok-Signature verification, or handling events like authorization.removed,…1 installsfedex-webhooksReceive and verify FedEx Advanced Integrated Visibility (AIV) shipment tracking webhooks. Use when setting up an AIV webhook or "Try this webhook" in the FedEx Developer Portal, verifying the fdx-signature header (base64 HMAC-SHA256 of the…1 installs

Frequently asked questions about gopuff-webhooks

What does the gopuff-webhooks skill do?

Receive and verify Gopuff (Powered by Gopuff partner API) webhooks. Use when setting up a Gopuff webhook handler, debugging svix-id / svix-timestamp / svix-signature verification, or handling order.status, order.status.v2 and order.delivered events, delivery status (driver location) and delivery ETA updates. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the gopuff-webhooks skill?

Run `npx @skills-hub-ai/cli install hookdeck-gopuff-webhooks` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/hookdeck-gopuff-webhooks/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does gopuff-webhooks work with?

gopuff-webhooks runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the gopuff-webhooks skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use gopuff-webhooks after installing it?

In Claude Code, type `/hookdeck-gopuff-webhooks` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the gopuff-webhooks skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.

Badge for your README

Show that this skill is on Skills Hub. The badge links back to this page and shows the live install count.

Install on Skills Hub badge preview
Markdown
[![Install on Skills Hub](https://skills-hub.ai/api/badges/skill/hookdeck-gopuff-webhooks)](https://skills-hub.ai/skills/hookdeck-gopuff-webhooks)
HTML
<a href="https://skills-hub.ai/skills/hookdeck-gopuff-webhooks"><img src="https://skills-hub.ai/api/badges/skill/hookdeck-gopuff-webhooks" alt="Install on Skills Hub"></a>

More options in the badge docs.