Setup Webhook

Webhooks allow Payluk to notify your application in real time whenever important events occur, such as escrow creation, updates, completion, or disputes.


How to Set Up a Webhook

To configure your webhook URL on Payluk, follow these steps:

  1. Log in to your Payluk account
    👉 https://app.payluk.ng

  2. Navigate to Account Settings

  3. Open the API Key / Callback tab

  4. In the Webhook URL section, enter the publicly accessible URL on your server where Payluk should send events

  5. Save your changes to activate the webhook

Once configured, Payluk will send webhook events to this URL for every escrow-related action.


Webhook Events

Your webhook endpoint will receive events for actions such as:

  • Escrow creation
  • Escrow updates
  • Escrow completion
  • Escrow Payment
  • Dispute lifecycle events

Each event is delivered as a JSON payload via an HTTP POST request.


Webhook Security

All webhook requests sent by Payluk include a signature header:

Signature Verification

  • Use your secret API key to verify and decrypt the webhook payload
  • Always validate the x-payluk-signature before processing the event
  • Reject any webhook request that fails signature verification
const crypto = require('crypto');
const secret = process.env.SECRET_KEY;

app.post("/my/webhook/url", function(req, res) {
  //validate event
  const hash = crypto.createHmac('sha512', secret).update(JSON.stringify(req.body)).digest('hex');
  if (hash == req.headers['x-payluk-signature']) {
    // Retrieve the request's body
    const event = req.body;
    // Do something with event  
  }
  res.send(200);
});