Skip to content
Last updated

Webhooks

Overview

Webhooks send you a notification when something happens in your account. When an event happens, we send an HTTPS POST request with the event data to the URL you registered.

Subscribing

Create a webhook with POST /v1/webhooks. Send the url of your endpoint (HTTPS only, up to 2000 characters), a label for your own reference, and the scope of events you want:

ScopeEvents
merchantEvery merchant.* event.
chargeCharge events. Payments are in progress.
payoutsAccepted, but no events are sent yet.

The response lists the events the webhook receives and its signing secret. Store the secret on your server: you need it to verify deliveries.

Event Types

Merchant Events

EventSent when
merchant.createdA merchant is created.
merchant.processingThe create request has finished setting up the merchant, right after merchant.created.
merchant.updatedThe merchant changes: its review status moves, its trading name is updated, or it is reactivated. Moving to READY_TO_SIGN, COMPLETED or KYC_IN_PROGRESS sends no event.
merchant.kyc_approvedThe application is approved. Carries payment_onboarding_status.
merchant.verification_failedThe application is declined or onboarding fails. lead_onboarding_status is FAILED.
merchant.payments_onboardedThe merchant is set up to take payments.
merchant.payments_onboarding_failedSetting up payments failed. payment_onboarding_status is FAILED.
merchant.verification_approvedSent together with merchant.payments_onboarded. Kept for older integrations; new ones should use merchant.kyc_approved and merchant.payments_onboarded.
merchant.deactivatedThe merchant is deactivated. deactivated is true.

A typical approval sends merchant.kyc_approved first, then merchant.payments_onboarded (with merchant.verification_approved) once payments are set up, or merchant.payments_onboarding_failed if that step fails.

Charge Events

Payments are in progress. Charge events will be documented here together with the payments API.

Webhook Payload Structure

Every event uses the same envelope. This example shows a shortened merchant payload:

{
  "id": "evt_01k8x2v9j3m4n5p6q7r8s9t0vw",
  "created_at": 1768473000000,
  "event_type": "merchant.kyc_approved",
  "api_version": "2026-08-11",
  "data": {
    "object": "merchant",
    "payload": {
      "id": "merchant_2x4y6z8a0b1c2d3e4f5g6h7j8k",
      "lead_onboarding_status": "APPROVED",
      "payment_onboarding_status": "NOT_STARTED"
    }
  }
}

Envelope Fields

  • id: Unique ID of the event. Use it to detect duplicates.
  • created_at: When the event was created, in milliseconds since the Unix epoch.
  • event_type: The event type (see Event Types).
  • api_version: Version of the payload format.
  • data.object: Type of object the event is about, such as merchant.
  • data.payload: The event data, described below.

Merchant Payload

data.payload is a snapshot of the merchant with the same field names as the merchant response: id, email, phone, lead_id, doing_business_as, legal_business_name, dba_address, lead_onboarding_status, deactivated, automatic_payouts, campaign, timezone, created_at, branding, defaults, receipt_settings, default_capabilities, device, hardware_offerings and hardware_selection.

It never includes the application itself, so bank details, tax IDs and SSNs are not sent. Some events add fields:

EventExtra fields
merchant.kyc_approvedpayment_onboarding_status
merchant.payments_onboardedpayment_onboarding_status (ONBOARDED)
merchant.payments_onboarding_failedpayment_onboarding_status (FAILED)
merchant.verification_approvedNo additional fields

The public API and merchant webhooks do not return payment gateway credentials.

Security

Webhook Signatures

Each delivery carries two headers:

  • X-Talus-Webhook-Timestamp: When the delivery was sent, in milliseconds since the Unix epoch.
  • X-Talus-Webhook-Signature: sha256=<digest>, where <digest> is the hex HMAC-SHA256 of <timestamp>.<raw request body>, keyed with your webhook's secret.

Verification Process:

  1. Read the raw request body before parsing it as JSON. Re-serializing parsed JSON can change the bytes and break the signature.
  2. Compute HMAC-SHA256 of <X-Talus-Webhook-Timestamp>.<raw body> with your webhook secret.
  3. Compare it with the digest in X-Talus-Webhook-Signature using a constant-time comparison.
  4. Reject deliveries whose timestamp is too old, for example more than 5 minutes, to block replays.

Example Verification (Node.js)

const crypto = require("crypto");

const MAX_AGE_MS = 5 * 60 * 1000;

function verifyWebhookSignature(rawBody, headers, secret) {
  const timestamp = headers["x-talus-webhook-timestamp"];
  const signature = headers["x-talus-webhook-signature"] ?? "";
  const sentAt = Number(timestamp);
  if (!timestamp || !Number.isFinite(sentAt) || Math.abs(Date.now() - sentAt) > MAX_AGE_MS) {
    return false;
  }

  const expected =
    "sha256=" +
    crypto
      .createHmac("sha256", secret)
      .update(`${timestamp}.${rawBody}`, "utf8")
      .digest("hex");

  const a = Buffer.from(expected);
  const b = Buffer.from(signature);
  return a.length === b.length && crypto.timingSafeEqual(a, b);
}

With Express, read the raw body with express.raw({ type: "application/json" }) and pass req.body.toString("utf8").

Delivery

  • Success: Respond with a 2xx status. Any other status counts as a failed delivery.
  • Timeout: A delivery fails if your endpoint does not respond within 8 seconds.
  • Redirects: Redirects are not followed. Register the final URL.
  • Retries: Failed deliveries are not retried automatically.

Testing

POST /v1/events/test sends any merchant event to your webhooks without changing the merchant. Test deliveries have event IDs starting with evt_00000000000000, so you can tell them apart from live events.

POST /v1/events/trigger approves, declines or deactivates a merchant and sends the matching event, so you can run your integration end to end in sandbox. See Testing.

Best Practices

  1. Idempotency: Handle duplicate events using the event id.
  2. Respond quickly: Persist the event for processing, then return a 2xx status within 8 seconds. Do slow work afterwards.
  3. Verify signatures: Check the signature and timestamp of every delivery.
  4. Protect secrets: Keep your account secret key and webhook signing secret on your server.
  5. Use HTTPS: Webhook URLs must use HTTPS.
  6. Recover missed updates: Refresh the merchant from the API when the merchant returns or a delivery is missed. Failed deliveries aren't retried. See status screen flows.