> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowpayroll.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Testing webhooks

> Send a test event, receive deliveries on your own machine, and check what your receiver answered.

## Send a test event

`POST /endpoints/{endpointId}/test-deliveries` sends a signed `webhook.test` event to the endpoint straight away, through the same signing, sending and logging as real events. The response tells you what happened:

```json theme={null}
{
  "message": { "text": "Test event delivered", "token": "test_delivery_succeeded" },
  "content": {
    "data": {
      "deliveryId": "dlv_01J9ZQ8Y5W5B7D9F1H3K5M7P9R",
      "succeeded": true,
      "statusCode": 200,
      "durationMilliseconds": 262
    }
  }
}
```

If your receiver did not answer `2xx`, `succeeded` is `false`, `statusCode` shows what it answered, and the test is retried on the normal schedule, so you can watch a retry arrive. You can send up to 5 test events a minute per endpoint.

## Receive deliveries on your own machine

Endpoints must be public HTTPS URLs, so `localhost` is refused. While you build your receiver, use a tunnelling tool to give your local server a public HTTPS address, and register that address as the endpoint.

To look at deliveries before writing any code, point a sandbox endpoint at a hosted request inspector. Anything it receives is visible to whoever holds that URL, so use it only with made-up data, never point a live endpoint at one, and delete the endpoint when you are done.

## Use sandbox

Build and test against sandbox (`https://api.sandbox.flowpayroll.ai`). Sandbox events carry `"livemode": false`; live events carry `true`. Each environment has its own endpoints and secrets.

## See what your receiver answered

`GET /deliveries/{deliveryId}` shows every attempt: when it was sent, how long your server took, the status it answered and the start of its response body. It is the quickest way to see why a delivery failed.

## Common problems

| What you see | Likely cause |
| - | - |
| Creating the endpoint fails with `400` | The URL is not `https://` on port 443, or points at a private address. |
| Every delivery fails with a signature error in your logs | You are verifying a parsed body. Verify the raw bytes. |
| Deliveries time out | Your server does its work before answering. Answer first, then process. |
| Deliveries stop arriving | The endpoint is `Paused` or `DisabledBySystem`. Check `status` and `statusReason`. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.