- How do I install the abraham-flutterwave/laravel-payment package in Laravel?
- Install it with Composer by running composer require abraham-flutterwave/laravel-payment. Then publish the package config using php artisan vendor:publish --provider="Flutterwave\Payments\Providers\FlutterwaveServiceProvider". The package requires Flutterwave for Business API keys and PHP 7.3 or higher.
- Which PHP and Laravel versions are supported by this Flutterwave Laravel package?
- The package documentation lists PHP 7.3 or higher as the minimum requirement. It follows Laravel conventions with a service provider and config file, so it can be registered in typical Laravel application versions. If you run Laravel 10 or newer with PHP 8.1+, verify Composer dependencies such as Guzzle are compatible before upgrading.
- How do I configure Flutterwave API keys in a Laravel .env file?
- Add FLW_PUBLIC_KEY, FLW_SECRET_KEY, FLW_ENCRYPTION_KEY, and FLW_ENVIRONMENT to your .env file. Set FLW_ENVIRONMENT to development for testing and switch to your production value when going live. Business settings such as name, logo, and payment options can be adjusted in config/flutterwave.php.
- What payment methods can I collect with this package?
- It supports Flutterwave for Business v3 collections for card, account, mobile money, bank transfers, USSD, Barter, and NQR. You can offer multiple payment options from a Laravel checkout flow without building direct API calls for each method. Availability depends on your Flutterwave account settings and supported currencies.
- How do I publish the Flutterwave config file in Laravel?
- Run php artisan vendor:publish --provider="Flutterwave\Payments\Providers\FlutterwaveServiceProvider" after installing the package. This creates config/flutterwave.php where you can set business name, transaction prefix, logo, and other preferences. Environment variables from .env can override many of these values.
- Can this package handle Flutterwave webhooks in Laravel?
- The package focuses on simplifying calls to Flutterwave F4B v3 APIs and does not advertise built-in webhook handling. You can add a Laravel route or controller to receive Flutterwave webhooks and verify payloads according to Flutterwave documentation. For reliability, process webhook work in queued jobs and implement idempotency for repeated events.
- How should I handle failed payments and Flutterwave API errors in Laravel?
- Wrap package calls in try-catch blocks and map Flutterwave error responses to your own exceptions or Laravel HTTP exceptions. Use Laravel's retry helper or queued jobs for transient network or API failures. Log failures with context so you can reconcile transactions and notify customers appropriately.
- Is this package production-ready for high-volume Flutterwave payments?
- It provides a thin abstraction over Flutterwave F4B v3 APIs and follows Laravel service provider and config patterns. For production, add your own tests, error handling, monitoring, and retry logic because the package has limited test coverage. High-volume workloads should use Laravel queues and idempotent transaction handling.
- How do I test Flutterwave payments in a Laravel application?
- Use Flutterwave test keys and set FLW_ENVIRONMENT to development in your .env file. Exercise each collection method your app enables, such as card or bank transfer, and assert your application records the transaction status correctly. Add integration tests around your payment service and mock Flutterwave API responses for deterministic CI runs.
- What alternatives exist if I need multi-provider payments in Laravel?
- This package is specific to Flutterwave, so switching providers later would require replacing the integration or wrapping it behind your own payment interface. If multi-provider support is a requirement, consider a strategy or facade layer in your app and evaluate other Laravel payment packages or direct API clients. Laravel Cashier is an option for subscription billing with supported providers, not a Flutterwave replacement.