var body = JsonSerializer.Serialize(webhookEvent.EventData, new() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase }); var secretBytes = Encoding.UTF8.GetBytes(secret); using var hasher = new HMACSHA256(secretBytes); var data = Encoding.UTF8.GetBytes(body); var signatureBytes = hasher.ComputeHash(data); return Convert.ToBase64String(signatureBytes);