# Webhook

> An HTTP request a platform sends to your server when a payment changes. How CryptoLike webhooks are delivered, retried and deduplicated by event_id.

Source: https://cryptolike.net/glossary/webhook
Updated: 2026-09-25

An HTTP POST that a platform sends to your server when something changes, so your system learns about the event without polling.

## How it works in CryptoLike

CryptoLike sends a signed JSON event to your endpoint whenever a payment, a deposit or a payout changes state — 21 event types, such as `invoice.paid`, `invoice.underpaid`, `invoice.expired`, `deposit.confirmed` and `withdrawal.completed`. Add an endpoint in the cabinet (Developers → Webhooks → Add endpoint) or with `POST /v1/webhooks/endpoints`: an `https://` URL on a public host, the event types or `*`, and a secret.

Each request carries `X-Event-Id`, `X-Event-Type`, `X-Timestamp` and `X-Signature`; the body has `event_id`, `type`, `created_at` and `data`. Answer with a 2xx status within 10 seconds. Otherwise the delivery is retried after 1 min, 5 min, 15 min, 1 h, 6 h and 24 h — 7 attempts, about 31 hours — and then marked exhausted; resend it from Developers → Webhooks → Deliveries → Retry.

Delivery is at least once, so the same event can arrive twice with the same `event_id`: store it and skip repeats. Events of one payment can arrive out of order; use `created_at` and the `status` in `data`. "Send test event" in the cabinet posts a signed `ping` to one endpoint. Verify every request — see [webhook signature](https://cryptolike.net/glossary/webhook-signature).

## Example

A CryptoLike webhook request looks like this; the body is shown formatted for reading, while the bytes you receive may differ in key order and whitespace. Parse it as JSON and verify the signature over the raw bytes exactly as received:

```http
POST /your/path HTTP/1.1
Content-Type: application/json
X-Event-Id: 6f1c2c1e-3b2a-4d5e-8f90-1234567890ab
X-Event-Type: invoice.paid
X-Timestamp: 1700000000
X-Signature: sha256=788e60a2141669b4c7616c1c616fefb8ec38df0948fba19c6f4e48c616e46c21

{"event_id":"6f1c2c1e-3b2a-4d5e-8f90-1234567890ab","type":"invoice.paid","created_at":"2023-11-14T22:13:20Z","data":{"invoice":{"id":"0e8c9a4b-1111-4222-8333-444455556666","status":"paid"}}}
```
