Адрес и подписка

PUThttps://api.astrum.shop/v1/webhook
Область webhooks:manage

Адрес приёмника и типы событий. Подписаться можно только на события областей ключа.

Тело запроса

application/json
urlstring | nullобязательно
eventsarray | null

Ответы

Успешно

urlstring | null
eventsarray | null
secret_setboolean
previous_secret_expires_atstring | null
deliveryobject
secretstring | null

Общие для всех методов: 401 unauthenticated, 403 scope_missing, 403 ip_not_allowed, 403 account_suspended, 429 rate_limited, 503 api_disabled, 500 internal_error. Подробно — в разделе «Ошибки».

тестовые доллары,
ключ ask_test_…
curl https://api.astrum.shop/v1/webhook -X PUT \
  -H "Authorization: Bearer $ASTRUM_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/astrum/webhook",
    "events": [
      "order.delivered",
      "activation.needs_input",
      "activation.activated"
    ]
  }'