Webhooks and APIWebhooks

Webhooks

Send booking, enquiry, and payment updates from your tour website straight to tools like Pabbly, Zapier, or Slack - automatically, the moment they happen.

A webhook is an automatic message your website sends to another app the moment something happens on your booking system. Instead of checking your site for new bookings, your other tools find out on their own.

Say a traveler books your 3-day Annapurna trek. Your site can instantly send a message to Slack so your guides know right away. Or it can send the booking details to your CRM so you can follow up without typing anything in by hand. That is what a webhook does.

You pick which events trigger a message, and where each message goes. The rest is automatic.

Before you set up a webhook, check the Overview & Prerequisites page. It lists what needs to be in place first, including the plugin versions you need and the web address (URL) for the tool you want to send data to.

Setting up your first webhook

You will walk through setting up a webhook using Pabbly Connect. Pabbly is an automation tool that connects your website to hundreds of other apps. The steps are similar if you use Zapier or Make instead.

What you'll need before you start: The Webhooks & API add-on installed and active, plus a free or paid Pabbly Connect account. You will also need the web address (URL) that Pabbly gives you for receiving data.

Open the Webhooks & API settings

This is where you tell your website which events to send and where to send them.

In the left sidebar of your WordPress dashboard, find WP Travel Engine, then click Settings, then Webhooks & API. Depending on your version, you might also find it under Bookings, then Settings, then Webhooks & API.

Add a new webhook

Click Add New Webhook near the top of the page. This opens a form where you enter the details for your webhook.

Fill in the webhook details

Give your webhook a name so you can tell it apart later. Then paste the web address from Pabbly into the Endpoint URL field. Finally, check the events you want to trigger this webhook.

Enter:

  • Name: "Slack Booking Alerts" (or any name that helps you remember what this webhook does)
  • Endpoint URL: https://your-pabbly-webhook-url.com/webhook-receiver
  • Events: Check "Enquiry Created" to start with. You can add more events later.

Each event is something that happens on your site. "Enquiry Created" fires when a traveler sends you an enquiry. "Booking Created" fires when someone actually books a trip. You can pick as many as you need.

Save the webhook

Click Add Webhook at the bottom of the form. Your webhook is now saved and active.

A secret key is generated automatically. You do not need to do anything with it right now. If you work with a developer later, they may need it to verify that the data coming from your site is genuine.

Your webhook is set up. Now let's make sure it actually works.

Testing the webhook with Pabbly

This is the fun part. You will trigger a real event on your website and watch it show up in Pabbly. That tells you everything is connected properly.

Open Pabbly Connect

Go to your Pabbly account and create a new workflow. A workflow is a set of steps that Pabbly runs automatically.

Add a webhook trigger

Choose Webhook as the trigger step. This tells Pabbly to listen for incoming data from your website.

Capture the webhook response

Click Capture Webhook Response. Pabbly will show "Waiting for webhook response..." which means it is ready and listening. Leave this page open.

Trigger the event on your website

Go to your website and submit an enquiry form. If you set up your webhook for "Enquiry Created," this will send data to Pabbly right away.

You can fill in your own enquiry form as a test. Use a name like "Test Traveler" so you know it is your test and not a real customer.

Check the response in Pabbly

Go back to your Pabbly tab. If everything is working, Pabbly will show "Webhook Response Received" and display the data your site sent. You will see the enquiry details like the traveler's name and message.

If you see the data, your webhook is working. You can now connect it to Slack, your CRM, or any other tool in Pabbly.

If Pabbly is still waiting and nothing shows up, check the troubleshooting section below. The most common cause is that the event you triggered does not match the event you selected when you created the webhook.

Security: signature verification

This section is for your developer, if you have one. If you are using Pabbly, Zapier, or a similar automation tool, you can skip this. Those tools handle security for you.

When your site sends data through a webhook, it includes a special code called a signature. This signature lets the receiving app confirm that the data really came from your site and was not changed along the way.

Every webhook request includes this header:

X-WTE-Signature: sha256=<hash>

To verify the signature, hash the raw POST body and compare it against the header value using a timing-safe comparison. This prevents anyone from sending fake data to your endpoint.

What happens if the other tool is down

Sometimes the tool you are sending data to might be temporarily offline. Maybe their server is down for maintenance, or there is a network hiccup. Your website handles this for you automatically.

It will try sending the data again, up to 5 times. Here is how the retries work:

AttemptTimingWhat happens
1ImmediateFirst try
21 minuteSecond try
35 minutesThird try, plus a warning email
415 minutesFourth try, plus a warning email
530 minutesFinal try. If it still fails, the webhook turns itself off and you get a critical email.

