Webhooks
An automation's Webhook action posts the booking as JSON to an address you choose: a Zapier or Make catch hook, your own script, a door-lock or cleaning service. It runs on the same triggers as any automation: booking made, confirmed, paid in full or cancelled, a moment around the stay, or a balance falling due.
These are outgoing webhooks from your automations. The webhooks Stripe and PayPal send to your site are covered in Stripe and PayPal.
Setting it up
- Open Configure > Automations and click New automation.
- Under When, choose the Trigger and Offset. Under Only for bookings that, add any filters.
- Under Then, add a Webhook action:
| Field | Value |
|---|---|
| URL | The address that receives the booking. Public http or https only, on the standard ports. Redirects are not followed, so enter the final address |
| Signing secret | Optional, at least 16 characters. With it, each request carries an X-NSC-Signature header the receiver can check |
- Save, then use Test on a booking to see whether the automation matches and when it would fire. Nothing is sent by Test.
Webhooks go out through the outbox, sent by the Send queued emails task every 5 minutes.
Zapier and Make
In Zapier, start a Zap with a webhook trigger that catches a hook; in Make, start a scenario with a custom webhook. Paste the address they give you into URL. The booking's fields then arrive as the JSON below.
The request
A POST with Content-Type: application/json and these headers:
| Header | Value |
|---|---|
User-Agent |
NextSelfCatering-Webhook/1.0 |
X-NSC-Event |
automation:<automation id>:<action number> |
X-NSC-Timestamp |
The time of sending, in Unix seconds |
X-NSC-Signature |
sha256= and the hex HMAC-SHA256 of <timestamp>.<body> with your signing secret. Only sent when a secret is set |
The body
{
"event": "before_arrival",
"automation": { "id": 7, "title": "Door code a day before" },
"anchor": "...",
"sent_at": "2026-11-18T09:15:00Z",
"booking": {
"id": 412,
"reference": "NSC-000412",
"status": "confirmed",
"source": "website",
"property_id": 3,
"property": "Hilltop Cottage",
"arrival": "2026-11-21",
"departure": "2026-11-28",
"nights": 7,
"adults": 2,
"children": 1,
"infants": 0,
"pets": 1,
"guest_name": "Anna Example",
"guest_email": "[email protected]",
"guest_phone": "+447700900123",
"language": "en-GB",
"currency": "GBP",
"total_amount": 98500,
"paid_amount": 29550,
"created": "2026-09-02 14:03:11"
}
}
eventis the trigger:booked,confirmed,fully_paid,cancelled,before_arrival,arrival_day,after_arrival,before_departure,after_departure,balance_dueorbalance_overdue.anchoridentifies the moment of the booking the run belongs to; one run per booking and moment.- Amounts are in minor units:
98500is 985.00 GBP.
The payload holds the guest's name, email and phone. Send it only to services covered by your privacy notice and, where GDPR applies, by a data processing agreement.
Checking the signature
Recompute the HMAC over the timestamp header, a dot and the raw body, compare in constant time, and refuse old timestamps so a captured request cannot be replayed. In PHP:
$body = file_get_contents('php://input');
$timestamp = $_SERVER['HTTP_X_NSC_TIMESTAMP'] ?? '';
$expected = 'sha256=' . hash_hmac('sha256', $timestamp . '.' . $body, 'your signing secret');
if (!hash_equals($expected, $_SERVER['HTTP_X_NSC_SIGNATURE'] ?? '') || abs(time() - (int) $timestamp) > 300) {
http_response_code(401);
exit;
}
Answers and retries
| Your endpoint answers | What happens |
|---|---|
| 2xx | Sent |
| 3xx | Failed for good: redirects are not followed, use the final address |
| 4xx (except 408 and 429) | Failed for good |
| 408, 429, 5xx, a timeout (5 seconds) or no connection | Tried again after 1 minute, 5 minutes, 30 minutes, 2 hours and 12 hours, up to 6 attempts |
The automation's Run log shows each run as Sent, Skipped or Failed.
Safety
The address must be on the public internet. An address that is, or resolves to, a private or local network address is refused, and the connection goes to the address that was checked, so a webhook can never be used to reach your server's own network.
Your server must be allowed to make outgoing HTTPS connections to your webhook addresses. See Firewall and outgoing connections.
Troubleshooting
| Symptom | Cause and fix |
|---|---|
| Nothing arrives | Joomla's scheduled tasks are not running, so the Send queued emails task does not send the outbox. Check the automation's Run log |
| The run shows Failed after a 3xx | Redirects are not followed. Enter the final address, for example with https:// and the trailing path the receiver expects |
| The receiver refuses the signature | Check the HMAC is computed over the raw body exactly as received, with the same signing secret |