Webhook Tester API: Capture and Inspect HTTP Requests

Published: · APIs in this article: Webhook Tester, Webhook Signature Verifier

Webhooks are easy to describe and annoying to debug. The provider says it sent an event. Your endpoint says it got nothing, or it got something and the signature check failed. Your backend isn't deployed yet, so there's no public URL to point the provider at.

A webhook tester fixes the first half of that problem. You get a throwaway URL, the provider sends events to it, and you see the raw request: method, path, headers and body, exactly as they arrived. This guide shows how to do that with the APIBox Webhook Tester API, from a terminal or from a test suite:

  1. Create a bin (a capture URL) with one POST.
  2. Point a provider at it and read the captured requests as JSON.
  3. Change the response the URL sends back, to test retries.
  4. Check the signature of a captured payload.

How it works

POST /v1/webhooks creates a bin. The bin has a receiving URL, https://apibox.io.vn/hook/<id>, and a viewer page in the browser. The receiving URL:

  • accepts any HTTP method and any sub-path (/hook/<id>/stripe, /hook/<id>/github/push…);
  • stores the method, path, query string, headers, client IP, country and body;
  • keeps bodies up to 256 KB; binary bodies are stored as base64;
  • answers with a response you choose (default: 200 with {"ok":true}).

You read the captured requests back with GET /v1/webhooks/<id>/requests.

No account? The online Webhook Tester creates a bin in the browser. Those anonymous bins live for one day. Bins created with an API key live 30 days.

Setup

Create a free APIBox account and an API key. The Free plan has 1,000 requests a month and no card is needed.

export APIBOX_KEY="your_key"

The key goes in the Authorization: Bearer header. Only calls to /v1/... count against your key. The receiving URL /hook/<id> needs no key, which is what lets Stripe or GitHub post to it.

1. Create a bin

curl -s https://apibox.io.vn/v1/webhooks \
  -H "Authorization: Bearer $APIBOX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Stripe test", "response_status": 200, "response_body": "{\"received\":true}"}'
{
  "id": "j8zsax3uwt1lp6upwaqz82",
  "name": "Stripe test",
  "url": "https://apibox.io.vn/hook/j8zsax3uwt1lp6upwaqz82",
  "viewer_url": "https://apibox.io.vn/tools/webhook-tester/#j8zsax3uwt1lp6upwaqz82",
  "response": { "status": 200, "content_type": "application/json", "body": "{\"received\":true}" },
  "request_count": 0,
  "created_at": "2026-11-25T09:53:16.000Z",
  "expires_at": "2026-12-25T09:53:16.000Z"
}

(This demo bin has since been deleted; yours will have its own ID.)

Copy url into the provider's webhook settings. Open viewer_url in a browser if you want to watch requests arrive.

2. Send something and read it back

Fire a test event from the provider's dashboard, or fake one yourself:

curl -s -X POST "https://apibox.io.vn/hook/j8zsax3uwt1lp6upwaqz82/orders?source=test" \
  -H "Content-Type: application/json" \
  -H "X-Signature: abc123" \
  -d '{"event": "order.paid", "order_id": 1042}'

The bin answers with the response you configured ({"received":true}). Now list what it captured, newest first:

curl -s "https://apibox.io.vn/v1/webhooks/j8zsax3uwt1lp6upwaqz82/requests?limit=5" \
  -H "Authorization: Bearer $APIBOX_KEY"
{
  "bin": {
    "id": "j8zsax3uwt1lp6upwaqz82",
    "name": "Stripe test",
    "request_count": 1,
    "…": "… (truncated, same fields as when created)"
  },
  "requests": [
    {
      "id": "tp1y57bkw20qn0",
      "method": "POST",
      "path": "/orders",
      "query": "source=test",
      "headers": {
        "accept": "*/*",
        "content-length": "41",
        "content-type": "application/json",
        "host": "apibox.io.vn",
        "user-agent": "node",
        "x-signature": "abc123",
        "…": "… (truncated)"
      },
      "body": "{\"event\": \"order.paid\", \"order_id\": 1042}",
      "body_encoding": "utf-8",
      "size": 41,
      "ip": "203.0.113.24",
      "country": "VN",
      "received_at": "2026-11-25T09:53:31.000Z"
    }
  ]
}

A few details worth knowing when you write assertions:

  • path is the part after /hook/<id>, so /orders, not the full path.
  • query is the raw query string (source=test), not an object.
  • Header names are lowercased (x-signature), whatever case the sender used.
  • size is the body length in bytes.

The body is stored as the raw string that arrived, not re-parsed JSON. That matters for signature checks (section 4).

Polling for new requests

limit takes 1–100 (default 20). To fetch only what's new since your last check, pass since as an ISO date or Unix seconds:

const KEY = process.env.APIBOX_KEY;
const BIN = 'j8zsax3uwt1lp6upwaqz82';   // your bin ID

let since = Math.floor(Date.now() / 1000);

async function poll() {
  const r = await fetch(
    `https://apibox.io.vn/v1/webhooks/${BIN}/requests?since=${since}&limit=100`,
    { headers: { Authorization: `Bearer ${KEY}` } },
  );
  if (!r.ok) throw new Error(`APIBox ${r.status}`);
  const { requests } = await r.json();
  for (const req of requests.reverse()) {          // oldest first
    console.log(req.method, req.path, req.body);
    since = Math.floor(new Date(req.received_at).getTime() / 1000);
  }
}

