using System.Collections.Generic;
using System.Security.Cryptography;
using System.Threading.Tasks;
namespace VerdusWebhookSamples
public static void Main(string[] args)
string json = "{ \"id\": \"100ff793-5db0-4769-8843-2f8459cdf77e\", \"event\": \"TransactionsLoadedRecent\", \"createdDate\": \"2019-01-11T13:44:38.9402727+00:00\", \"data\": { \"partyId\": 821253, \"ownedItemIds\": [584921] } }";
string hash = GetHash(json, "secret");
private static string GetHash(string message, string secret)
var encoding = new ASCIIEncoding();
byte[] keyByte = encoding.GetBytes(secret);
byte[] messageBytes = encoding.GetBytes(message);
using (var hmacsha256 = new HMACSHA256(keyByte))
byte[] hashmessage = hmacsha256.ComputeHash(messageBytes);
return Convert.ToBase64String(hashmessage);