If the webhook turns itself off, do not worry. Your data is not lost. Go to the Webhooks & API settings, turn the webhook back on, and make sure the tool you are sending to is back up and running.

Ways other tour operators use webhooks

Send every new booking to your CRM

Say you use HubSpot or Zoho to track your sales leads. You want every new booking to show up there automatically, so your team can follow up without typing anything in.

Create a webhook for the Booking Created event (called booking.created in the settings). Point it at your CRM through Pabbly or Zapier. Now every time someone books your 5-day Everest base camp trek, the booking details land in your CRM instantly. Your sales team sees it right away and can reach out to the traveler.

Send automatic WhatsApp or SMS confirmations

Travelers love getting a quick confirmation on WhatsApp or SMS. It reassures them that their booking went through.

Create a webhook for the Payment Completed event (called booking.payment.completed). Connect it to a tool like Twilio or the WhatsApp Business API through Pabbly. When a traveler pays for your day tour, they get an automatic message with their booking details. You do not have to send anything yourself.

Keep your accounting software up to date

If you use QuickBooks, Xero, or Odoo for your books, you probably do not enjoy copying payment details into it by hand.

Create a webhook for the Payment Completed event. Map the payment amount to an invoice or accounting entry in your software. When a traveler pays for a group booking on your 7-day cultural tour, the payment shows up in your accounting tool automatically. Your books stay current without manual entry.

Tips to share with your developer

If you work with a developer to set up a custom webhook receiver (instead of using Pabbly or Zapier), here are a few things they should know:

  • Respond quickly: The receiving app should send a success reply (HTTP 200) within 5 seconds. If it takes longer, process the data in the background.
  • Return success first: Send the HTTP 200 reply right away, then handle the data. This tells your site the delivery worked.
  • Handle duplicates: Sometimes a webhook fires twice for the same event. The receiving app should be ready to ignore duplicates so the same booking does not get recorded twice.

Troubleshooting

I can't find the Webhooks & API settings

Look in the left sidebar of your WordPress dashboard for WP Travel Engine, then click Settings, then Webhooks & API. Depending on your version, it might be under Bookings, then Settings, then Webhooks & API instead.

If you do not see either menu, the Webhooks & API add-on may not be activated. Go to Plugins in your WordPress dashboard and check that it is listed and active. Once the add-on is active, the settings should appear.

My webhook isn't sending any data

First, check that your webhook is turned on. In the Webhooks & API settings, look for the toggle next to your webhook. It should be green or showing "Active."

Then, make sure you selected the right events. A webhook only sends data for the events you checked when you set it up. For example, if you only checked "Enquiry Created" but you are testing with a booking, nothing will send. The events need to match what you are testing.

Finally, make sure the web address you entered is correct. Copy it from your other tool and paste it again to be sure. Most problems here come down to the wrong address or the wrong event being selected.

I tested with a booking but my webhook is set up for enquiries

Webhooks only fire for the events you selected. If your webhook is set to "Enquiry Created" and you submit a booking instead, the webhook will not trigger.

Go back to the Webhooks & API settings, edit your webhook, and add the events you want. For bookings, check "Booking Created." For payment confirmations, check "Payment Completed." Save the changes and test again.

The data in my other tool looks incomplete

This usually means you are missing the WP Travel Engine Cart plugin, or it is an older version.

Webhooks can only send complete booking and payment details if Cart version 4.0 or newer is installed and active. Check your Plugins page in WordPress to confirm. Once Cart is updated, the data should be more complete.

My other tool says the data signature doesn't match

This is something your developer would handle. The signature is a security check that confirms the data came from your site.

For your developer: Make sure you are using the webhook secret (not the API secret). Hash the raw POST body before JSON parsing. Include the sha256= prefix in your comparison. Use a timing-safe comparison function like hash_equals() to prevent timing attacks.

My webhook turned itself off

If a webhook fails several times in a row, the add-on turns it off automatically to prevent problems. You will get an email when this happens.

To turn it back on, go to the Webhooks & API settings, find your webhook, and switch it back to Active. But first, check that the tool you are sending data to is working. If it is still down, the webhook will fail again.

You can also check the webhook logs for details. Go to Settings, then Webhooks & API, then Logs to see the full delivery history.

For your developer: You can test the endpoint directly and confirm the event is firing using WP-CLI. Check the webhook logs for specific error messages.

Frequently asked questions

If you're still stuck or have a question we didn't cover, our support team is happy to help. Reach out at our support page and we'll get you sorted.