setInterval(poll, 5000);

Each poll is one API request against your quota, so poll every few seconds while debugging, not all day.

3. Simulate failures to test retries

Most providers retry when your endpoint returns a 5xx or times out. To see what the retries look like, make the bin fail:

curl -s -X PATCH https://apibox.io.vn/v1/webhooks/j8zsax3uwt1lp6upwaqz82 \
  -H "Authorization: Bearer $APIBOX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"response_status": 500, "response_body": "{\"error\":\"temporary\"}"}'

The reply is the updated bin, now with "response": {"status": 500, "content_type": "application/json", "body": "{\"error\":\"temporary\"}"}, and from then on the receiving URL answers 500 with that body. Trigger an event and watch the bin. You'll see each retry as its own captured request, with its timestamp and any retry or attempt headers the provider adds. Switch back to 200 when you're done.

You can set response_status (100–599), response_body (up to 10,000 characters), response_content_type and name.

4. Check the signature of a captured payload

Stripe, GitHub, Slack, Shopify and others sign webhooks with HMAC. The most common "invalid signature" bug: the framework parsed the JSON body and you computed the HMAC over a re-serialised version. Different spacing or key order gives a different signature.

Since the bin stores the raw body, you can pass it straight to /v1/webhook-verify and compare the expected signature with the one you received:

curl -s https://apibox.io.vn/v1/webhook-verify \
  -H "Authorization: Bearer $APIBOX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"provider": "github", "secret": "gh", "payload": "{\"id\":\"evt_1\"}", "signature": "sha256=eb445c690721bdf4fa91d361661d981eb0394f3089b9e9dfb96cddaef63da22e"}'
{
  "valid": true,
  "provider": "github",
  "expected": "sha256=eb445c690721bdf4fa91d361661d981eb0394f3089b9e9dfb96cddaef63da22e",
  "received": "sha256=eb445c690721bdf4fa91d361661d981eb0394f3089b9e9dfb96cddaef63da22e",
  "note": "The secret is used in memory only and never stored. In production verify signatures in your own code; this endpoint helps debug and test integrations."
}

Supported providers: stripe, github, slack, shopify, payos, sepay, plus generic for any HMAC-SHA1/256/512 in hex or base64. Use test-mode secrets here. This endpoint is for debugging; in production, verify signatures in your own code.

5. Use it in end-to-end tests (Python)

A bin is also a cheap way to assert that your app fired an outgoing HTTP call. Create a bin, configure your app to send to it, run the action, then check:

import os, requests

KEY = os.environ["APIBOX_KEY"]
H = {"Authorization": f"Bearer {KEY}"}
API = "https://apibox.io.vn/v1/webhooks"

bin_ = requests.post(API, json={"name": "e2e"}, headers=H, timeout=10).json()
# ... configure your app with bin_["url"] and trigger the action under test ...

reqs = requests.get(f"{API}/{bin_['id']}/requests", headers=H, timeout=10).json()["requests"]
assert any(r["method"] == "POST" and "order.paid" in (r["body"] or "") for r in reqs)

requests.delete(f"{API}/{bin_['id']}", headers=H, timeout=10)   # clean up

Delete the bin at the end so you don't hit the active-bin limit.

Limits to know

Free Starter Pro
Active bins 2 10 50
Requests kept per bin (newest) 50 500 2,000

Also:

  • Bins created with a key expire after 30 days; anonymous bins from the online tool after 1 day.
  • The receiving URL accepts up to 60 requests per minute per bin; above that it answers 429.
  • Bodies over 256 KB are cut at 256 KB.
  • The bin does not forward requests to your localhost. If you need a tunnel into your machine, use a tunnelling tool. A capture bin is for seeing and asserting, not for proxying.

Other ways to do this

Several tools cover this ground: hosted request inspectors, tunnels that also inspect traffic, API platforms with a webhook listener, and self-hosted open-source inspectors. A tunnel is the better fit when you want the event to hit your local code. A capture API like this one fits when you want a URL that works without your machine running, and JSON you can read from a script or CI job.

FAQ

Do providers need an API key to post to the bin? No. Only the /v1/webhooks management calls need your key. https://apibox.io.vn/hook/<id> accepts requests from anyone who knows the ID. The ID is 22 random characters, but don't send real customer data or production secrets to a test bin.

Can I return a custom status or body? Yes. PATCH /v1/webhooks/<id> with response_status, response_body and response_content_type. The default is 200 with {"ok":true}.

Does reading requests count against my quota? Calls to /v1/... count as API requests. Events posted to /hook/<id> don't: they're limited by the per-bin rate (60/min) and retention, not your monthly quota. You can see this in the x-quota-remaining response header of your /v1 calls, which only goes down for /v1 requests.

How do I clear a bin without deleting it? DELETE /v1/webhooks/<id>/requests removes the history and keeps the URL.

Get started

👉 Get a free API key – 1,000 requests a month, no card required.

Full parameters: Webhook Tester API docs · Webhook Signature Verifier docs.

More articles

All guides →