The section describes how the RSA signature sent in the callback header or redirect query data can be verified. For verification to succeed, the public key is required.
Download the Public Key File
Download the public key file by clicking the link below and store it somewhere on your server
Public key for production webhook signature verification
Next Steps
Below is the sample callback data for this demonstration (sample redirect data is available here);
Obtain the value of the rsa-signature header (if callback) OR the value of the rsa_signature query parameter (if redirect).
Form the string payload to be used in signature verification. This is obtained by concatenating values of the callback/redirect data in the format; event:merchant_reference:internal_reference:transaction_type:transaction_status and these values are obtained from the callback/redirect data. The string payload would therefore be transaction.failed:MCTREFYDPE9LMZ34S8HM:GOVBILGHQ6ZDXFK7C7NJ:COLLECTION:FAILED
Use the public key obtained above to verify the signature as described in the sample source codes below;
Below is an example of a generated RSA signature on the sandbox environment