callbackUrl
field.
event
: the name of the eventdata
: event data specific to the event being sent2xx
, else it will be considered as failed. Failed webhooks are retried with constant backoff for a maximum of 3 times with a delay of 1 minute.
Request-Signature
and Request-Timestamp
in the webhook request header.
This is similar to the API signing request, but in reverse. You MUST validate the signature to ensure it’s originating from Paycashless.
Webhook signature is signed using HMAC SHA-512 with your API secret as the signing key. Request-Signature
and Request-Timestamp
will be provided in the webhook request header for you to reconstruct the message for verification.
To verify the signature follow the process below:
Step | Action | Description |
---|---|---|
1 | Hash | Take the event data object, stringify the object and hash it with HMAC SHA-512 algorithm using your API secret as the signing key (output should be hex-encoded). |
2 | Concatenate | Concatenate your full callback url exactly as you provided it, hashed event data , and Request-Timestamp from the header. There are no spaces or other characters between these values. The order of the fields must follow the order stipulated here. |
3 | Sign | Take the string from the Concatenate step and generate a HMAC SHA-512 signature using your API secret as the signing key. |
4 | Encode | Take the output of the Sign step and hex-encode it. |
5 | Verify | Compare the recreated signature with the content of Request-Signature header. |
Request-Signature
header.
Field | Description |
---|---|
Callback URL | Lowercased full URL as provided with the base url and search parameters (e.g. https://yourwebsite.com/callback/paycashless?notify=all ). |
Hashed Body | The event data object, stringified and hashed using HMAC SHA-512 algorithm. |
Timestamp | The value gotten from Request-Timestamp header. |