Skip to content
Weik.ioUniversity
Try Weik.io

Handling incoming webhooks

Patterns 6 · 3:58

The integration acts only on the payment notifications that a bank signs. The bean signatureCheck in its route recomputes the body's signature with the project secret and fails the exchange when the result doesn't match the bank's signature header.

Download the mp4Recorded on 2026.2.2

What it covers

  • The webhook version that receives calls at the gateway and stores each on its channel
  • Each stored call listed with weikio events list
  • The kamelet weikio-event-source that starts the integration's route by reading the channel
  • The bean signatureCheck, and the project secret that Weik.io keeps outside the integration's folder
  • Putting the published version of the integration in production with weikio deploy
  • A failed exchange that Weik.io retries and keeps as a dead letter for you to resend or discard

Commands in this video

Terminal
$ weikio deploy finance/bank-notification-handler --env production --version 0.1.0 -y
$ weikio logs finance/bank-notification-handler --env production --since 1m
$ weikio events list finance/bank-notification-received --env production --family hook --api bank-notifications --since 1h
Transcript
  1. 0:01A bank sends payment notifications as HTTP calls,
  2. 0:05but you act only on the ones it signs.
  3. 0:12The bank posts notifications to the gateway in production.
  4. 0:19The bank's key lets any call in, so this one would book 5000.00 EUR nobody owed.
  5. 0:29Weik.io has the webhook version and its channel,
  6. 0:32the kamelet weikio-event-source and the project secret.
  7. 0:41The webhook version bank-notifications v1 receives calls at the gateway.
  8. 0:47The gateway stores each call on the channel that version names,
  9. 0:50with the caller's headers.
  10. 0:52Weik.io answers only after storing the call's body.
  11. 0:56The Weik.io CLI lists each stored call with weikio events list.
  12. 1:05The kamelet weikio-event-source starts the route by reading the channel.
  13. 1:10Each stored call arrives as one message, the body as the bank sent it.
  14. 1:15The bank's signature arrives as the header Weikio-Hook-X-Signature.
  15. 1:21You see the header on the admin UI's Events page.
  16. 1:29The project secret bank-webhook-secret has a value per environment.
  17. 1:34The bean signatureCheck, the route's first step,
  18. 1:38recomputes the body's signature with the secret and fails
  19. 1:41the exchange unless Weikio-Hook-X-Signature matches it.
  20. 1:46Weik.io keeps the value outside the integration's folder.
  21. 1:49The secret is in Variables and secrets.
  22. 1:56weikio deploy puts the published version of the integration in production.
  23. 2:08The webhook version stores and answers the call.
  24. 2:14The kamelet hands it over, then the bean's check passes.
  25. 2:18weikio logs shows the call accepted and the payment booked.
  26. 2:30The webhook version stores the second notification and answers it too.
  27. 2:37The bean finds the signature doesn't match, so the exchange fails.
  28. 2:49A failed exchange is retried,
  29. 2:51kept as a dead letter with its reason on the Dead letters page,
  30. 2:55where you resend or discard it.
  31. 3:01The CLI lists every call the webhook version stored, the refused one too.
  32. 3:14The receipt on the Events page keeps the bank's
  33. 3:17signature header under the name Weikio-Hook-X-Signature.
  34. 3:27The project secret is set for production, and its value is shown nowhere.
  35. 3:36The webhook version and its channel store every call the bank sends.
  36. 3:41The kamelet weikio-event-source hands each stored call to the route.
  37. 3:46The bean signatureCheck checks the signature against the project secret.

Next in this track

Patterns 7 · 3:18 Running a script on a cron schedule Watched

Sign in to the live demo

Sign in with the shared viewer account. It can open every screen of the example projects but can't change anything.

E-mail
viewer@demo.weik.io
Password
try-weikio-live-demo
Open the live demo