Webhooks
Endpoints для настройки webhook URL, проверки доставки событий и повторной отправки failed deliveries.
Webhook secret отличается от API HMAC secret. API secret подписывает исходящие запросы вашего приложения к API, а webhook secret нужен вам для проверки входящих событий от обменника.
Список webhooks
Sanctum token in Authorization: Bearer <token> format.
Webhook endpoint list and event catalog.
Standard error envelope.
GET /api/v3/private/webhooks HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"state": 0,
"message": "text",
"result": {
"endpoints": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"url": "https://example.com",
"events": [
"text"
],
"status": "active",
"signing_algorithm": "hmac-sha256-v1",
"secret_fingerprint": "text",
"failure_count": 1,
"last_delivery_at": "2026-01-01T00:00:00.000Z",
"last_success_at": "2026-01-01T00:00:00.000Z",
"last_failure_at": "2026-01-01T00:00:00.000Z",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}
],
"events": [
{
"event": "order.status_changed",
"title": "text"
}
],
"limits": {}
},
"meta": {
"request_id": "text",
"correlation_id": "text",
"timestamp": "2026-01-01T00:00:00.000Z",
"pagination": {
"mode": "page",
"current_page": 1,
"per_page": 1,
"total": 1,
"last_page": 1,
"from": 1,
"to": 1,
"cursor": "text",
"next_cursor": "text",
"has_more": true
}
}
}Создать webhook
Sanctum token in Authorization: Bearer <token> format.
Makes unsafe requests safely repeatable for 24 hours by default.
Client-defined id used to correlate API request and webhook events.
Webhook endpoint with one-time secret.
Standard error envelope.
Standard error envelope.
POST /api/v3/private/webhooks HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 61
{
"name": "text",
"url": "https://example.com",
"events": [
"text"
]
}{
"state": 0,
"message": "text",
"result": {
"endpoint": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"url": "https://example.com",
"events": [
"text"
],
"status": "active",
"signing_algorithm": "hmac-sha256-v1",
"secret_fingerprint": "text",
"failure_count": 1,
"last_delivery_at": "2026-01-01T00:00:00.000Z",
"last_success_at": "2026-01-01T00:00:00.000Z",
"last_failure_at": "2026-01-01T00:00:00.000Z",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z",
"secret": "text"
}
},
"meta": {
"request_id": "text",
"correlation_id": "text",
"timestamp": "2026-01-01T00:00:00.000Z",
"pagination": {
"mode": "page",
"current_page": 1,
"per_page": 1,
"total": 1,
"last_page": 1,
"from": 1,
"to": 1,
"cursor": "text",
"next_cursor": "text",
"has_more": true
}
}
}Проверить webhook
Sanctum token in Authorization: Bearer <token> format.
Makes unsafe requests safely repeatable for 24 hours by default.
Client-defined id used to correlate API request and webhook events.
api.testCreated webhook event and delivery ids.
Standard error envelope.
Standard error envelope.
POST /api/v3/private/webhooks/test HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 127
{
"endpoint_id": "123e4567-e89b-12d3-a456-426614174000",
"event_type": "api.test",
"payload": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}{
"state": 0,
"message": "text",
"result": {
"event": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"type": "text",
"status": "text",
"request_id": "text",
"correlation_id": "text"
},
"deliveries": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"status": "text",
"endpoint_id": "123e4567-e89b-12d3-a456-426614174000"
}
]
},
"meta": {
"request_id": "text",
"correlation_id": "text",
"timestamp": "2026-01-01T00:00:00.000Z",
"pagination": {
"mode": "page",
"current_page": 1,
"per_page": 1,
"total": 1,
"last_page": 1,
"from": 1,
"to": 1,
"cursor": "text",
"next_cursor": "text",
"has_more": true
}
}
}Список webhook events
Sanctum token in Authorization: Bearer <token> format.
125Use cursor for large datasets. The first cursor page uses pagination=cursor; next pages use cursor.
pagePossible values: Opaque cursor returned in meta.pagination.next_cursor.
Webhook event list.
Standard error envelope.
GET /api/v3/private/webhooks/events HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"state": 0,
"message": "text",
"result": {
"events": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"type": "order.created",
"resource": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"status": "text",
"request_id": "text",
"correlation_id": "text",
"idempotency_key": "text",
"payload": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"deliveries_count": 1,
"deliveries": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"status": "queued",
"attempt": 1,
"endpoint": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"event": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"request": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"response": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"error": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"next_retry_at": "2026-01-01T00:00:00.000Z",
"delivered_at": "2026-01-01T00:00:00.000Z"
}
],
"created_at": "2026-01-01T00:00:00.000Z"
}
]
},
"meta": {
"request_id": "text",
"correlation_id": "text",
"timestamp": "2026-01-01T00:00:00.000Z",
"pagination": {
"mode": "page",
"current_page": 1,
"per_page": 1,
"total": 1,
"last_page": 1,
"from": 1,
"to": 1,
"cursor": "text",
"next_cursor": "text",
"has_more": true
}
}
}Получить webhook event
Sanctum token in Authorization: Bearer <token> format.
Webhook event with deliveries.
Standard error envelope.
GET /api/v3/private/webhooks/events/{event} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"state": 0,
"message": "text",
"result": {
"event": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"type": "order.created",
"resource": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"status": "text",
"request_id": "text",
"correlation_id": "text",
"idempotency_key": "text",
"payload": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"deliveries_count": 1,
"deliveries": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"status": "queued",
"attempt": 1,
"endpoint": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"event": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"request": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"response": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"error": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"next_retry_at": "2026-01-01T00:00:00.000Z",
"delivered_at": "2026-01-01T00:00:00.000Z"
}
],
"created_at": "2026-01-01T00:00:00.000Z"
}
},
"meta": {
"request_id": "text",
"correlation_id": "text",
"timestamp": "2026-01-01T00:00:00.000Z",
"pagination": {
"mode": "page",
"current_page": 1,
"per_page": 1,
"total": 1,
"last_page": 1,
"from": 1,
"to": 1,
"cursor": "text",
"next_cursor": "text",
"has_more": true
}
}
}Список доставок
Sanctum token in Authorization: Bearer <token> format.
125Use cursor for large datasets. The first cursor page uses pagination=cursor; next pages use cursor.
pagePossible values: Opaque cursor returned in meta.pagination.next_cursor.
Webhook delivery list.
Standard error envelope.
GET /api/v3/private/webhooks/deliveries HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"state": 0,
"message": "text",
"result": {
"deliveries": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"status": "queued",
"attempt": 1,
"endpoint": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"event": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"request": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"response": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"error": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"next_retry_at": "2026-01-01T00:00:00.000Z",
"delivered_at": "2026-01-01T00:00:00.000Z"
}
]
},
"meta": {
"request_id": "text",
"correlation_id": "text",
"timestamp": "2026-01-01T00:00:00.000Z",
"pagination": {
"mode": "page",
"current_page": 1,
"per_page": 1,
"total": 1,
"last_page": 1,
"from": 1,
"to": 1,
"cursor": "text",
"next_cursor": "text",
"has_more": true
}
}
}Получить доставку
Sanctum token in Authorization: Bearer <token> format.
Webhook delivery.
Standard error envelope.
GET /api/v3/private/webhooks/deliveries/{delivery} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"state": 0,
"message": "text",
"result": {
"delivery": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"status": "queued",
"attempt": 1,
"endpoint": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"event": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"request": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"response": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"error": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"next_retry_at": "2026-01-01T00:00:00.000Z",
"delivered_at": "2026-01-01T00:00:00.000Z"
}
},
"meta": {
"request_id": "text",
"correlation_id": "text",
"timestamp": "2026-01-01T00:00:00.000Z",
"pagination": {
"mode": "page",
"current_page": 1,
"per_page": 1,
"total": 1,
"last_page": 1,
"from": 1,
"to": 1,
"cursor": "text",
"next_cursor": "text",
"has_more": true
}
}
}Повторить доставку
Sanctum token in Authorization: Bearer <token> format.
Makes unsafe requests safely repeatable for 24 hours by default.
Client-defined id used to correlate API request and webhook events.
Delivery queued for retry.
Standard error envelope.
Standard error envelope.
POST /api/v3/private/webhooks/deliveries/{delivery}/retry HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"state": 0,
"message": "text",
"result": {
"delivery": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"status": "queued",
"attempt": 1,
"endpoint": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"event": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"request": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"response": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"error": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"next_retry_at": "2026-01-01T00:00:00.000Z",
"delivered_at": "2026-01-01T00:00:00.000Z"
}
},
"meta": {
"request_id": "text",
"correlation_id": "text",
"timestamp": "2026-01-01T00:00:00.000Z",
"pagination": {
"mode": "page",
"current_page": 1,
"per_page": 1,
"total": 1,
"last_page": 1,
"from": 1,
"to": 1,
"cursor": "text",
"next_cursor": "text",
"has_more": true
}
}
}Получить webhook
Sanctum token in Authorization: Bearer <token> format.
Standard success envelope.
Standard error envelope.
GET /api/v3/private/webhooks/{webhook} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"state": 0,
"message": "text",
"result": null,
"meta": {
"request_id": "text",
"correlation_id": "text",
"timestamp": "2026-01-01T00:00:00.000Z",
"pagination": {
"mode": "page",
"current_page": 1,
"per_page": 1,
"total": 1,
"last_page": 1,
"from": 1,
"to": 1,
"cursor": "text",
"next_cursor": "text",
"has_more": true
}
}
}Обновить webhook
Sanctum token in Authorization: Bearer <token> format.
Makes unsafe requests safely repeatable for 24 hours by default.
Client-defined id used to correlate API request and webhook events.
Standard success envelope.
Standard error envelope.
Standard error envelope.
Standard error envelope.
PATCH /api/v3/private/webhooks/{webhook} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 79
{
"name": "text",
"url": "https://example.com",
"events": [
"text"
],
"status": "active"
}{
"state": 0,
"message": "text",
"result": null,
"meta": {
"request_id": "text",
"correlation_id": "text",
"timestamp": "2026-01-01T00:00:00.000Z",
"pagination": {
"mode": "page",
"current_page": 1,
"per_page": 1,
"total": 1,
"last_page": 1,
"from": 1,
"to": 1,
"cursor": "text",
"next_cursor": "text",
"has_more": true
}
}
}Удалить webhook
Sanctum token in Authorization: Bearer <token> format.
Makes unsafe requests safely repeatable for 24 hours by default.
Client-defined id used to correlate API request and webhook events.
Standard success envelope.
Standard error envelope.
Standard error envelope.
DELETE /api/v3/private/webhooks/{webhook} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"state": 0,
"message": "text",
"result": null,
"meta": {
"request_id": "text",
"correlation_id": "text",
"timestamp": "2026-01-01T00:00:00.000Z",
"pagination": {
"mode": "page",
"current_page": 1,
"per_page": 1,
"total": 1,
"last_page": 1,
"from": 1,
"to": 1,
"cursor": "text",
"next_cursor": "text",
"has_more": true
}
}
}Сменить webhook secret
Sanctum token in Authorization: Bearer <token> format.
Makes unsafe requests safely repeatable for 24 hours by default.
Client-defined id used to correlate API request and webhook events.
Webhook endpoint with one-time new secret.
Standard error envelope.
Standard error envelope.
POST /api/v3/private/webhooks/{webhook}/rotate-secret HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"state": 0,
"message": "text",
"result": {
"endpoint": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"url": "https://example.com",
"events": [
"text"
],
"status": "active",
"signing_algorithm": "hmac-sha256-v1",
"secret_fingerprint": "text",
"failure_count": 1,
"last_delivery_at": "2026-01-01T00:00:00.000Z",
"last_success_at": "2026-01-01T00:00:00.000Z",
"last_failure_at": "2026-01-01T00:00:00.000Z",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z",
"secret": "text"
}
},
"meta": {
"request_id": "text",
"correlation_id": "text",
"timestamp": "2026-01-01T00:00:00.000Z",
"pagination": {
"mode": "page",
"current_page": 1,
"per_page": 1,
"total": 1,
"last_page": 1,
"from": 1,
"to": 1,
"cursor": "text",
"next_cursor": "text",
"has_more": true
}
}
}Последнее обновление
Это было полезно?