So, are you looking forward to to add Custom Payment Gateway with WP Travel Pro?

Well, WP Travel is a complete booking package for trips and tours with its payment gateways. It is the best WordPress tour operator plugin for travel

and tour agencies to create and publish outstanding tour and travel packages, build detailed itineraries, take tour bookings, receive and process online payments, and much more.

So, if you need another Payment Gateway and want to create a custom Payment Gateway then our developers have prepared the prototype of a custom payment gateway for easy integration of 3rd-party payment into WP Travel core.

Also, please find below the resources that include documentation and prototype code for custom payment development. You or your developer should be able to modify it and develop the payment addon.

Let us know if you’ve any questions regarding the integration.

You might be interested: How to Integrate Different Payment Systems to Travel Websites?

WP Travel Payment Prototype Docs

“Instruction to follow before making payment addon for WP Travel.”

If you are using GitLab to clone the addon prototype.

Step 1: Clone repo GitHub repo:ws-plugins/wp-travel-payment-prototype.git in your plugin folder.

Step 2: Go to plugin folder cd wp-travel-payment-prototype

Step 3: Checkout to the dev branch.

Note: All the core files of the payment prototype is inside /inc/modules/payment-prefix-core folder.

Steps to Add Custom Payment Gateway with WP Travel Pro

Step 1: You can rename the addon folder ‘wp-travel-payment-prototype

You can rename the addon folder ‘wp-travel-payment-prototype’ to your requirement. For e.g ‘wp-travel-paypal-express’ and also rename folder (addonfolder/inc/modules/) ‘payment-prefix-core’ to your requirement.

For e.g ‘paypal-express-core’.

Step 2: Rename ‘wp-travel-payment-prefix.php’

Go inside the payment addon folder and rename ‘wp-travel-payment-prefix.php’ to your requirement. For e.g ‘wp-travel-paypal-express.php’.

Step 3: Add your payment folder to the code editor

Now if you are using VS Code or Sublime, add your payment folder to the code editor and search inside the folder using a match case so that the exact word will be found.

For example, if you search for ‘wp travel’ without using a match case then it will also search for ‘WP Travel’. But using a match case, it only searches for ‘wp travel’.

Step 4: Search for the following words one by one

Now search for the following words one by one and rename them with your requirements.

For e.g ‘payment prefix’ to ‘paypal express’ or ‘payment_prefix’ to ‘paypal_express’.

If you found any other payment prefix word inside the folder then change that accordingly.

Payment Prefix

Step 5: Open terminal inside addon folder to type ‘npm install’

After replacing all of the above words, open the terminal inside the addon folder and type ‘npm install’ or ‘yarn install’. Wait!! It will take some time.

Step 6: Go inside the core folder and type ‘yarn install

After completion, go inside the core folder and type ‘yarn install’.. This will install necessary dependencies on the folder and you are ready to develop.

Step 7: Work on /corefolder/app/admin/settings/index.js file

If you are working on the admin settings payment tab, work on /corefolder/app/admin/settings/index.js file. But before working on this use ‘yarn start’ to develop.

After saving the file this will automatically compile your js file. After developing you can minify the js using ‘yarn build’.

Step 8: You can start developing your custom payment addon

Now, you can start developing your custom payment addon for WP Travel. Main hooks and addon listing are given inside the core main php file. 

Step 9: Add a field default value for enabling/disabling addon

For saving the fields on the backend, a settings file has been added (corefolder/inc/admin/settings.php). Here you can add a field default value like the one added in the file for enabling/disabling the addon.


If you liked this article, then subscribing to our YouTube Channel for WordPress video tutorials would be the cherry on top.

You can also find us on FacebookInstagram, Twitter, Linkedin, TikTok, Pinterest, Reddit, and our dedicated engaging Facebook user community,

Further, if you have any queries, please submit them to our contact page.

Get WP Travel Pro and start creating your travel and tour booking website within minutes without any hassle of coding.

get WP Travel Pro