# Adding Payment Gateway

{% embed url="<https://youtu.be/Jc_KR7_ZDHw>" %}

In this tutorial, you will learn **how to integrate a new payment gateway in PHPTRAVELS v10+** using a real world example with **Paystack**.

This video is designed for developers, agency owners, and technical teams who want to extend PHPTRAVELS with custom payment gateways instead of relying only on default options.

You will see the **full integration flow**, starting from database setup to live testing inside the booking process.

What you will learn in this video:

• How PHPTRAVELS payment gateways are structured\
• How to add a new payment gateway record in the database\
• How to configure gateway parameters correctly in admin\
• How to map API keys like secret key and public key\
• How to build the payment gateway source file by learning from existing gateways\
• How to test the payment flow using a real booking\
• How to confirm transactions are stored correctly

This tutorial is based on **PHPTRAVELS version 10** and applies to most third party payment providers including Paystack, Stripe, Flutterwave, Razorpay, PayPal alternatives, and local gateways.

If you are building a **custom travel booking system**, **B2B or B2C platform**, or **white label travel software**, this guide will save you hours of trial and error.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.phptravels.com/support/for-developers/adding-payment-gateway.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
