Signature Verification
The section describes how the signature sent in the callback header can be verified. The signature is generated using an RSA Signing. For verification to succeed, the public key is required.
Download the Public Key
Download the EllyPay public key using the following API request and save it on your server.
Store the key on your server under the name ellypay.public.key.pem
or whatever you prefer but maintain the .pem
extension. Once the file has been downloaded, there's no need to call this API endpoint again.
Next Steps
Retrieve the value of the
ellypay-signature
header.Form the string payload to be used in signature verification. This is obtained by concatenating values of the callback data in the format;
id:internal_reference:agent_reference
and these values are obtained from the callback data. As an example, if the following was the callback data;
The string payload would therefore be 24546:ELPREFYRWWM8FKMBH1A5A:CSTREFYRWWVRKLG6W1P3
3. Use the public key obtained above to verify the signature as described in the sample source codes below;
A valid signature (using the production keys) for the above sample callback is shared below. You can copy and use it to test your signature verification workflow.
Last updated