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

# Send Test Event

> Send a signed test event to your webhook URL to check that it is reachable and your signature check works.

### Authentication

Requires `X-API-KEY` header.

### Details

Sends one signed event to the webhook URL set for the environment your API key belongs to (your test key uses the sandbox URL, your live key uses the live URL). It goes through the same pipeline as a real event, so the event `id`, the three `X-Playto-*` headers, the signature and the retries are the real thing. See [Webhooks](/api-reference/webhooks/overview.md) for how to verify it.

The call queues the event and returns straight away. Check your server's log for the event `id` it returns.

* **Live (production):** only `webhook.test` can be sent. It carries a short message, your merchant id and a timestamp, with `livemode: true`. It never looks like a payment.
* **Sandbox:** you can also send a sample `invoice.paid`, `payment.succeeded` or `dispute.created`. A sample has the fields of the real event, obviously fake ids (all zeros) and `livemode: false`, so you can run your real handler against it.

You can send up to 10 test events a minute.

### Body Parameters

**event** `string`

The event to send. Defaults to `webhook.test`. In the sandbox you can also pass `invoice.paid`, `payment.succeeded` or `dispute.created`. Any other value, or anything but `webhook.test` in production, returns `400`.

### Response

Returns `202 Accepted`.

**id** `string`

The event id (`evt_...`). It is the `id` in the body your server receives and the `X-Playto-Event-Id` header.

**event** `string`

The event type that was queued.

**livemode** `boolean`

`true` in production, `false` in the sandbox.

**status** `string`

The delivery's state when this call returned: `pending` (queued), `delivered`, or `failed` (the first attempt failed and a retry is scheduled).

```bash cURL
curl -X POST https://api.playto.so/v1/webhooks/test/ \
  -H "X-API-KEY: sk_live_your_api_key_here"
```

```bash cURL (sandbox sample)
curl -X POST https://sandbox-api.playto.so/v1/webhooks/test/ \
  -H "X-API-KEY: sk_test_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"event": "payment.succeeded"}'
```

```json 202
{
  "id": "evt_0c5e8f2a1d7b4963a4e0b8d6f3c1a927",
  "event": "webhook.test",
  "livemode": true,
  "status": "pending"
}
```

```json 400 (no webhook URL)
{
  "error": {
    "type": "invalid_request_error",
    "code": "webhook_url_not_set",
    "message": "No webhook URL is set for this account. Add one in the dashboard, then try again."
  }
}
```

```json 400 (event not allowed)
{
  "error": {
    "type": "invalid_request_error",
    "code": "validation_error",
    "message": "One or more fields are invalid.",
    "details": {
      "event": ["Unsupported event. Allowed here: webhook.test. Other events can be tested in the sandbox."]
    }
  }
}
```

```json 429
{
  "error": {
    "type": "rate_limit_error",
    "code": "rate_limited",
    "message": "Request was throttled. Expected available in 42 seconds."
  }
}
```
