Getting Started
To start receiving webhooks from Rove, you’ll need to configure a webhook endpoint in your Rove partner settings.- Provide Your Endpoint URL: This is the HTTP/HTTPS URL on your server where Rove will send POST requests for event notifications.
- Select Event Types: Choose the specific events you want to be notified about (e.g.,
transfer-in.success,transfer-in.failed). - Set Up Your Webhook Secret: You can configure your webhook subscription and put your own
shared_secretin the Rove admin dashboard. This secret is crucial for verifying that incoming webhooks are genuinely from Rove and have not been tampered with. Keep this secret confidential.
Currently, the setup of webhook subscriptions (URL, event names, and secret) is managed through your Rove Developer Admin Panel interface.
Available Events
Rove currently supports the following webhook events:| Event Name | Description |
|---|---|
transfer-in.success | Fired when an inbound transfer has successfully completed. |
transfer-in.failed | Fired when an inbound transfer has failed. |
Payload Structure
When an event you’ve subscribed to occurs, Rove will send an HTTP POST request to your configured endpoint URL. The request body will be a JSON object with the following structure:event_name: (String) The name of the event that triggered the webhook (e.g., transfer-in.success).
payload: (Object) An object containing detailed information about the event.
Example: TransferInPayload
For transfer-in.success and transfer-in.failed events, the nested payload object will have the following structure:
Verifying Signatures (Security)
To ensure the integrity and authenticity of the webhooks you receive, Rove includes a signature in the x-signature HTTP header of each request. This signature is an HMAC-SHA256 hash of the raw request body, generated using your unique payload_secret. You must verify this signature on your end before processing the webhook. Steps to Verify the Signature:- Extract the Signature: Get the value of the x-signature header from the incoming request.
- Create an HMAC-SHA256 hash using your payload_secret as the key and the raw request body string as the message.
- Encode the resulting hash in Base64.
- Compare Signatures: Compare the signature you calculated with the signature received in the x-signature header. They must be identical.
Example: Verifying Signature in Node.js
Here’s how you might verify the signature on your server if you’re using Node.js:Example usage within an Express.js route:
Make sure to use a body parser that preserves the raw body,or access the raw body before it’s parsed.
Responding to Webhooks
Your endpoint should respond to webhook requests promptly. Acknowledge with 2xx: Return a 200 OK (or any 2xx) HTTP status code as quickly as possible to indicate successful receipt. Rove considers any other status code (or a timeout) as a delivery failure.Error Handling & Retries
Rove’s webhook system logs the outcome of each delivery attempt, including the response status code and body received from your endpoint.- Delivery Failures: If Rove does not receive a 2xx response from your endpoint (e.g., due to network errors, your server returning a 4xx or 5xx error, or a timeout), the delivery will be marked as failed in our logs.