> 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/flutterwave.md).

# Flutterwave

This guide explains how to configure the Flutterwave Payment Gateway with PHPTRAVELS, test the API connection, process a test booking and payment, verify the transaction, and prepare the gateway

{% embed url="<https://www.youtube.com/watch?v=E5YKSp6Zfzw>" %}

### Overview

PHPTRAVELS integrates with Flutterwave to allow customers to make online payments during the booking process.

The integration process includes:

1. Setting up your Flutterwave account.
2. Obtaining your API credentials.
3. Enabling Flutterwave in PHPTRAVELS.
4. Configuring Development Mode.
5. Adding the required API keys.
6. Configuring a Flutterwave subaccount where required.
7. Testing the API connection.
8. Creating a test booking.
9. Processing a test card payment.
10. Completing OTP verification.
11. Verifying the successful transaction.
12. Switching to production when ready.

***

## Requirements

Before starting, make sure you have:

* An active PHPTRAVELS installation
* PHPTRAVELS Admin Panel access
* A Flutterwave account
* Flutterwave developer/test credentials
* Public Key
* Secret Key
* Encryption Key
* Required Flutterwave account configuration
* At least one supported currency/payment method

> **Important**
>
> We recommend completing the entire integration in Flutterwave's test/development environment before enabling production payments.

***

## 1. Log in to Flutterwave

Create a Flutterwave account or log in to your existing account.

For initial integration and testing, use your Flutterwave developer/test environment.

Production credentials should only be configured after your Flutterwave account is activated for live payments.

***

## 2. Get Your Flutterwave API Keys

From your Flutterwave dashboard, navigate to:

**Settings → API Keys**

Locate your API credentials.

PHPTRAVELS requires the relevant credentials provided by Flutterwave, including:

* **Public Key**
* **Secret Key**
* **Encryption Key**

Copy these credentials carefully.

> **Security Warning**
>
> Never publish your Secret Key or Encryption Key. Do not expose production API credentials in screenshots, videos, frontend code, public repositories, or documentation.

***

## 3. Open Flutterwave in PHPTRAVELS

Log in to your PHPTRAVELS Admin Panel.

Navigate to:

**Settings → Payment Gateways**

Locate **Flutterwave**.

Make sure the Flutterwave gateway is **Enabled**, then open its **Settings**.

***

## 4. Select Development Mode

For initial testing, set the Flutterwave environment to:

**Development**

Do not select Production while using Flutterwave test credentials.

***

## 5. Add Flutterwave Credentials

Copy the credentials from your Flutterwave account and enter them into the corresponding PHPTRAVELS fields.

Configure:

**Public Key**\
Enter your Flutterwave Public Key.

**Secret Key**\
Enter your Flutterwave Secret Key.

**Encryption Key**\
Enter your Flutterwave Encryption Key.

Save the configuration.

***

## 6. Test the Credentials

After entering the credentials, click:

**Test Credentials**

PHPTRAVELS will attempt to connect to Flutterwave.

If the connection is successful, you can continue with payment testing.

If the test indicates that a required subaccount cannot be found, review your Flutterwave subaccount configuration.

***

## 7. Configure a Flutterwave Subaccount

Depending on your Flutterwave account and integration configuration, a subaccount may be required.

In the setup demonstrated in our video, a subaccount was created before the credential test completed successfully.

Open the **Subaccounts** section in your Flutterwave dashboard and create the required subaccount.

Enter the requested business/account information.

You may also need your Flutterwave **Merchant ID**, depending on the account configuration.

> **Note**
>
> Flutterwave account requirements can vary. Follow the requirements displayed in your Flutterwave dashboard for your account and region.

After creating the subaccount, return to PHPTRAVELS and run **Test Credentials** again.

***

## 8. Verify the Connection

Once the required Flutterwave account configuration has been completed, run:

**Test Credentials**

A successful response confirms that PHPTRAVELS can communicate with the configured Flutterwave environment.

You can now test the customer payment flow.

***

## 9. Check Your Currency

Before creating a test payment, make sure the currency being used for the booking is supported by your Flutterwave account and enabled payment methods.

> **Important**
>
> Payment availability can depend on currency, country, Flutterwave account configuration, and the selected payment method.

***

## 10. Create a Test Booking

Open the PHPTRAVELS frontend.

For example, create a hotel booking:

**Hotels → Select Destination → Select Hotel → Select Room → Continue to Booking**

Enter the required customer and booking information.

Proceed with the booking.

***

## 11. Select Flutterwave

On the checkout/booking page, select:

**Flutterwave**

as the payment gateway.

Continue with the booking and proceed to payment.

***

## 12. Open the Payment Page

After the booking has been generated, continue to the payment page.

PHPTRAVELS will initiate the payment through the configured Flutterwave gateway.

The customer can then use an available payment method supported by the Flutterwave account.

***

## 13. Test a Card Payment

When using Flutterwave Development Mode, use Flutterwave's official test payment credentials.

For a card transaction, enter the required test information, such as:

* Test card number
* Expiry date
* CVV/CVC
* Any additional authentication information requested by Flutterwave

