---
title: "Webhook Examples: Real Payloads, Headers and Signatures"
description: "A webhook example is an HTTP POST a service sends when an event happens. See real headers, signatures and retries from Stripe, GitHub, Shopify and Razorpay."
canonical: https://luckpanda.app/blog/webhook-examples
author: "Dhrumil Barot"
author_bio: "Dhrumil is a small-business operations and compliance expert. Dhrumil built LuckPanda so small businesses can run invoicing, inventory, accounts and compliance in one place."
published: 2026-11-18
updated: 2026-11-18
category: "AI agents and automation"
keywords: "webhook example"
language: en
---

# Webhook Examples: Real Payloads, Headers and Signatures

Real webhook headers, signatures and retry rules from Stripe, GitHub, Shopify, Razorpay and LuckPanda, with how to verify each.

By [Dhrumil Barot](https://luckpanda.app/about#founder), Founder. Published 18 Nov 2026. Updated 18 Nov 2026. 6 min read.

**TL;DR:** A webhook example: when an invoice is paid, the billing system sends an HTTP POST with a small JSON body (event id, event type, the record) to a URL you registered, signed with a shared secret. Every major provider follows the same pattern but names the signature header, the hash encoding, the timeout and the retry window differently. The table below lists them for Stripe, GitHub, Shopify, Razorpay and LuckPanda, whose Workspace module sends signed webhooks for invoices, payments and clients.

> Want invoice and payment events in your own system? LuckPanda's Developers area gives you webhook endpoints, a REST API and an MCP server on the same commands as the app. See LuckPanda for developers.

A webhook is a push notification between servers. Instead of your code asking an API "has anything changed?" every minute, the provider calls your URL once, right when the event happens. A typical webhook example in invoicing: LuckPanda sends a POST to https://api.example.com/hooks/luckpanda with the header LuckPanda-Event: document.paid and a JSON body such as {"id": "evt\_...", "type": "document.paid", "created_at": "2026-11-18T09:30:00Z", "data": {"object": "document", "kind": "invoice", "number": "INV-0042", "currency": "USD", "payable_minor": 490000, "paid_minor": 490000}}. Your server checks the signature, records the payment once, and answers 200.

## Webhook headers, signatures and retries compared

Checked on each provider's own documentation on 2026-11-18.

| Provider | Signature header | Algorithm and encoding | Signed content | Respond within | Retries |
| --- | --- | --- | --- | --- | --- |
| LuckPanda | LuckPanda-Signature: t=unix,v1=hex | HMAC-SHA256, hex | t, a dot, then the raw body | 10 seconds | 8 attempts over about 22 hours |
| Stripe | Stripe-Signature: t=...,v1=... | HMAC-SHA256, hex | timestamp, a dot, then the raw body | return 2xx quickly | up to 3 days in live mode |
| GitHub | X-Hub-Signature-256: sha256=... | HMAC-SHA256, hex | raw body | 10 seconds | no automatic retry; redeliver manually |
| Shopify | X-Shopify-Hmac-SHA256 | HMAC-SHA256, base64 | raw body | 5 seconds | up to 8 times over 4 hours |
| Razorpay | X-Razorpay-Signature | HMAC-SHA256, hex | raw body | 5 seconds | exponential backoff for 24 hours |

| Provider | Duplicate-detection id | Secret format or source |
| --- | --- | --- |
| LuckPanda | LuckPanda-Delivery header and the event id (evt\_...) | whsec\_..., shown once on create or roll |
| Stripe | event id | whsec\_... per endpoint |
| GitHub | X-GitHub-Delivery header | secret you choose |
| Shopify | delivery id header | the app's client secret |
| Razorpay | x-razorpay-event-id header | secret you set on the webhook |

![A webhook travels from event to signed POST to verified, deduplicated processing](https://cdn.sanity.io/images/pcmcvz9y/production/69bbf7af4163d7209f92ce9056777c2512d23cdc-1344x326.png?w=1200&auto=format&fit=max)

*Any non-2xx or timeout starts the provider's retry schedule.*

## What does LuckPanda send, and what can you build with it?

LuckPanda's webhooks are part of the Workspace module (Team, Approvals, Settings, Developers, Billing). From the public OpenAPI file at https://luckpanda.app/openapi.yaml:

- Events: document.issued, document.sent, document.cancelled, document.paid, payment.recorded, party.created, party.updated, plus webhook.test from the test button. Subscribe to \["\*"\] to get every event, including ones added later.
- Headers: LuckPanda-Event (the type), LuckPanda-Delivery (the delivery id, the same on a retry or resend) and LuckPanda-Signature: t=unix seconds,v1=hex HMAC-SHA256 of "t.raw body".
- Body: id, type, created_at, company_id and data. A document event carries number, lifecycle, currency, payable_minor, paid_minor, issue_date, due_date, buyer_name and public_url. Money is in integer minor units, so 4900 in USD is 49.00.
- Rules: reject a t more than 5 minutes old, answer 2xx within 10 seconds. Failed deliveries retry after 1 min, 5 min, 30 min, 1 h, 3 h, 6 h and 12 h, 8 attempts in all, then show as failed and can be resent from the app or the API.
- Limits and safety: at most 10 endpoints per business; private, loopback and metadata addresses are refused; the signing secret starts with whsec\_ and is shown only when you create the endpoint or roll it.
- Testing: the sandbox copies your master data with every module open and simulates email, payment links and webhooks.

A common setup: document.paid marks the order paid in your shop or ERP, payment.recorded posts the receipt to a data warehouse, party.created adds the client to your mailing tool. Webhooks and the API are not limited on the free plan; the plan must cover the module for paid outcomes such as issuing. Workspace costs $4.99 per module per month (₹199 in India), per module and not per user ([pricing](https://luckpanda.app/pricing)).

## Stripe webhook example

Stripe sends an Event object, for example type invoice.paid with data.object holding the invoice. The Stripe-Signature header looks like t=1700000000,v1=5257a8...; it can also carry v0 entries on test events and extra debug entries, so your parser must accept unknown entries in any order. The official libraries reject a timestamp more than 300 seconds old by default. In live mode Stripe retries a failed delivery for up to three days with exponential backoff; in a sandbox, three times over a few hours. The Stripe CLI can resend an event for up to 30 days. Source: [Stripe webhooks docs](https://docs.stripe.com/webhooks) and [signature docs](https://docs.stripe.com/webhooks/signature).

## GitHub webhook example

GitHub sends a push, pull_request or issues payload with X-GitHub-Event naming the type and X-Hub-Signature-256: sha256=757107ea0eb2509fc211221cce984b8a37570b6d7586c22c46f4379c8b043e17. The value is an HMAC-SHA256 hex digest of the raw body with your secret, prefixed sha256=. GitHub says to compare with a constant-time function, never a plain equality check, and to respond within 10 seconds or the delivery counts as failed. A redelivery keeps the same X-GitHub-Delivery id. Source: [GitHub, validating deliveries](https://docs.github.com/en/webhooks/using-webhooks/validating-webhook-deliveries).

## Shopify webhook example

Shopify sends topics such as orders/create. X-Shopify-Hmac-SHA256 is base64, not hex: compute HMAC-SHA256 of the raw body with the app's client secret, base64 encode it and compare. After you rotate the client secret, it can take up to an hour before deliveries are signed with the new one. Respond within five seconds; Shopify retries up to 8 times over four hours and can remove the subscription if failures continue. Source: [Shopify HTTPS webhooks](https://shopify.dev/docs/apps/build/webhooks/subscribe/https).

## Razorpay webhook example

Razorpay sends events such as payment.captured. X-Razorpay-Signature is a hex HMAC-SHA256 of the body with the webhook secret, and x-razorpay-event-id is unique per event, so use it to drop duplicates. Any non-2xx answer is a failure, a response slower than 5 seconds times out, and failed webhooks are retried with exponential backoff for 24 hours, after which the webhook is disabled. If you change the secret, retries of older events are still signed with the old one. Source: [Razorpay validate and test](https://razorpay.com/docs/webhooks/validate-test/).

## How do you verify a webhook signature?

You verify a webhook signature by recomputing the HMAC yourself and comparing it with the header in constant time. The steps are the same everywhere:

1. Read the raw request body as bytes, before any JSON parsing. Re-serialised JSON changes whitespace and breaks the hash.
2. Build the signed string: the raw body (GitHub, Shopify, Razorpay), or timestamp + "." + raw body (Stripe, LuckPanda).
3. Compute HMAC-SHA256 with your secret and encode it as the provider does: hex, or base64 for Shopify.
4. Compare with a constant-time function (crypto.timingSafeEqual in Node.js, hmac.compare_digest in Python).
5. For timestamped schemes, reject a timestamp older than 5 minutes to stop replays.

![The same raw body gives a valid hash; a re-serialised body gives a different one](https://cdn.sanity.io/images/pcmcvz9y/production/1ff89798edb395adc8c10b75086093b519012a0d-1344x410.png?w=1200&auto=format&fit=max)

*Always hash the exact bytes the provider sent.*

## Webhook URL examples and a receiver checklist

A webhook URL is an ordinary HTTPS endpoint on your server that accepts POST. Good examples keep one path per provider so each can use its own secret and parser:

- https://api.example.com/hooks/luckpanda for invoice and payment events
- https://api.example.com/hooks/stripe for card payments
- https://api.example.com/hooks/github for deploys on push
- https://shop.example.in/hooks/razorpay for UPI and card captures

Before you register one, check that it:

- Serves valid HTTPS (Stripe accepts only TLS 1.2 and 1.3 in live mode).
- Is reachable from the internet. LuckPanda refuses private, loopback and cloud metadata addresses.
- Keeps the raw body available to the signature check.
- Writes the event id to a table with a unique index before doing any work, so a duplicate fails fast.
- Answers within the shortest timeout you face, 5 seconds for Shopify and Razorpay, and pushes slow work to a queue.
- Logs the delivery id and the response code, so you can match it with the provider's delivery log when something goes missing.

## What happens if a webhook fails?

A webhook fails when your server answers anything other than 2xx or answers too slowly. The provider then retries on its own schedule (see the table) and, after the last attempt, either marks the delivery failed (LuckPanda, Stripe), stops (Shopify) or disables the webhook (Razorpay). Because of retries, every provider can deliver the same event more than once and out of order. Store the event or delivery id, skip ids you have already processed, and do slow work after answering 200, from a queue.

## What is the difference between a webhook and an API?

An API is pull: your code asks for data when it wants it. A webhook is push: the provider calls you when something changes. Most integrations use both: the webhook says "invoice INV-0042 was paid", and you call the API to read anything the payload left out or to catch up after downtime. LuckPanda offers both on the same record, plus a /changes cursor feed with the same event stream for systems that prefer polling. More in our guide to [MCP vs API](https://luckpanda.app/blog/mcp-vs-api) and [offset vs cursor pagination](https://luckpanda.app/blog/api-pagination-offset-vs-cursor).

## Where webhooks fit in approval workflows

Webhooks also close the loop on approvals. When an [invoice approval process](https://luckpanda.app/blog/invoice-approval-process) ends with the invoice issued, document.issued tells your other systems it is final; a cancelled document sends document.cancelled. In LuckPanda, agents can draft through the API and MCP, but issuing, sending and paying stay with a person, so these events always follow a human decision.

> Set up a webhook endpoint, test it with webhook.test and try it in the sandbox before going live. Open LuckPanda Developers.

## Questions

### What is an example of a webhook?

When a customer pays an invoice, the billing system sends an HTTP POST to your URL with the event type, such as document.paid in LuckPanda or invoice.paid in Stripe, and the invoice data, signed with a shared secret.

### Can the same webhook arrive twice?

Yes. Retries and resends mean duplicates are normal. Keep the event or delivery id and ignore ones already processed.

### Why does my webhook signature not match?

Usually the body was parsed and re-serialised before hashing, the wrong secret is used (for example after a rotation), or the encoding is wrong, such as hex instead of base64 for Shopify.

### Do I need a public server to test webhooks?

Your endpoint must be reachable over the internet. In LuckPanda, the test button sends a webhook.test event and the sandbox simulates deliveries, so you can check your handler before real invoices flow.

## More guides

- [API Pagination: Offset vs Cursor vs Keyset Compared](https://luckpanda.app/blog/api-pagination-offset-vs-cursor)
- [MCP Server Logging: Where Logs Go, What Changed and What to Record](https://luckpanda.app/blog/mcp-server-logging)
- [MCP vs API: What Changes When an AI Agent Is the Caller](https://luckpanda.app/blog/mcp-vs-api)

## Related tools

- [Invoice generator](https://luckpanda.app/tools/invoice-generator): Bill a client in any currency, with tax worked out as you type.

## About the author

**Written by [Dhrumil Barot](https://luckpanda.app/about#founder)**, Founder. Dhrumil is a small-business operations and compliance expert. Dhrumil built LuckPanda so small businesses can run invoicing, inventory, accounts and compliance in one place. [LinkedIn](https://www.linkedin.com/in/bdhrumil) · [X](https://x.com/fyidhrumil)
