Skip to content
Docs menu

Endpoints

Send a test event

Deliver a signed sample event to an endpoint to check your handler.

Sends a signed sample event and returns the delivery. The payload has test: true and a made-up subject whose ID contains _test_, with only that ID in data, so your handler can tell it apart and nothing in your business changes. A test delivery goes out once and isn't retried.

Path

  • id string Required
    The webhook endpoint's ID, such as whk_GFAKLrE8wkBwF4WL.

Body

  • event_type string
    A type the endpoint receives. Defaults to its first one.

Errors

  • 400 invalid_request
    A field is missing, unknown or out of range. field names it.
  • 404 not_found
    No webhook endpoint with that ID belongs to your business.
  • 429 rate_limited
    More than 10 test events and resends in a minute for this business.

Any request can also fail on its key or its body. See errors.

Request
curl -X POST "https://dash.402pay.co/api/v1/webhooks/whk_GFAKLrE8wkBwF4WL/test" \  -H "Authorization: Bearer $PAY402_SECRET_KEY" \  -H "Content-Type: application/json" \  -d '{    "event_type": "payment.succeeded"  }'
Response201 Created
{  "data": {    "id": "dlv_bT1dN9zK1zp9H6Re",    "kind": "webhook_delivery",    "webhook_id": "whk_GFAKLrE8wkBwF4WL",    "event_id": "evt_AncdRQ0YlMsNNIQD",    "event_type": "payment.succeeded",    "subject": {      "kind": "payment",      "id": "pmt_test_wcKbRA2NP8gXhlmr"    },    "status": "succeeded",    "response_status": 200,    "duration_ms": 269,    "attempt": 1,    "attempts": [      {        "at": "2026-09-26T21:23:17.117Z",        "response_status": 200,        "duration_ms": 269,        "trigger": "manual"      }    ],    "next_retry_at": null,    "request_headers": {      "content-type": "application/json",      "webhook-id": "evt_AncdRQ0YlMsNNIQD",      "webhook-timestamp": "1790457797",      "webhook-signature": "v1,erz2/ak2MUN/eIaREBRHTG9nfipCw9fZ2VcWbYByqw4="    },    "payload": {      "id": "evt_AncdRQ0YlMsNNIQD",      "kind": "event",      "type": "payment.succeeded",      "subject": {        "kind": "payment",        "id": "pmt_test_wcKbRA2NP8gXhlmr"      },      "data": {        "id": "pmt_test_wcKbRA2NP8gXhlmr"      },      "actor": {        "kind": "system",        "id": null,        "name": null      },      "mode": "live",      "test": true,      "api_version": "v1",      "created_at": "2026-09-26T21:23:17.117Z"    },    "created_at": "2026-09-26T21:23:17.117Z"  }}