KO

언어

로그인무료로 시작하기
Developers: API, webhooks, MCP and integrations · 2/5

Receiving events with webhooks and verifying signatures

Send deal, payment and other events to your server instantly; verify the signature and de-duplicate retries.

14분 · 대상: 전체

강의 내용은 영어로 표시되며, 화면은 사용하는 언어로 표시돼요.
위치

Dashboard → All tools → Management → Developers → Webhooks

페이지 열기

이 강의를 마치면

You can set up a webhook endpoint, send a test event, verify with the signature that a request really came from Reydoc and know the retry rules on failure.

A webhook is Reydoc sending an HTTPS POST to your server when something happens (for example a deal is funded or a payment is made), so you do not have to poll the API.

Delivery is "at least once": with network issues the same event can arrive more than once, so de-duplicate every event by its event ID.

단계별 안내

  1. Create an endpoint

    In the Webhooks tab choose the environment in the new endpoint form. As the target choose your own HTTPS address, or the Reydoc test receiver (7 days) to experiment.

  2. Enter the address and events

    Enter your server address (up to 500 characters). Choose "*" for all events, group options such as "deal.*", or only webhook.test.v1 to try it. Groups: campaign, deal, payment, payout, order, affiliate, creator, social, media, rights, agency, team, automation, integration, store.

  3. Store the secret

    Add an optional description (up to 200 characters) and create the endpoint. The signing secret is shown only once; put it in your server's secret variables.

  4. Verify the signature

    Each request carries a "Reydoc-Signature: t=<unix seconds>,v1=<hex>" header. On your server compute HMAC-SHA256(secret, t + "." + raw body) and compare it with v1 in constant time. Reject the request if t is more than 300 seconds old (replay protection).

  5. Send a test event

    On the endpoint page send a test event. With the test receiver you see whether the signature is valid and the clock difference. On your own server check that you return 2xx.

  6. Manage the endpoint

    The endpoint page has Resend (repeats a single delivery), Rotate secret (the old secret stops working immediately), Pause, Activate and Close.

규칙과 한도

  • Up to 10 open endpoints per workspace; the delivery timeout is 10 seconds.
  • Failed deliveries are retried after 1 min, 5 min, 30 min, 2 h, 8 h and 24 h. After the 7th attempt, the delivery goes to the dead-letter queue (DLQ).
  • An endpoint with 15 consecutive failures is closed automatically and its owner is emailed.
  • The endpoint address must be https.

팁

  • Return 2xx as soon as you receive the event and queue the heavy work; if you exceed 10 seconds the delivery counts as failed.
  • Store processed event IDs in a table; ignore an ID that arrives again.
  • After rotating the secret, update the value on your server at the same time; the old secret stops working immediately.

자주 하는 실수

  • Computing the signature over parsed JSON: the signature covers the raw body, and even a whitespace change breaks it.
  • Skipping the timestamp check: you stay open to replays of old requests.
  • Processing the same event twice (for example reducing stock twice): no de-duplication.
진행 상황은 이 브라우저에만 저장돼요.

관련 강의

Receiving events with webhooks and verifying signatures · Reydoc Academy