Skip to main content
Webhooks are used to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send a POST payload in JSON which contains the details about the event, to the webhook’s configured URL. Setting up a webhook allows us to notify you when these payments are completed. Payaza sends webhooks for:
  • Payouts
  • Collections

When to use webhooks

Webhooks are event-based and enable real-time updates of third-party systems as they are triggered and sent out immediately when specific events related to the transaction happen. They’re useful for methods and events that occur outside your application’s control, such as:
  • Getting paid via mobile money or USSD
  • Pending payment transactions to successful
These are all non-simultaneous actions i.e. they are not controlled by your application, so you won’t know when they are completed unless we notify you or you check later. Webhooks can be set up by users using the Payaza Dashboard to configure separate URLs for Live mode and Test mode.
Webhook notifications include an authentication header with your public key encoded in base64 format. This can be used to validate that a webhook notification was sent from us.Idempotency: Process transactions based on their unique transaction_reference to avoid duplicate actions.

Validating Webhook Payloads with HMAC

Our webhook notifications include a header called x-payaza-signature which is an HMAC SHA512 signature generated from the event payload using your secret key. To ensure the integrity and authenticity of webhook events:
  • Always validate the ⁠x-payaza-signature before processing any event.
  • Compute an HMAC SHA512 hash using the received payload and your secret key. The secret key doesn’t need to be base64 encoded
  • Compare the generated hash with the ⁠x-payaza-signature ⁠ in the request header.
  • Ensure that the event is processed only if the computed hash matches the received signature

HMAC Sample

How To Set Up Your Webhook URL

  • Log in to your Payaza dashboard
  • Click on the Settings option which is located on the left side-bar of the dashboard
  • Click on the Developers option from the dropdown menu.
  • Navigate to add your respective webhook URL to each transaction type.
  • Select the Update Webhooks button to update your webhook URLs

Payaza Webhook Notification Samples

Transfer

Successful transfer
Failed transfer

Collections

This webhook notifies your server when a collection event occurs (funds received, failed, status updates). Use it to update order state, reconcile payments, trigger downstream flows, or notify customers.
Collection webhook

Field Reference