signatureHash field in the JSON body, signing only the orderId combined with paymentRequestId (payments) or refundId (refunds).
V2 signing is recommended for all new integrations. V2 signs the entire request body and uses a dedicated signing secret. See the V2 Webhook Signing guide for setup instructions.
How v1 signature verification works
Payment signature verification
To verify a payment webhook:- Retrieve the
orderIdfrom your server — the one you passed when creating the payment request (notatoaOrderId). - Get the
paymentRequestIdfrom the webhook payload. - Compute
HMAC-SHA256(orderId + "|" + paymentRequestId, atoaSecret). - Compare the result against the
signatureHashfield in the payload.
Refund signature verification
For refund webhooks, the signature usesrefundId instead of paymentRequestId:
paymentRequestId with refundId from the refund webhook payload.
Node.js
Why V2 is recommended
V2 signing improves on V1 in several ways:- Full-body coverage — V2 signs the entire request body, protecting all fields in the payload.
- Dedicated signing secret — V2 uses a separate signing secret rather than your API key, so your credentials stay compartmentalised.
- POS support —
POS_PAYMENT_STATUSwebhooks require V2 signing.
Migration to V2
To migrate from V1 to V2 signing:- Generate a signing secret from the Atoa Dashboard under Settings → Webhooks.
- Update your webhook verification logic to use the
X-Atoa-Signatureheader instead of thesignatureHashbody field. - Once a signing secret is generated, the
signatureHashandsignaturefields are removed from webhook payloads and aneventTypefield is added.
V1 and V2 cannot be used simultaneously for the same merchant. Generating a signing secret switches all your webhook deliveries to V2.