Skip to content

Flutterwave

Flutterwave provides hosted checkout and a collection of payment, payout, subscription, and account-management operations. Resolve it with Payment::driver('flutterwave') or set PAYMENT_GATEWAY=flutterwave.

Setup

FLUTTERWAVE_PUBLIC_KEY=FLWPUBK_TEST-...
FLUTTERWAVE_SECRET_KEY=FLWSECK_TEST-...
FLUTTERWAVE_ENCRYPTION_KEY=your_encryption_key
FLUTTERWAVE_CALLBACK_URL=https://example.com/payment/callback
FLUTTERWAVE_WEBHOOK_SECRET=your_webhook_secret

The API base defaults to https://api.flutterwave.com/v3. Configure the webhook in your Flutterwave dashboard to call https://example.com/webhooks/payment-gateways/flutterwave.

Hosted checkout

use Alphabalex\PaymentMadeEasy\Facades\Payment;

$driver = Payment::driver('flutterwave');
$checkout = $driver->initializePayment([
    'email'        => 'customer@example.com',
    'amount'       => 5000.00,
    'currency'     => 'NGN',
    'name'         => 'Jane Doe',
    'phone'        => '+2348012345678',
    'reference'    => 'ORDER_123',
    'callback_url' => 'https://example.com/payment/callback',
    'metadata'     => ['order_id' => '123'],
]);

// Redirect to $checkout['data']['link']; verify after the customer returns.
$payment = $driver->verifyPayment('ORDER_123');

Amounts use major units in application code. The driver creates the provider transaction reference (tx_ref) from reference when supplied.

Package capabilities

The driver implements shared payment, subscription, disbursement, virtual-account, payment-link, customer, dispute, balance, settlement, and charge-authorization contracts. It also provides provider-specific chargeback, beneficiary, payment-page, and transaction utility methods. Availability depends on the Flutterwave account and market.

Notable operations include chargeAuthorization, createVirtualAccount, createPaymentPage, listChargebacks, getBalanceByCurrency, createBeneficiary, and getTransactionFees; see the API reference for parameters and return shapes.

Webhooks and production

  • Verify the final status with the API or a verified webhook; do not fulfill an order solely because a customer returned to the callback URL.
  • Register POST /webhooks/payment-gateways/flutterwave and set the configured signing secret. See webhook verification.
  • Use test credentials in sandbox and keep secret/encryption keys out of client-side code.

See Flutterwave in the API reference for the complete method catalog. Related: payments · configuration · gateway directory.