Testing
Local Development and Testing
For local development, you can use Ngrok to create a secure tunnel to your local environment:
Download Ngrok from the official website for your operating system
Extract and navigate to the Ngrok directory in your terminal
Run the command:
./ngrok http PORT_NUMBERReplace PORT_NUMBER with your local server port (e.g., 8080 for default Spring Boot applications)
Copy the generated Ngrok URL to use as your webhook endpoint
Security: Signature Verification
Every webhook request includes an X-RR-Signature header to verify authenticity. This signature is generated using the endpoint's secret key and the payload.
Verification Process
The signature is provided as a hexadecimal string in the
X-RR-SignatureheaderGenerate your own signature using the received payload and your secret key
Compare the generated signature with the received signature
If they match, the payload is verified as coming from Rocket Referral
Implementation Examples
Java Implementation
JavaScript Implementation
Last updated