Skip to content
Weik.ioUniversity
Try Weik.io

Webhooks

APIM 4 · 3:09

A webhook version of the API accepts a payment provider's confirmations and stores each one in a channel before it answers ok. An integration then receives them from that channel.

Download the mp4Recorded on 2026.2

What it covers

  • Declaring the channel payments with weikio channel create, then applying version 2.0 as a webhook
  • The payment provider as a caller with its own key
  • A posted confirmation, stored as a webhook receipt before the ok
  • Listing the receipts with weikio events list in the hook family
  • The admin UI's Events page, which lists the receipt and opens it with its body
  • An integration in finance that receives the events of the payments channel

Commands in this video

Terminal
$ weikio channel create finance/payments
$ weikio apply -f ./finance/apis/webhooks.yaml
$ weikio subscription create finance/payment-provider --env production --api invoices --type apikey -y
$ curl http://api.example.com/invoices/2.0/payments -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" -d '{"payment":"settled","order":42}'
$ weikio events list --env production --family hook --api invoices
Transcript
  1. 0:02A payment provider pushes a confirmation each time a payment settles. This video receives one through a webhook.
  2. 0:13The installation is where the earlier APIM videos left it,
  3. 0:16with API invoices served in production.
  4. 0:20partner-x calls version 1.0 with its key, under a rate limit.
  5. 0:25The payment provider pushes its confirmation without being asked.
  6. 0:29It needs its message taken in, with no response.
  7. 0:37The channel must exist first,
  8. 0:39so weikio channel create finance/payments runs before the apply.
  9. 0:45weikio apply with webhooks.yaml stores both documents and updates the route tables.
  10. 0:51The document gives version 2.0 the type webhook and the channel payments.
  11. 0:57It also deploys version 2.0 to production,
  12. 1:00so the gateway serves both versions under the same prefix.
  13. 1:04Version 1.0 forwards calls to orders-api,
  14. 1:09while version 2.0 stores its body in the channel.
  15. 1:16Webhook calls get in under a subscription like any call,
  16. 1:20so weikio subscription create makes one for payment-provider.
  17. 1:25payment-provider gets a key only it has.
  18. 1:28The key prints once.
  19. 1:32curl acts as the provider, posting its confirmation with the key.
  20. 1:38The body goes into the channel.
  21. 1:40ok comes after the body is stored.
  22. 1:46What the gateway stores for each call is a webhook receipt.
  23. 1:50A channel keeps its messages in Weik.io for integrations to read.
  24. 1:55The receipts of this version are in the channel payments.
  25. 2:01weikio events list reads the receipts stored for the API invoices in production.
  26. 2:08The family hook holds the events a webhook version stored.
  27. 2:12Each row is a receipt from the API invoices.
  28. 2:19The version page gives the type and the channel: webhook, payments.
  29. 2:25On the Events page, the receipt appears in finance/payments.
  30. 2:30The Events page reads what the command read.
  31. 2:33Opening the receipt shows its body.
  32. 2:40Now an integration in the project finance,
  33. 2:42the payment reader, reads receipts in production.
  34. 2:46It takes them from the channel payments.
  35. 2:51The webhook version stores every call's body in the channel payments.
  36. 2:55The provider has its ok, and the payment reader has the receipts.

Sign in to the live demo

Sign in with the shared viewer account, which can open every screen of the example projects and can't change anything.

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