Webhooks docs

Webhooks API reference

Webhook registration, listing, and test-event dispatch simulation

/api/webhooks3 endpointsPagination + delay readyDownload OpenAPI JSONDownload OpenAPI YAMLDownload Postman Collection

Endpoints

Pick the route you want to test.

3 routes

Active selection

POST

/api/webhooks/register

Sample request

JAVASCRIPT example
1const payload = {
2 "url": "https://example.com/webhooks/fake-api",
3 "events": [
4 "payment_intent.succeeded",
5 "invoice.payment_failed"
6 ],
7 "secret": "whsec_mock_secret"
8}
9fetch('https://fakeapifordevs.vercel.app/api/webhooks/register?page=1&per_page=5&delay=1', {
10 method: 'POST',
11 headers: { 'Content-Type': 'application/json' },
12 body: JSON.stringify(payload)
13})
14 .then(res => res.json())
15 .then(console.log)

Response contract

List responses include pagination metadata and can surface latency information when you add the `delay` query parameter.

Sample response
1{
2 "data": [
3 {
4 "id": "evt_mock001-1",
5 "type": "payment_intent.succeeded",
6 "livemode": false
7 },
8 {
9 "id": "evt_mock001-2",
10 "type": "payment_intent.succeeded",
11 "livemode": false
12 }
13 ],
14 "pagination": {
15 "page": 1,
16 "perPage": 5,
17 "total": 42,
18 "totalPages": 9
19 },
20 "meta": {
21 "delayMs": 0
22 }
23}

Query controls

These parameters are supported consistently across collection routes.

page

1-indexed page number. Defaults to 1.

per_page

Number of records per page. Defaults to 10, max 50.

q

Optional text search against names, titles, descriptions, or tags where supported.

delay

Simulate latency in seconds (max 10s).

simulate_error

Force realistic failures like 429, 500, 401, or 503 for resilience testing.

pagination_style

Switch between page, cursor, and link-style pagination on supported collections.

cors

Use `cors=restrict` or `cors=preflight` to test browser integration edge cases.

Integration checklist

  • Use `page` and `per_page` when you need predictable list states.
  • Append `delay` to mimic loading and partial-rendering moments.
  • Point internal examples and SDKs to `/api/webhooks`.
  • Deep-link the selected method and path when sharing review links.

Playground shortcut

Open the landing page playground with this exact route already selected.

Open playground

https://fakeapifordevs.vercel.app/api/webhooks/register?page=1&per_page=5&delay=1

Need another domain?

Explore the rest of the library without leaving the docs system.

AuthenticationE-commerceReal EstateSocial MediaFood DeliverySaaS

Keep these docs online

Buy the maintainers a coffee

Coffee donations help us keep Webhooks accurate, readable, and easier to test with every release.

  • Covers upkeep for webhooks docs
  • Funds schema QA sprints