S
docs.syncra.money
Вебхуки
POST/api/v1/p2p/merchant/callbacks/{callback_id}/retryСтейдж

Ставит в очередь немедленную повторную доставку ОДНОЙ из собственных доставок вебхуков вызывающего. Подходят только записи с терминальным провалом (статус ERROR или RETRY); PENDING/SUCCESS отклоняются с 400 FAILED_PRECONDITION. Rate limit: не более одного ручного retry на запись за 60 секунд (иначе 429 RESOURCE_EXHAUSTED). Чужой callback_id — 403, неизвестный — 404. Перезаписанная строка возвращается со статусом PENDING, очищенными полями ответа и СОХРАНЁННЫМ retry_count (в отличие от админского retry, который сбрасывает счётчик попыток). Двойная аутентификация: HMAC-пара или JWT кабинета. Тело — пустой JSON-объект.

Authorization

MerchantToken MerchantSignature MerchantTimestamp
X-Merchant-Token<token>

Публичный токен мерчанта (64 hex-символа), выдаётся при онбординге.

In: header

X-Signature<token>

Подпись HMAC-SHA256 (единая схема для всех эндпоинтов). Формат: t=<unix_seconds>,v1=<hex_hmac_sha256> где hex_hmac = HMAC-SHA256(webhook_secret, "<unix_seconds>.<raw_body>"). Окно replay: 5 минут (допускается дрейф 60 секунд в будущее).

In: header

X-Timestamp<token>

Unix-время отправки запроса в секундах. Окно подписи: 5 минут назад / 60 секунд вперёд.

In: header

Path Parameters

callback_id*string
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/api/v1/p2p/merchant/callbacks/497f6eca-6276-4993-bfeb-53cbbbba6f08/retry" \  -H "X-Merchant-Token: <MERCHANT_TOKEN>" \  -H "X-Timestamp: <UNIX_TIMESTAMP>" \  -H "X-Signature: t=<UNIX_TIMESTAMP>,v1=<HEX_HMAC_SHA256>" \  -H "Content-Type: application/json" \  -d '{}'
{  "callback": {    "callback_id": "f4a074ff-b67f-4fe6-8a19-9acf4989a084",    "deal_id": "2fa5b64f-5b72-4263-958e-07b76f41abe3",    "merchant_id": "500924a8-3f5e-4c00-beb8-2efcde988aea",    "callback_url": "http://example.com",    "status": "PENDING",    "retry_count": 0,    "response_code": 0,    "response_body": "string",    "next_retry_at": "2019-08-24T14:15:22Z",    "created_at": "2019-08-24T14:15:22Z"  }}
{  "type": "../dictionary",  "title": "string",  "status": 0,  "detail": "string",  "instance": "../dictionary",  "errors": [    {      "field": "amount",      "message": "must be greater than 0",      "code": "POSITIVE_REQUIRED"    }  ]}
{  "type": "../dictionary",  "title": "string",  "status": 0,  "detail": "string",  "instance": "../dictionary",  "errors": [    {      "field": "amount",      "message": "must be greater than 0",      "code": "POSITIVE_REQUIRED"    }  ]}
{  "type": "../dictionary",  "title": "string",  "status": 0,  "detail": "string",  "instance": "../dictionary",  "errors": [    {      "field": "amount",      "message": "must be greater than 0",      "code": "POSITIVE_REQUIRED"    }  ]}
{  "type": "../dictionary",  "title": "string",  "status": 0,  "detail": "string",  "instance": "../dictionary",  "errors": [    {      "field": "amount",      "message": "must be greater than 0",      "code": "POSITIVE_REQUIRED"    }  ]}
Empty