---
updatedAt: 2025-05-22T18:00:05.000Z
agentTools:
  projectIndex: https://neutronpay.readme.io/llms.txt
---

# Webhook Signature Computation

```node Node
const crypto = require("crypto");

// TODO replace with the secret that was supplied when setting the webhook callbacks
const apiSecret = "<api-secret>";
const data = {
	txnId: "41866d80-a46a-4845-a205-5cffc881cad3",
	extRefId: "ordid-abc1234",
	txnState: "expired",
	msg: "", // any system or update messages
	updatedAt: 1676030467492,
};
console.log("--------------------PAYLOAD----------------");
console.log(JSON.stringify(data, null, 2));
const signature = crypto
.createHmac("sha256", apiSecret)
.update(JSON.stringify(data))
.digest("hex");
console.log("\n--------------------SIGNATURE----------------");
```

```json Response Example
{"success":true}
```

# Import package

<!-- node@1-1 -->



# Compute signature

<!-- node@3-18 -->