SmarterDividends
Included in Business API ($99/mo or $999/yr)

Real-Time HMAC-SHA256 Webhooks

Receive instant signed HTTPS POST deliveries across 6 dividend and fixed-income event types. Included all-inclusive in Business API (up to 5 active endpoints with delivery logs and 1-click test events).

Supported Webhook Event Types (6)

EventTriggerKey Payload Fields
dividend.cutConfirmed regular dividend cut or suspensionsymbol, previous_amount, amount, pct_change, ex_date, safety_grade
dividend.raiseConfirmed regular dividend increasesymbol, previous_amount, amount, pct_change, ex_date, growth_streak_years
dividend.specialDeclared one-time special dividend payoutsymbol, amount, ex_date, pay_date
dividend.ex_dateConfirmed dividend going ex-dividend tomorrowsymbol, amount, ex_date, last_day_to_buy, pay_date, forward_yield
safety.downgradeFull letter-grade dividend safety downgrade (e.g. B -> C)symbol, previous_grade, grade, previous_score, score, score_delta
fixed_income.redemption_noticeSEC Form 8-K or N-23C-2 preferred / baby bond call noticesymbol, income_type, call_price, market_price, announced_date, redemption_date, source_url

Verifying X-SmarterDividends-Signature

Every webhook POST includes three headers: X-SmarterDividends-Event (event name), X-SmarterDividends-Delivery (unique idempotency UUID), and X-SmarterDividends-Signature formatted as t=<unix_timestamp>,v1=<hmac_sha256_hex>.

Compute an HMAC-SHA256 hex digest over the literal string `${t}.${rawBody}` using your endpoint's whsec_... signing secret (shown once when you create the endpoint at /account#webhooks) and compare with a constant-time equality check. Reject timestamps older than 5 minutes to prevent replay attacks.

import crypto from "node:crypto";

export function verifySmarterDividendsWebhook(
  rawBody: string,
  signatureHeader: string,
  secret: string
): boolean {
  const parts = Object.fromEntries(
    signatureHeader.split(",").map((kv) => kv.split("="))
  );
  if (!parts.t || !parts.v1) return false;

  // Reject stale deliveries (> 5 minutes)
  if (Math.abs(Date.now() / 1000 - Number(parts.t)) > 300) return false;

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

  const sig = Buffer.from(parts.v1, "hex");
  const exp = Buffer.from(expected, "hex");
  return sig.length === exp.length && crypto.timingSafeEqual(sig, exp);
}

Delivery Guarantees & Auto-Pause

Return any 2xx HTTP status within 10 seconds to acknowledge delivery. Store X-SmarterDividends-Delivery to deduplicate safely. Endpoints automatically pause after 10 consecutive failed deliveries and can be resumed or tested anytime from /account#webhooks.