Webhooks Overview
Receive real-time notifications when events happen in your Renta account.
Coming soon — Webhook registration via the API is under active development. The documentation below describes the planned functionality. Contact support for early access.
Webhooks let your application receive real-time notifications when events occur in Renta — like a new booking, a payment, or a signed waiver.
How It Works
- Register a webhook endpoint — provide a URL that Renta will POST to
- Subscribe to events — choose which events trigger notifications
- Receive events — Renta sends a JSON payload to your URL
- Verify the signature — validate that the request came from Renta using HMAC-SHA256
- Respond with 200 — acknowledge receipt within 30 seconds
Renta ──POST──▶ https://your-app.com/webhooks/renta
├─ Header: renta-signature: t=1234,v1=abc...
└─ Body: { "id": "evt_123", "type": "booking.created", ... }Quick Setup
1. Create a webhook endpoint
import { Renta } from '@renta/sdk';
const renta = new Renta({ apiKey: process.env.RENTA_API_KEY! });
const webhook = await renta.webhooks.create({
url: 'https://your-app.com/webhooks/renta',
events: ['booking.created', 'booking.cancelled', 'payment.received'],
});
// Save this secret — it's only shown once!
console.log(`Signing secret: ${webhook.signing_secret}`);2. Handle incoming events
import { Renta, type WebhookEvent } from '@renta/sdk';
// Express example
app.post('/webhooks/renta', express.raw({ type: 'application/json' }), (req, res) => {
const signature = req.headers['renta-signature'] as string;
let event: WebhookEvent;
try {
event = await Renta.webhooks.verify(
req.body,
signature,
process.env.RENTA_WEBHOOK_SECRET!,
);
} catch {
return res.status(400).send('Invalid signature');
}
switch (event.type) {
case 'booking.created':
await handleNewBooking(event.data);
break;
case 'payment.received':
await handlePayment(event.data);
break;
}
res.json({ received: true });
});Always verify the webhook signature before processing the event. Without verification, anyone could send fake events to your endpoint.
Webhook Payload
Every webhook delivers a JSON body:
{
"id": "evt_abc123",
"type": "booking.created",
"data": {
"id": "bk_def456",
"status": "pending",
"customer_id": "cust_abc",
"pickup_date": "2026-07-01T09:00:00Z",
"return_date": "2026-07-03T17:00:00Z",
"total": 10800
},
"tenant_id": "tenant_xyz",
"created_at": "2026-03-31T12:00:00Z"
}Retry Behavior
If your endpoint returns a non-2xx status or doesn't respond within 30 seconds, Renta retries with exponential backoff:
| Attempt | Delay |
|---|---|
| 1st retry | 1 minute |
| 2nd retry | 5 minutes |
| 3rd retry | 30 minutes |
| 4th retry | 2 hours |
| 5th retry | 24 hours |
After 5 failed retries, the event is marked as failed. Webhook endpoints with consecutive failures may be automatically disabled.