As your endpoint is public, anyone can send it some data. For you to make sure the data is coming from Rhino.fi, you’ll receive a signature in the request header, called X-Rhino-Signature.To verify the signature you have 2 options:
Using the SDK
Manual verification
SDK
To verify the signature received using the SDK, you can do the following:
Under the hood it will fetch the Rhino.fi webhook public key and verify the data provided was signed by Rhino.fi.
Manual verification
Manually verifying the received signature is a two step process.
You first need to fetch Rhino.fi webhook public key and then use it to verify the signature.
This can be done with the following function: