Download the PHP package kommandhub/flutterwave-v3 without Composer
On this page you can find all versions of the php package kommandhub/flutterwave-v3. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kommandhub/flutterwave-v3
More information about kommandhub/flutterwave-v3
Files in kommandhub/flutterwave-v3
Package flutterwave-v3
Short Description A framework-agnostic PHP library for integrating Flutterwave payments using SOLID principles and PSR standards.
License MIT
Informations about the package flutterwave-v3
Flutterwave v3 PHP Library
A framework-agnostic PHP library for integrating Flutterwave payments using SOLID principles and PSR standards.
Note: This library covers the Flutterwave features we use internally. It doesn't wrap every API endpoint yet — contributions are very welcome!
Table of Contents
- Features
- Requirements
- Installation
- Quick Start
- API Reference
- Transactions
- Transfers
- Refunds
- Payloads
- Error Handling
- Advanced: Custom HTTP Client
- Development
- License
Features
- Standard Checkout — Initialize payments and redirect to Flutterwave's hosted checkout.
- Transactions — List, verify, and view transaction timelines.
- Transfers — Initiate transfers, check fees, and get exchange rates.
- Refunds — Initiate and manage transaction refunds.
- Type-Safe Payloads — Typed DTOs for consistent, validated API requests.
- PSR-Compliant — Built on PSR-18 (HTTP Client), PSR-17 (Factories), and PSR-7 (Messages).
- Framework Agnostic — Works in Laravel, Symfony, Slim, or plain PHP.
Requirements
- PHP 8.1+
- A PSR-18 HTTP client (e.g.
guzzlehttp/guzzleorsymfony/http-client) - A PSR-17 factory (e.g.
nyholm/psr7)
Installation
If you don't already have a PSR-18 client and PSR-17 factories, install one alongside the library:
Quick Start
1. Initialize the client
The library uses PSR auto-discovery — as long as a PSR-18 client and PSR-17 factories are installed, it works out of the box.
2. Initialize a payment
3. Verify the payment
After Flutterwave redirects back to your redirect_url, verify the transaction using the transaction_id query parameter.
API Reference
Transactions
Transfers
Example — initiate a bank transfer:
Refunds
Example — partial refund:
Payloads
All payloads extend AbstractPayload and serialize to array via ->toArray().
| Payload | Required | Optional |
|---|---|---|
PaymentPayload |
amount, currency, tx_ref, redirect_url, customer |
customizations |
CustomerPayload |
email |
phonenumber, name |
CustomizationsPayload |
— | title, logo, description |
TransferPayload |
account_bank, account_number, amount, currency, narration, reference |
callback_url, debit_currency |
RefundPayload |
— | amount, comments |
Error Handling
All errors surface as FlutterwaveException. It carries the API error message, the HTTP status code, and the raw response body.
Advanced: Custom HTTP Client
You can inject your own PSR-18 client and PSR-17 factories directly:
Or provide a fully custom implementation of HttpClientInterface (useful in tests or when wrapping another HTTP layer):
Development
The repository ships with a Makefile and a Docker environment.
Running the examples locally
- Clone the repo and run
composer install. - Copy
.env.exampleto.envand setFLUTTERWAVE_SECRET_KEY. -
Start the built-in PHP server:
- Visit
http://localhost:8000.
Alternatively, use Docker (make up) — Xdebug is pre-configured for step debugging.
Contributing
Contributions are welcome! Please read Code of Conduct.
License
The MIT License (MIT). See LICENSE for details.
All versions of flutterwave-v3 with dependencies
illuminate/support Version ^10.0 || ^11.0 || ^12.0
php-http/discovery Version ^1.18
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^1.0 || ^2.0