Testing
Last updated
Last updated
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_NUMBER
Replace 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
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.
The signature is provided as a hexadecimal string in the X-RR-Signature
header
Generate 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
Java Implementation
JavaScript Implementation