> For the complete documentation index, see [llms.txt](https://docs.phptravels.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.phptravels.com/payments/paystack.md).

# PayStack

The Paystack Payment Gateway integration for PHPTRAVELS enables travel businesses to accept online payments directly through the PHPTRAVELS booking and checkout process.

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

### What You'll Configure

The integration process covers:

1. Creating or accessing your Paystack merchant account.
2. Obtaining your Paystack API credentials.
3. Enabling Paystack from the PHPTRAVELS Admin Panel.
4. Configuring the gateway in **Development Mode**.
5. Adding the required Paystack Public and Secret Keys.
6. Whitelisting the required IP address.
7. Testing the API connection.
8. Configuring a Paystack-supported currency.
9. Creating a test booking.
10. Processing a Paystack test payment.
11. Verifying the successful transaction.
12. Switching from development credentials to production credentials.

### Paystack API Credentials

After signing in to your Paystack account, navigate to:

**Settings → API Keys & Webhooks**

Your Paystack account provides the API credentials required to connect your merchant account with PHPTRAVELS.

For initial integration and testing, use your **test credentials**.

> **Important:** Never expose your Secret Key publicly or include production API credentials in screenshots, documentation, public repositories, or frontend source code.

### Configure Paystack in PHPTRAVELS

Log in to your PHPTRAVELS Admin Panel and navigate to:

**Settings → Payment Gateways → Paystack**

Make sure the Paystack payment gateway is **Enabled**.

Open the gateway settings and select:

**Environment: Development**

Enter the required Paystack API credentials into their corresponding fields and save the configuration.

When your website is ready for live transactions, the environment can be changed to **Production** and the appropriate production credentials can be configured.

### Test the API Connection

After saving your Paystack credentials, click:

**Test Credentials**

PHPTRAVELS will communicate with Paystack to verify the configuration.

If the credentials and account configuration are correct, the connection test should complete successfully.

### IP Whitelisting

During testing, Paystack may reject an API request if the originating IP address is not permitted.

For example, you may receive an error indicating that your IP address is not allowed to make the API call.

In this case, open the appropriate IP whitelist settings in your Paystack account and add the required IP address.

For a production installation, make sure the appropriate **server IP address** is configured according to your Paystack account requirements.

After adding the IP address, return to PHPTRAVELS and run **Test Credentials** again.

### Currency Configuration

Your PHPTRAVELS booking currency must be supported by your Paystack merchant account.

During the test demonstrated in our tutorial, a booking created in USD returned an unsupported-currency response. The PHPTRAVELS default currency was therefore changed to:

**NGN — Nigerian Naira**

After changing the currency to NGN and creating a new booking, the payment process continued successfully.

> **Important:** Supported currencies can depend on your Paystack account, merchant country, and account configuration. Confirm currency availability with Paystack before configuring your production website.

If your Paystack account supports additional currencies, configure PHPTRAVELS according to your approved merchant setup.

### Create a Test Booking

After successfully testing the API credentials, open the PHPTRAVELS frontend and create a booking.

For example:

**Hotels → Select Hotel → Select Room → Booking Details → Paystack**

Make sure the booking uses a currency supported by your Paystack account.

Complete the customer information and confirm the booking.

### Process the Payment

From the booking page, select:

**Make Payment → Proceed to Payment**

PHPTRAVELS will initiate the transaction through Paystack.

Because the integration is running in the test environment, use the payment/testing process provided by Paystack rather than real customer payment information.

Complete the test transaction and wait for the successful payment response.

### Verify the Successful Payment

After Paystack successfully processes the transaction, PHPTRAVELS returns the customer to the relevant booking flow.

Verify that the booking and payment have been updated correctly.

You can also open the PHPTRAVELS transaction records to confirm that the transaction has been recorded.

A successful test confirms that the basic flow is working:

**Booking → Paystack → Payment → Successful Transaction → PHPTRAVELS Booking Update**

### Moving to Production

Once development testing has been completed successfully, prepare your Paystack account for production according to Paystack's merchant activation requirements.

Inside PHPTRAVELS, change:

**Development → Production**

Then replace the test API credentials with the appropriate **production credentials**.

Before accepting real customer payments, verify:

* Production API credentials
* Paystack gateway status
* Server/IP configuration
* Supported currencies
* Payment methods
* Successful transaction handling
* Booking status updates
* Transaction records

> **Warning:** Do not accept real customer payments until your Paystack account is approved for production and the complete production configuration has been verified.

### Troubleshooting

If **Test Credentials** fails, verify your API credentials, selected environment, Paystack account status, and IP whitelist configuration.

If you receive a **currency not supported** error, check whether the booking currency is enabled for your Paystack merchant account. Use an approved currency such as NGN where applicable, or contact Paystack regarding currency availability for your account.

If Paystack does not appear during checkout, verify that the gateway is **Enabled** under:

**Settings → Payment Gateways → Paystack**

If the payment succeeds but the booking or transaction does not update correctly, verify the transaction details and PHPTRAVELS payment records before contacting support.

### Security Recommendations

Keep all production Paystack credentials private. Never expose Secret Keys in public source code, screenshots, videos, Git repositories, or documentation.

Use HTTPS on your production PHPTRAVELS website and restrict access to payment gateway configuration to authorized administrators.

Keep development and production credentials separate and replace credentials immediately if they are accidentally exposed.

### Video Tutorial

For a complete visual walkthrough, watch:

**Paystack Payment Gateway Integration with PHPTRAVELS | Complete Setup & Payment Tutorial 2026**

The video demonstrates API configuration, IP whitelisting, credential testing, currency troubleshooting, creating a booking, processing a test payment, verifying the transaction, and preparing the integration for production.

### Need Help?

If you experience an issue with the **PHPTRAVELS Paystack integration**, submit a support ticket through the PHPTRAVELS client area.

When contacting support, include the relevant error message, booking reference, transaction reference, and whether you are using **Development** or **Production** mode.

**Never include your complete Secret Key, card information, or other sensitive payment credentials in a support ticket.**
