Skip to main content
Webhooks let your application receive real-time notifications when events happen in Rntor. Instead of polling for changes, Rntor pushes data to your endpoint automatically.

How Webhooks Work

  1. An event occurs in Rntor (booking created, customer updated, etc.)
  2. Rntor queues the event in the webhook outbox
  3. Svix delivers the payload to your endpoint
  4. Your app processes the event and responds with 200 OK

Delivery Infrastructure

Rntor uses Svix for reliable webhook delivery, providing:
  • Automatic retries with exponential backoff
  • Signature verification for security
  • Delivery logs for debugging
  • Endpoint management through a self-service portal

Setting Up Webhooks

1. Access the Webhook Portal

Navigate to Settings → Developers → Webhooks in your Rntor dashboard. The Svix App Portal will load.

2. Add an Endpoint

Click Add Endpoint and configure:
FieldDescription
URLYour HTTPS endpoint URL
DescriptionOptional description for this endpoint
Event TypesWhich events to receive (or all)
Webhook endpoints must use HTTPS. HTTP endpoints are not supported for security reasons.

3. Select Events

Choose which events to subscribe to:
☑ booking.created
☑ booking.cancelled
☐ booking.updated
☐ booking.confirmed
☑ customer.created
...
Start with a few key events and add more as your integration grows. See all available events at webhooks.rntor.com.

Receiving Webhooks

Your endpoint receives POST requests with:

Headers

HeaderDescription
Content-Typeapplication/json
svix-idUnique message ID
svix-timestampUnix timestamp of the delivery attempt
svix-signatureSignature for verification

Body

{
  "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "resource_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "customer_id": "11111111-2222-3333-4444-555555555555",
  "status": "confirmed",
  "start_time": "2024-01-15T14:00:00Z",
  "end_time": "2024-01-15T15:00:00Z",
  "_meta": {
    "event_id": "msg_1234567890",
    "event_type": "booking.created",
    "merchant_id": "22222222-3333-4444-5555-666666666666",
    "timestamp": "2024-01-15T10:30:00.000Z"
  }
}

Responding to Webhooks

Your endpoint should:
  1. Verify the signature (see Security)
  2. Process the event (update your database, trigger workflows)
  3. Respond with 200-299 status code
Example Handler
app.post('/webhooks/rntor', (req, res) => {
  // Verify signature (see Security page)
  if (!verifySignature(req)) {
    return res.status(401).send('Invalid signature');
  }
  
  const { _meta, ...payload } = req.body;
  
  switch (_meta.event_type) {
    case 'booking.created':
      handleNewBooking(payload);
      break;
    case 'customer.updated':
      updateCustomerRecord(payload);
      break;
  }
  
  res.status(200).send('OK');
});
Respond within 30 seconds or the request will timeout and be retried.

Retry Policy

Failed deliveries are retried with exponential backoff:
AttemptDelay
1st retry5 seconds
2nd retry5 minutes
3rd retry30 minutes
4th retry2 hours
5th retry8 hours
6th retry1 day
After all retries are exhausted, the event is marked as failed. You can manually retry from the Svix portal.

Testing Webhooks

Local Development

Use a tunneling service to expose your local server:
ngrok
ngrok http 3000
# Creates: https://abc123.ngrok.io → http://localhost:3000
Add the ngrok URL as an endpoint in the webhook portal.

Test Events

The Svix portal allows you to send test events:
  1. Go to your endpoint in the portal
  2. Click Send Test Event
  3. Select an event type
  4. Click Send

View Delivery Logs

Debug failed deliveries by viewing logs in the Svix portal:
  • Delivery timestamp
  • Response status code
  • Response body
  • Retry attempts

Best Practices

Queue webhook events for background processing. Return 200 OK immediately, then process the event asynchronously to avoid timeouts.
Webhooks may be delivered multiple times. Use the event_id in _meta to deduplicate events you’ve already processed.
Set up alerts for failed webhook deliveries. Check the Svix portal regularly for delivery issues.
Don’t trust webhook data blindly. Validate that referenced entities (bookings, customers) exist before processing.

Next Steps