Skip to main content
Back to Dev generators

Dev

Mock Webhook Payload Generator

Webhook development stalls without good test data. Triggering a real Stripe payment on cue takes setup, and hand-rolled JSON drifts from the actual schema. A mock webhook payload generator produces randomized, structurally valid JSON for GitHub push events, Stripe payment intents, Slack event callbacks, and a generic format on demand. The `service` input controls the payload shape. GitHub output includes ref, commit SHAs, repository metadata, and a commits array. Stripe produces a full event envelope with amount, currency, and status. Slack follows event_callback structure with team_id and a nested event object. The generic format produces a minimal service-agnostic event with id, type, timestamp, and status. The `count` input generates 1 to 10 payloads per run.

Read the complete guide — 4 min read

How to use

  1. Choose your options above
  2. Click Generate
  3. Copy your result

Detailed instructions

  1. Select the service you want to simulate from the Service dropdown (GitHub, Stripe, Slack, or Generic).
  2. Set the count field to the number of distinct payloads you need, then click Generate.
  3. Review each generated payload in the output list and click Copy on the one you want to use.
  4. Paste the JSON into curl, Postman, or a test fixture file to send it to your local webhook endpoint.
  5. Adjust the service or count and regenerate to get fresh random values for additional test scenarios.

Use Cases

  • Feeding a local Express webhook endpoint with Stripe payment_intent payloads before a single card is charged
  • Loading GitHub push event fixtures into a Jest test suite for deterministic, repeatable CI runs
  • Populating a Postman collection with varied Slack event bodies to share across a backend team
  • Reproducing a production parsing bug by replaying a controlled payload against your handler in isolation
  • Generating sample payloads to illustrate webhook event structure in API onboarding docs or a README

Tips

  • Generate three or four Stripe payloads at once to get varied amounts and IDs — good for testing currency formatting edge cases.
  • Paste a GitHub push payload into a fixture file alongside your unit tests so CI never needs a live GitHub connection.
  • When debugging signature verification failures, isolate the problem by first confirming your handler accepts the payload body itself using one of these mocks with signature checks temporarily disabled.
  • The generic payload type is a fast starting point for internal microservice events — rename the event_type field to match your own naming convention.
  • If your framework logs incoming webhook bodies, replace real production payloads in your logs with generated mocks when sharing debug output with teammates to avoid leaking customer data.
  • Compare the generated schema against the service's official event reference once before writing your handler — this confirms which fields you can safely rely on versus fields that may be absent.

FAQ

how do I send a mock webhook payload to my local server

Copy the generated JSON, then run: curl -X POST -H 'Content-Type: application/json' -d '<pasted JSON>' http://localhost:3000/webhook. Swap in your actual port and route. To expose a public HTTPS URL so a real upstream service can send events, pair this with ngrok — but for testing your parsing logic, this generator plus curl is all you need.

can these payloads test stripe or github signature verification

Not directly. Stripe-Signature and GitHub's X-Hub-Signature-256 are HMACs computed from the raw request body and your shared secret. These mock payloads have no valid signature. Use them to test handler parsing and routing logic, then compute a real HMAC manually with your test secret when you specifically need to exercise the signature-check branch.

how closely do the generated payloads match the real webhook schemas

They mirror real field names, nesting structure, and data types for each supported service. IDs, amounts, timestamps, and commit SHAs use randomly generated values. That is sufficient for testing handler logic, JSON schema validation, and request routing. For exact production fidelity on edge cases, cross-check against the official event reference docs for each service.

You might also like

Popular tools from other categories that share themes with this one.

Try these next

More free tools from other corners of the catalog, picked by shared themes.