From 67f40c3df067883cc036450320aeeccda6afc685 Mon Sep 17 00:00:00 2001 From: Sijo Sam <40496300+mrSamDev@users.noreply.github.com> Date: Wed, 12 Aug 2026 23:11:10 +0530 Subject: [PATCH 1/2] docs: fix broken Banking webhook HMAC example in README validateBankingHMAC(hmacKey, hmacSign, ...) treats the first argument as the signature and the second as the key, so the README example passing (KEY, SIGNATURE) always returned false. Point the example at the non-deprecated validateHMACSignature(hmacKey, hmacSignature, data) instead. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 39bf25415..ef89b5aa9 100644 --- a/README.md +++ b/README.md @@ -337,7 +337,7 @@ if ("accountHolderCode" in genericWebhook) { ``` Verify the authenticity (where you retrieve the hmac key from the CA and the signature from the webhook header); ``` typescript -const isValid = hmacValidator.validateBankingHMAC("YOUR_HMAC_KEY", "YOUR_HMAC_SIGNATURE", jsonString) +const isValid = hmacValidator.validateHMACSignature("YOUR_HMAC_KEY", "YOUR_HMAC_SIGNATURE", jsonString) ``` ### Management Webhooks Management webhooks are also parsed with the same approach, using `ManagementWebhooksHandler`: From 394ede6935db4ec16abf810442332bbd508aa2dc Mon Sep 17 00:00:00 2001 From: Sijo Sam <40496300+mrSamDev@users.noreply.github.com> Date: Wed, 12 Aug 2026 23:13:52 +0530 Subject: [PATCH 2/2] docs: fix Banking webhook HMAC example in README validateBankingHMAC(hmacKey, hmacSign, ...) treats the first argument as the signature and the second as the key, so the README example passing (KEY, SIGNATURE) always returned false. Point the example at the non-deprecated validateHMACSignature(hmacKey, hmacSignature, data) and instantiate the validator, since the package exports the class. --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ef89b5aa9..5b7adbbcf 100644 --- a/README.md +++ b/README.md @@ -337,7 +337,10 @@ if ("accountHolderCode" in genericWebhook) { ``` Verify the authenticity (where you retrieve the hmac key from the CA and the signature from the webhook header); ``` typescript -const isValid = hmacValidator.validateHMACSignature("YOUR_HMAC_KEY", "YOUR_HMAC_SIGNATURE", jsonString) +import { hmacValidator } from "@adyen/api-library"; + +const validator = new hmacValidator(); +const isValid = validator.validateHMACSignature("YOUR_HMAC_KEY", "YOUR_HMAC_SIGNATURE", jsonString); ``` ### Management Webhooks Management webhooks are also parsed with the same approach, using `ManagementWebhooksHandler`: