Webhooks and APIOverview & Prerequisites

Overview & Prerequisites

Connect your WP Travel Engine booking system to the other tools you already use - send booking updates automatically and let your apps pull trip and customer data whenever they need it.

The Webhooks & API add-on helps your booking website talk to other tools you already use.

It works in two ways.

First, it can send updates out on its own using webhooks. A webhook is an automatic message your website sends to another app the moment something happens. Say a traveler books your 3-day Annapurna trek. Your site can instantly tell your CRM, your accounting software, or a tool like Zapier or Pabbly about that booking. You do not have to copy anything by hand.

Second, it can let other apps ask for data using the API. An API, or Application Programming Interface, is a secure way for another app to ask your website for data and get it back. For example, if you have a mobile app where travelers can see their booking history, that app would use the API to pull each traveler's bookings from your site.

Here is the simple version of what you get:

  • Webhooks - your site sends data out to other tools automatically, the moment something happens
  • REST API - other apps ask your site for data whenever they need it

This add-on is a good fit if you use a CRM like HubSpot, an accounting tool like QuickBooks, a messaging tool like WhatsApp or Slack, or if you work with a developer who is building something connected to your booking system.

Here's a closer look at what you can do with each one.

Why would I use this?

With webhooks, you can:

  • Send every new booking straight to your CRM or accounting tool the moment it happens. No more copying details by hand.
  • Trigger automatic WhatsApp, SMS, or email messages when a booking or payment comes through. Your traveler gets an instant confirmation without you doing anything.

Say you run multi-day treks and use Slack to keep your guides in the loop. You could set up a webhook so every new booking sends a message to your team channel. Everyone knows about new bookings right away.

With the API, you can:

  • Let an accounting tool like QuickBooks or Xero read your payment data directly. Your books stay up to date without manual entry.
  • Let a developer build a customer portal or mobile app where travelers can log in and see their bookings, trips, and payments.
  • Give a partner website or travel agent secure, controlled access to your trip data so they can show live availability.
  • Pull trip, booking, customer, and payment data into another system whenever it needs fresh information.

You do not have to use both. Many tour operators start with webhooks because they are easier to set up, then add the API later if they need it.

What's included

Webhooks

  • Instant notifications for 7 different events - Your site can send data when things like new enquiries, bookings, or payments happen. You pick which events matter to you.
  • Automatic retries - If your other tool is temporarily down when a booking comes in, your site tries sending the data again. It retries up to 5 times with smart backoff so you do not lose information.
  • Email alerts when things go wrong - If a webhook keeps failing, you get an email about it. You will know there is a problem before your customers do.

API

  • Secure, read-only access - Other apps can read your bookings, trips, customers, and payment data. They cannot change anything, which keeps your data safe.
  • Rate limiting - This stops any one app from making too many requests to your site at once. It helps protect your server from excessive requests and keeps your website from slowing down.
  • Response caching - When an app asks for the same data more than once within an hour, your site gives it the saved copy instead of looking it up again. A cache is a temporary storage that speeds things up. This makes the API faster.

Both webhooks and the API

  • Full documentation and WP-CLI support - WP-CLI is a tool that lets developers manage WordPress from a command line instead of the dashboard. If you work with a developer, they will have everything they need.

Now let's look at what needs to be in place before you start.

What you'll need before you start

A few things need to be in place before this add-on can work. Do not worry - most of these are already set up if you have been using WP Travel Engine for a while.

Your website needs:

  • WordPress 5.0 or newer. WordPress is the system your whole website runs on.
  • PHP 7.4 or newer. PHP is the programming language WordPress runs on. Your hosting company manages this, so you may not need to do anything.
  • HTTPS recommended. HTTPS is the secure version of your website address, the one that starts with https:// instead of http://.

The API can only show booking details for bookings made after WP Travel Engine version 6.7.0, which uses a newer calculation system with Cart version 4.0 or later. Bookings from older versions will not appear in API results.

Your plugins need to be:

A plugin is a small tool you add to WordPress to give your website more features. An add-on is an extra tool that connects to WP Travel Engine to add one specific feature.

  • WP Travel Engine version 6.7.0 or newer
  • WP Travel Engine Cart version 4.0 or newer. This handles booking and payment calculations. You need it for complete booking and payment data.
  • The Webhooks & API add-on installed, activated, and ready to use

Need help installing and activating the add-on? See our guide on how to activate a Pro add-on license key.

If you plan to use webhooks, you'll also need:

  • A web address, also called a URL, for the tool you want to send data to. For example, a Pabbly webhook URL or a Zapier webhook URL.
  • That address needs to accept POST requests. This means it must be ready to receive data sent from your website. Most automation tools like Pabbly and Zapier handle this automatically.
  • That address needs to return HTTP 200. This is the success reply that tells your site the other tool received the data properly.

If you plan to use the API, you'll also need:

  • At least one API key and secret generated. An API key is like a username and password combined. It is what another app uses to log in to your site and read data.
  • Permissions set for each key. For example, you might allow access to bookings but not to customer details.
  • Optional: a tool called Postman for testing your API connection. Postman is a free app that lets you send test requests to your API to make sure it is working. Your developer may already have it.

Once these are in place, you're ready to set things up.

Where to go next

  • Want to send booking updates, enquiries, or payment notifications to another tool? Head to the Webhooks setup guide.
  • Want to pull trip, booking, or customer data into another system? Head to the API setup guide.

Troubleshooting

I can't find the Webhooks & API settings

The settings live inside your WP Travel Engine menu. In the left sidebar of your WordPress dashboard, look for 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. If you do not see either menu, make sure the Webhooks & API add-on is 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 other tool isn't receiving 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.

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 URL or the wrong event being selected.

The booking 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.

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

My webhook stopped working on its own

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.

I don't see any bookings when I test the API

The API only returns bookings that were created after WP Travel Engine version 6.7.0 with Cart version 4.0 or later.

If all your bookings were made on an older version, the API results will look empty. New bookings made after upgrading will appear.

I get an "Unauthorized" error when testing the API

Double-check that you copied the API key and secret correctly. Even one extra space at the beginning or end can cause this.

Also, make sure the API key is set to Active in your settings. If you are using a tool like Postman, try sending the key and secret in the Headers tab rather than as URL parameters.

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.