put https://api.tatum.io/v3/subscription
This endpoint is compatible with our v4 Notifications product. To use it with v4, simply replace 'v3' with 'v4' in the request URL.
2 credits per API call.
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.
To verify that a webhook is sent by us
- Get a webhook x-payload-hash header value and payload as it is as a JSON file.
- Convert the HTTP webhook body to stringify JSON without any spaces. In JavaScript, you would do it like this
JSON.stringify(req.body)
- Perform calculations on your side to create a digest using Secret Key, webhook payload in bytes and HMAC SHA512 algorithm. JavaScript example:
require('crypto').createHmac('sha512', hmacSecret).update(JSON.stringify(req.body)).digest('base64')
. - Compare x-payload-hash header value with calculated digest as a Base64 string.