PayclaveDocs

Payclave developers

Webhooks

Manage endpoints, delivery attempts, secret rotation, and replay.

Access and availability
Secret key required. Endpoints, deliveries and signing secrets are mode-specific. The server SDK 0.2.0 wraps every webhook endpoint, delivery, replay and incident operation below.

Webhook endpoints

POST

POST /v1/webhook-endpoints

JSON: url (required), eventTypes (optional array; omitted or empty subscribes to all supported types). This endpoint does not implement Idempotency-Key replay.

curl https://api.payclave.com/v1/webhook-endpoints \  -H "Authorization: Bearer sk_test_..." \  -H "Content-Type: application/json" \  -d '{    "url": "https://merchant.example/webhooks/payclave",    "eventTypes": ["invoice.paid", "payment.failed"]  }'
GET

GET /v1/webhook-endpoints

No query or body required.

GET

GET /v1/webhook-endpoints/:id

No body.

PATCH

PATCH /v1/webhook-endpoints/:id

JSON: any of url, enabled, eventTypes, alertsEnabled, alertThreshold, recoveryAlertsEnabled. Optional HTTP Idempotency-Key.

DELETE

DELETE /v1/webhook-endpoints/:id

No body. Optional HTTP Idempotency-Key.

Signing secrets

POST

POST /v1/webhook-endpoints/:id/rotate-secret

No body. Optional HTTP Idempotency-Key.

POST

POST /v1/webhook-endpoints/:id/end-secret-overlap

No body. Optional HTTP Idempotency-Key.

Test events

POST

POST /v1/webhooks/test

JSON: endpointId (required), eventType (optional; defaults to invoice.paid and must be subscribed). No idempotent replay.

Deliveries and replay

GET

GET /v1/webhook-deliveries

Query: limit (default 25, maximum 100), endpointId, eventType, status, createdFrom, createdTo, replayStatus (original or replay), responseFamily (2xx, 3xx, 4xx, 5xx, network).

GET

GET /v1/webhook-deliveries/:id

No body.

GET

GET /v1/webhook-deliveries/:id/attempts

No body.

POST

POST /v1/webhook-deliveries/:id/replay

No body. Required Idempotency-Key of 8-255 visible ASCII characters.

Incident review

GET

GET /v1/webhook-incidents

Optional query: status=open or resolved.

GET

GET /v1/webhook-incidents/:id

No body.

On this page