---
updatedAt: 2026-05-27T08:47:49.000Z
agentTools:
  projectIndex: https://docs.tatum.io/llms.txt
---

# Enable HMAC webhook digest

> This endpoint is compatible with our deprecated v3 Notifications product. To use it with v3, simply replace 'v4' with 'v3' in the request URL.

<p style="display: none">/v4/subscription</p>
<p>Enable HMAC hash ID on the fired webhooks from Tatum API.
In order to make sure that a webhook is sent by us, we have the possibility to sign it with the HMAC Sha512 Hex algorithm.<br/>
To verify that a webhook is sent by us
<ol>
<li>Get a webhook <b>x-payload-hash</b> header value and payload as it is as a JSON file.</li>
<li>Convert the HTTP webhook body to stringify JSON without any spaces. In JavaScript, you would do it like this <pre>JSON.stringify(req.body)</pre></li>
<li>Perform calculations on your side to create a digest using Secret Key, webhook payload in bytes and HMAC SHA512 algorithm. JavaScript example:
<pre>require('crypto').createHmac('sha512', hmacSecret).update(JSON.stringify(req.body)).digest('base64')</pre>.</li>
<li>Compare x-payload-hash header value with calculated digest as a Base64 string.</li></p>


# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "security": [
    {
      "X-API-Key": []
    }
  ],
  "info": {
    "title": "Blockchain Notifications",
    "version": "3.7.3"
  },
  "servers": [
    {
      "url": "https://api.tatum.io"
    }
  ],
  "paths": {
    "/v4/subscription": {
      "put": {
        "deprecated": false,
        "description": "> This endpoint is compatible with our deprecated v3 Notifications product. To use it with v3, simply replace 'v4' with 'v3' in the request URL.\n\n<p style=\"display: none\">/v4/subscription</p>\n<p>Enable HMAC hash ID on the fired webhooks from Tatum API.\nIn order to make sure that a webhook is sent by us, we have the possibility to sign it with the HMAC Sha512 Hex algorithm.<br/>\nTo verify that a webhook is sent by us\n<ol>\n<li>Get a webhook <b>x-payload-hash</b> header value and payload as it is as a JSON file.</li>\n<li>Convert the HTTP webhook body to stringify JSON without any spaces. In JavaScript, you would do it like this <pre>JSON.stringify(req.body)</pre></li>\n<li>Perform calculations on your side to create a digest using Secret Key, webhook payload in bytes and HMAC SHA512 algorithm. JavaScript example:\n<pre>require('crypto').createHmac('sha512', hmacSecret).update(JSON.stringify(req.body)).digest('base64')</pre>.</li>\n<li>Compare x-payload-hash header value with calculated digest as a Base64 string.</li></p>\n",
        "operationId": "enableWebHookHmac",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HmacWebHook"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "security": [
          {
            "X-API-Key": []
          }
        ],
        "x-codeSamples": [],
        "summary": "Enable HMAC webhook digest",
        "tags": [
          "Notifications"
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "X-API-Key": {
        "type": "apiKey",
        "name": "x-api-key",
        "in": "header",
        "description": "Your **API key** is used to identify your account & your plan, including the number of API calls per second and total monthly calls you have.\n\nEach key is for individual use only.\n\nIf you don't have a key already you can [Sign up for a Free Tatum account](https://co.tatum.io/signup) to get two keys (testnet and mainnet), allowing up to 5 API calls per second and 1,000,000 Credits.\n\nFor testing purposes, you can use the following key which only works inside docs and has limited functionality (e.g. you cannot create virtual accounts or notification subscriptions with it):\n* t-66a730ccccfd17001c479705-2f597d14ad7543f289a03418\n\nFor more details on limits and plans, [click here](https://docs.tatum.io/docs/plans-limits).\n"
      }
    },
    "responses": {
      "Error401": {
        "description": "Unauthorized. Not valid or inactive subscription key present in the HTTP Header.",
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "properties": {
                    "errorCode": {
                      "example": "subscription.not.active",
                      "description": "subscription.not.active",
                      "type": "string"
                    },
                    "message": {
                      "example": "Subscription not active anymore.",
                      "description": "Subscription not active anymore.",
                      "type": "string"
                    },
                    "statusCode": {
                      "example": 401,
                      "description": "401",
                      "type": "number"
                    }
                  },
                  "required": [
                    "errorCode",
                    "message",
                    "statusCode"
                  ],
                  "type": "object"
                },
                {
                  "properties": {
                    "errorCode": {
                      "example": "subscription.invalid",
                      "description": "subscription.invalid",
                      "type": "string"
                    },
                    "message": {
                      "example": "Unable to find valid subscription for '${apiKey}'",
                      "description": "Unable to find valid subscription for '${apiKey}'",
                      "type": "string"
                    },
                    "statusCode": {
                      "example": 401,
                      "description": "401",
                      "type": "number"
                    }
                  },
                  "required": [
                    "errorCode",
                    "message",
                    "statusCode"
                  ],
                  "type": "object"
                }
              ]
            }
          }
        }
      },
      "Error500": {
        "description": "Internal server error. There was an error on the server during the processing of the request.",
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "message": {
                  "example": "Internal server error",
                  "description": "Internal server error",
                  "type": "string"
                },
                "statusCode": {
                  "example": 500,
                  "description": "500",
                  "type": "number"
                }
              },
              "required": [
                "statusCode",
                "message"
              ],
              "type": "object"
            }
          }
        }
      }
    },
    "schemas": {
      "HmacWebHook": {
        "properties": {
          "hmacSecret": {
            "description": "Your HMAC secret password, which is used for signing the webhook payload.",
            "example": "1f7f7c0c-3906-4aa1-9dfe-4b67c43918f6",
            "type": "string",
            "maxLength": 100
          }
        },
        "required": [
          "hmacSecret"
        ],
        "type": "object"
      }
    }
  }
}
```