Guides
Debug webhooks and callbacks
Receive webhook deliveries on a local port, inspect them, answer with a chosen response, and forward or replay them to your dev server.
A payment provider or Git host sends webhooks you can’t easily inspect, and reproducing one means waiting for a real event. This guide receives webhook deliveries on a local port with the API client’s Webhooks view, shows what each one contained, answers with a response you choose, and forwards or replays them to your dev server so you can debug the handler as many times as you need.
What you need
Section titled “What you need”The API client (<kbd>⇧</kbd> <kbd>⌘</kbd> <kbd>O</kbd>) |
The Webhooks view lives here |
| A way to reach the port from the sender, for internet webhooks | A tunnel such as cloudflared or ngrok |
| Your dev server’s URL, if you want deliveries forwarded to it | For example http://localhost:3000/webhooks |
Start the receiver
Section titled “Start the receiver”-
In the API Client, open the Webhooks section.
The Webhooks receiver: pick a port, a canned response, and an optional forward target.
- Webhooks section
- Port to listen on
- Status and body to answer with
- Forward to (optional)
- Start Listening
-
Set the Port (9999 by default), the Respond with status and body the sender receives, and optionally a Forward to URL (your dev server).
-
Click Start Listening. The view shows
http://localhost:PORT, ready to receive.
Point the sender at it
Section titled “Point the sender at it”-
In the provider’s dashboard, set the webhook URL to your local URL (or the tunnel URL for internet deliveries).
-
Trigger an event, or use the provider’s “send test” button.
Inspect each delivery
Section titled “Inspect each delivery”Deliveries appear in the list as they arrive.
-
Select a delivery to see its method, path, headers and body. The body uses the same viewers as the rest of the app (JSON tree, pretty, raw).
-
The sender gets the response you set under Respond with, so it marks the delivery as accepted. If you set a Forward to URL, each delivery is also sent there; the row shows the forward status (or that it failed).
Forward and replay to your dev server
Section titled “Forward and replay to your dev server”The point of the receiver is that you can debug the handler repeatedly without waiting for new events.
Select a delivery, enter your dev server URL in Replay to URL, and click Replay. The exact delivery is sent again, so you can fix the handler and re-run the same payload until it works.
Click Open as Request to turn the delivery into a saved request in the API client (method, headers and JSON body prefilled). From there you can edit it, send it, add tests, and save it in a collection.
Trigger a Flow on a webhook
Section titled “Trigger a Flow on a webhook”To run a chain of requests when a delivery arrives — verify a signature, then call your API, then check the result — attach the webhook to a Flow.
-
Build a Flow in the Flows section (blocks run top to bottom; expressions are JavaScript).
-
In the Flow’s Automation section, turn on Run when a webhook arrives at and note the path (for example
/flows/create-and-fetch-a-pet).A Flow's Automation: run it when a webhook arrives at a path.
- Flows section
- Run when a webhook arrives at this path
- Notify me when an automatic run fails
-
Start the webhook receiver. A delivery to that path runs the Flow, and the delivery is available inside it as the
triggervariable (trigger.body,trigger.headers).
Clean up
Section titled “Clean up”-
Click Stop in the Webhooks view to stop listening.
-
Remove or disable the webhook in the provider’s dashboard, and shut down the tunnel if you started one.
-
Turn off the Flow’s webhook automation if you no longer want it to run.