> **Warning**
>
> Do not use real customer card details for development/testing. Use the current test credentials provided by Flutterwave for its test environment.

***

## 14. Complete OTP Verification

Depending on the test payment scenario, Flutterwave may display an OTP verification screen.

Enter the test OTP supplied for the relevant Flutterwave test scenario and continue.

In production, authentication is performed according to the actual payment method and customer verification flow.

***

## 15. Verify Successful Payment

After successful authentication, Flutterwave processes the transaction.

When successful, PHPTRAVELS should display confirmation that the payment has been completed.

You should be able to verify information such as:

**Payment Status: Paid**

and the associated **Transaction ID**.

The customer may also receive the applicable booking/payment email notifications.

***

## 16. Verify the Booking

Return to the booking information and confirm that the payment has been associated with the correct booking.

Verify:

* Booking information
* Payment status
* Transaction ID
* Payment amount
* Customer details
* Booking confirmation

This completes the test payment flow.

***

## 17. Verify the Transaction

You should also verify the transaction from your payment records and Flutterwave dashboard.

This provides an additional confirmation that the payment request was processed by the gateway.

***

## Moving to Production

After successfully completing your development testing, you can prepare Flutterwave for live payments.

Do not continue using test credentials on a production payment environment.

Complete the required Flutterwave account activation/onboarding process and obtain or enable the appropriate production credentials.

In PHPTRAVELS, change the gateway environment from:

**Development → Production**

Then replace the development credentials with the appropriate production credentials.

Verify all required production settings before accepting customer payments.

***

## Production Checklist

Before accepting real payments:

* Flutterwave account is activated for production
* Production environment is selected
* Production Public Key is configured
* Production Secret Key is configured
* Production Encryption Key is configured where required
* Flutterwave gateway is enabled
* Required currencies are supported
* Required payment methods are active
* Subaccount configuration is correct where applicable
* Booking payment flow has been tested
* Successful payments update bookings correctly
* Transaction IDs are recorded correctly
* Customer notifications are working
* Failed/cancelled payment scenarios have been reviewed

***

## Troubleshooting

### Flutterwave Does Not Appear at Checkout

Go to:

**Admin Panel → Settings → Payment Gateways → Flutterwave**

Make sure the gateway is **Enabled**.

Also verify that its configuration has been saved correctly.

***

### Test Credentials Fail

Check the following:

* Public Key
* Secret Key
* Encryption Key
* Development/Production environment
* Flutterwave account status
* Subaccount configuration where required

Make sure you have not accidentally mixed development credentials with production mode.

***

### Subaccount Not Found

If the credential test indicates that no subaccount is available, review the **Subaccounts** section of your Flutterwave account.

Create/configure the required subaccount and then test the credentials again.

***

### Payment Method Is Not Available

Check whether the required payment method is enabled for your Flutterwave account.

Availability can depend on:

* Country
* Currency
* Account status
* Payment method
* Flutterwave merchant configuration

***

### Currency Is Not Supported

Make sure the booking currency is supported by the payment configuration available on your Flutterwave account.

If necessary, change the booking currency or review your Flutterwave account's supported currencies.

***

### OTP Does Not Work

When using Development Mode, use the test authentication information provided for the specific Flutterwave test scenario.

Production OTP/authentication should come from the real payment authentication flow and should never use development test values.

***

### Payment Is Successful but Booking Is Not Updated

First verify the transaction in Flutterwave.

Then check:

* Transaction ID
* PHPTRAVELS payment status
* Payment amount
* API environment
* API credentials
* PHPTRAVELS payment/booking records
* Any callback/webhook configuration applicable to your deployment

If the transaction succeeded at Flutterwave but is not reflected correctly in PHPTRAVELS, contact PHPTRAVELS Support with the relevant booking and transaction information.

***

## Security Recommendations

When configuring Flutterwave:

* Never share your Secret Key publicly.
* Never publish your Encryption Key.
* Keep development and production credentials separate.
* Never commit production credentials to a public repository.
* Restrict Admin Panel access to authorized users.
* Use HTTPS on your production website.
* Replace credentials immediately if they are exposed.
* Verify payments server-side before treating a booking as paid.
* Follow Flutterwave's current production security requirements.

***

## Payment Flow

The Flutterwave payment flow with PHPTRAVELS can be summarized as:

**Customer selects travel service → Creates booking → Selects Flutterwave → Proceeds to payment → Enters payment details → Completes authentication/OTP → Flutterwave processes transaction → PHPTRAVELS receives successful payment → Payment marked Paid → Booking confirmed**

***

## Video Tutorial

For a complete visual walkthrough, watch:

**Flutterwave Payment Gateway Integration with PHPTRAVELS | Complete Setup Tutorial 2026**

The video demonstrates the actual configuration process from Flutterwave API credentials through to a successful PHPTRAVELS test transaction.

**Video chapters include:**

* Flutterwave developer account
* API credentials
* PHPTRAVELS gateway configuration
* Development Mode
* Subaccount setup
* Merchant ID
* Credential testing
* Hotel test booking
* Currency verification
* Flutterwave checkout
* Test card payment
* OTP authentication
* Successful transaction
* Production setup
