Trellia Wealth Partners

Developers · Standard Webhooks

Signed, reliable event delivery.

Every webhook is signed with HMAC-SHA256 following the Standard Webhooks specification (Webhook-Id, Webhook-Timestamp, Webhook-Signature), delivered asynchronously with exponential backoff, zero-downtime secret rotation, and 1-click replay in the Developer Console.

Event catalog.

Subscribe to individual events per Sandbox or Production endpoint.

EventDescription
grant.createdAn adviser authorized your application via OAuth 2.1.
grant.revokedAn adviser disconnected your app, changed credentials, or Trellia revoked access. Immediately purge cached tokens.
portfolio.holdings.updatedNew holdings snapshot published for an entitled managed account portfolio.
portfolio.performance.updatedUpdated monthly/daily performance aggregations published.
portfolio.fees.updatedUpdated RG97 portfolio fee schedule published.
portfolio.update.publishedNew adviser-facing portfolio commentary/update published.
watchlist.item.addedInvestment added to an adviser's personal watchlist.
watchlist.item.removedInvestment removed from an adviser's personal watchlist.

TypeScript / Node.js verification.

Verify signatures over the raw UTF-8 request body before parsing JSON.

import { createHmac, timingSafeEqual } from "node:crypto";

export function verifyTrelliaWebhook(
  rawBody: string,
  headers: { id: string; timestamp: string; signature: string },
  secret: string, // "whsec_..."
): boolean {
  // conventions-ignore raw-duration: standalone partner documentation snippet
  const ageSec = Math.abs(Math.floor(Date.now() / 1000) - Number(headers.timestamp));
  if (!Number.isFinite(ageSec) || ageSec > 300) return false; // 5-min replay guard

  const key = Buffer.from(secret.replace(/^whsec_/, ""), "base64");
  const expected = createHmac("sha256", key)
    .update(headers.id + "." + headers.timestamp + "." + rawBody, "utf8")
    .digest("base64");

  return headers.signature.split(" ").some((part) => {
    const [version, sig] = part.split(",");
    if (version !== "v1" || !sig) return false;
    const a = Buffer.from(sig, "utf8");
    const b = Buffer.from(expected, "utf8");
    return a.length === b.length && timingSafeEqual(a, b);
  });
}

C# / .NET verification.

Drop-in constant-time verifier for Australian advice software stacks on .NET.

using System.Security.Cryptography;
using System.Text;

public static bool VerifyTrelliaWebhook(
    string rawBody, string msgId, string timestamp, string signatureHeader, string secret)
{
    if (!long.TryParse(timestamp, out var ts)) return false;
    if (Math.Abs(DateTimeOffset.UtcNow.ToUnixTimeSeconds() - ts) > 300) return false;

    var key = Convert.FromBase64String(secret.StartsWith("whsec_") ? secret[6..] : secret);
    using var hmac = new HMACSHA256(key);
    var expected = Convert.ToBase64String(
        hmac.ComputeHash(Encoding.UTF8.GetBytes($"{msgId}.{timestamp}.{rawBody}")));

    foreach (var part in signatureHeader.Split(' ', StringSplitOptions.RemoveEmptyEntries))
    {
        var kv = part.Split(',', 2);
        if (kv.Length == 2 && kv[0] == "v1" &&
            CryptographicOperations.FixedTimeEquals(
                Encoding.UTF8.GetBytes(kv[1]), Encoding.UTF8.GetBytes(expected)))
            return true;
    }
    return false;
}

Python verification.

Standard library only, zero third-party dependencies.

import base64, hashlib, hmac, time

def verify_trellia_webhook(raw_body: str, msg_id: str, timestamp: str, sig_header: str, secret: str) -> bool:
    if abs(int(time.time()) - int(timestamp)) > 300:
        return False
    key = base64.b64decode(secret.removeprefix("whsec_"))
    expected = base64.b64encode(
        hmac.new(key, f"{msg_id}.{timestamp}.{raw_body}".encode(), hashlib.sha256).digest()
    ).decode()
    for part in sig_header.split():
        if part.startswith("v1,") and hmac.compare_digest(part[3:], expected):
            return True
    return False
Partner with Trellia

Test signed webhooks
in Sandbox today.

Contact us to connect your platform to Trellia.

Trellia Wealth Partners. Invested in adviser success.

For Australian financial advisers. Portal access is subject to approval. Tools and resources support your professional judgement; they do not replace it. Product previews are illustrative. Access to features and content depends on your account permissions.

Appearance