PHPackages                             obinnaakaolisa/flutterwave-pay - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. obinnaakaolisa/flutterwave-pay

ActiveLibrary[Payment Processing](/categories/payments)

obinnaakaolisa/flutterwave-pay
==============================

This is a PHP package for intializing and verifying Fluttwerwave transactions via the Flutterwave transactions API

v1.0.1(2y ago)213MITPHPPHP ^8.0

Since Sep 11Pushed 2y ago1 watchersCompare

[ Source](https://github.com/obinnaakaolisa/flutterwave-pay)[ Packagist](https://packagist.org/packages/obinnaakaolisa/flutterwave-pay)[ RSS](/packages/obinnaakaolisa-flutterwave-pay/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

flutterwave-pay
===============

[](#flutterwave-pay)

This is a PHP package for intializing and verifying Flutterwave transactions via the Flutterave transactions API

Requirements
------------

[](#requirements)

The package requires the folowing resources:

1. PHP ^8.0
2. Composer
3. Curl

Getting started
---------------

[](#getting-started)

### Installation

[](#installation)

Navigate to your project's directory

```
    cd folder/my-project
```

In your project folder, run the following command

```
    composer require obinnaakaolisa/flutterwave-pay
```

### Set your api key

[](#set-your-api-key)

```
    $apiKey = "FLWSECK_TEST-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-X";
```

### Instantiate a new transaction object

[](#instantiate-a-new-transaction-object)

Pass in the API\_KEY upon instantiation.

```
    $transaction = new FlutterwavePay($apiKey);
```

Define your payload data for a `POST` request.

```
    $payload = [
    'tx_ref' => 'FLW_TEST_'.bin2hex(random_bytes(5)),
    'amount' => 2000, //in naira
    'redirect_url' => "https://{$_SERVER['SERVER_NAME']}/verify.php",
    'currency' => 'NGN',
    'customer' => [
        'name' => 'Firstname' .' '.'Lastname',
        'email' => 'customer@email.com',
        'phone_number' => '08031010101',
    ],
    'payment_options' => "card, banktransfer, ussd",
    'customizations' => [
        'title' => 'Some Payment',
    ],
    'meta' => [
        'field_name' => 'field_value',
    ],
    'subaccounts' => []
];
```

Note:

1. The `customizations` field is optional. Define it if you want to customize the look and feel of the payment page. See [documentation](https://developer.flutterwave.com/docs/collecting-payments/standard) for reference.
2. The `subaccounts` field is optional. It is only defined when you want to split the transaction into different settlement accounts. See [documentation](https://developer.flutterwave.com/docs/collecting-payments/split-payments) for reference.
3. The `meta` field is optional. It is only defined when you want to save additional info about the customer or the transaction. See [documentation](https://developer.flutterwave.com/docs/collecting-payments/standard) for reference.

### Intialize the transaction

[](#intialize-the-transaction)

The response you get for a request is a json encoded object, so you need to decode it thus:

```
$response = json_decode($transaction->initialize($payload));
```

or

```
$request = $transaction->initialize($payload);

$response = json_decode($request);
```

### Verifying a transaction

[](#verifying-a-transaction)

Upon a successfull transaction or close of the payment page, the customer will be redirected to the `redirect_url` you set when initiating the transaction. Normally, that's the url where you'll verify the status of the transaction.

It is advised to verify a transaction before you give value to the customer.

Define your API\_KEY

```
    $apiKey = "FLWSECK_TEST-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-X";
```

Instantiate a new transaction object and pass in the API\_KEY upon instantiation.

```
    $transaction = new FlutterwavePay($apiKey);
```

Pass in the transaction reference that was defined while intiating the transaction.

You can also get this from the query parameter of the get request returned along with the `redirect_url`.

```
$response = json_decode($transaction->verify($_GET['tx_ref']));
```

Contributing
------------

[](#contributing)

Contributions are always welcome!

See `contributing.md` for ways to get started.

Please adhere to this project's `code of conduct`.

License
-------

[](#license)

[MIT](https://choosealicense.com/licenses/mit/)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

970d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/784fe4acc8eab6176fb77c1732a318039e4a179bcc810a922bc14fcc1cb7f748?d=identicon)[obinnaakaolisa](/maintainers/obinnaakaolisa)

---

Top Contributors

[![obinnaakaolisa](https://avatars.githubusercontent.com/u/39627400?v=4)](https://github.com/obinnaakaolisa "obinnaakaolisa (10 commits)")

---

Tags

flutterwaveflutterwave-payflutterwave-payment-processingflutterwave-phpphp-package

### Embed Badge

![Health badge](/badges/obinnaakaolisa-flutterwave-pay/health.svg)

```
[![Health](https://phpackages.com/badges/obinnaakaolisa-flutterwave-pay/health.svg)](https://phpackages.com/packages/obinnaakaolisa-flutterwave-pay)
```

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[dnetix/redirection

Library to connect with PlacetoPay Checkout service

17123.3k2](/packages/dnetix-redirection)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
