Webhooks

Lumanu webhook events for workspaces, payables, transfers and partners, how to set up your webhook URL, and how to verify the X-Signature HMAC SHA-256 signature.

Lumanu uses webhooks to send real-time notifications about events in your integration. When events occur, we'll send HTTP POST requests to your configured endpoint with signed payloads containing event details.

Setting up webhooks

Set your webhook URL and get your secret in the developer portal. Workspaces created through an onboarding link are subscribed automatically.

Security

Each webhook request includes a signature in the X-Signature header. This signature is a HMAC SHA-256 hash of the request body using your webhook secret.

To verify webhook authenticity:

  1. Get the signature from the X-Signature header
  2. Create a HMAC SHA-256 hash of the raw request body using your webhook secret
  3. Compare the hashes - they should match exactly

Example Verification:

const crypto = require('crypto');

function verifyWebhookSignature(body, signature, secret) {
  const hmac = crypto.createHmac('sha256', secret);
  const digest = hmac.update(body).digest('hex');
  return crypto.timingSafeEqual(
    Buffer.from(signature),
    Buffer.from(digest)
  );
}

Events

All webhook events follow a standard format:

{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "event_type": "entity.event",
  "workspace_id": "c329ce0d-3ff8-41cd-a881-7e8ec9fb1a90", // If applicable
  "data": {
    "id": "75eb2d87-1ce7-4e71-a9af-0c3a63547555"
  }
}

The webhook data will contain the identifier of the entity that has changed (i.e. for workspace.created it will be the workspace id). It's recommended that you use this to retrieve the entity from the API to get other fields on that entity as they may have changed since the webhook was created or processed.

Workspace Events

  • workspace.created - Triggered when a workspace is created
  • workspace.updated - Triggered when workspace details are updated, and when a workspace's business verification (KYB) status changes, for example when it is approved or declined

When a brand creates a workspace through a self-serve onboarding link, workspace.created also carries the invite, so you can match the workspace to the brand without asking them for its ID. idempotency_key is the key you sent when you created the link:

{
  "id": "6f1c2c0e-3d0b-4a57-9a52-6f0b0f1e8c21",
  "event_type": "workspace.created",
  "data": {
    "id": "75eb2d87-1ce7-4e71-a9af-0c3a63547555",
    "onboarding_invite_id": "0b6e5c1a-8f3e-4d43-b1a4-5a8e1f7c9d02",
    "idempotency_key": "customer-4821",
    "application_id": "a3c1e8f2-6b4d-4f0e-9c7a-2d5b8e1f4a60"
  }
}

Workspaces created through an onboarding link are subscribed to your application's webhooks automatically.

Payable Events

  • payable.created - Triggered when a payable is created
  • payable.updated - Triggered when a payable is updated (other than status)
  • payable.approved - Triggered when a payable is approved
  • payable.unapproved - Triggered when a payable is unapproved
  • payable.canceled - Triggered when a payable is canceled
  • payable.paid - Triggered when a payable is paid

Transfer Events

  • transfer.created - Triggered when a transfer to or from an account is created
  • transfer.updated - Triggered when the status of a transfer in an account changes

There's no dedicated "funds arrived" or "funding invoice paid" webhook yet. The closest are transfer.created and transfer.updated, which fire whenever money moves into or out of a workspace wallet, including incoming deposits. When you get one, call Get Workspace Wallet to read the new balance and available_balance, or Get Single Funding to check a funding invoice's status.

Partner Events

  • partner-invite.claimed - Triggered when an invitation for a vendor is claimed. data has the invite id, payee_lumanu_id and payee_email.
  • partner.created - Triggered when a vendor becomes a partner without an invite, for example when you invite an email that already belongs to a Lumanu workspace. data has the partner id and partner_workspace_id.

Did this page help you?