Skip to content

Monnify

Monnify is a Nigeria-focused payment gateway with hosted checkout, bank-transfer virtual accounts, mandates, and merchant payout operations. The driver exchanges API key and secret credentials for an access token automatically.

Setup

MONNIFY_API_KEY=your_api_key
MONNIFY_SECRET_KEY=your_secret_key
MONNIFY_CONTRACT_CODE=your_contract_code
MONNIFY_WALLET_ACCOUNT_NUMBER=your_wallet_account_number
MONNIFY_BASE_URL=https://api.monnify.com
MONNIFY_CALLBACK_URL=https://example.com/payment/callback
MONNIFY_WEBHOOK_SECRET=your_webhook_secret

The wallet account number is used for transfers. Keep all credentials on the server. Configure POST /webhooks/payment-gateways/monnify in your Monnify dashboard.

Hosted checkout

use Alphabalex\PaymentMadeEasy\Facades\Payment;

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

// Redirect to the checkout URL in data.checkoutUrl.
// Verify using your merchant reference before fulfilling the order.
$payment = $driver->verifyPayment('ORDER_123');

Use major currency units in application code. The contract code is supplied through gateway configuration; payment_methods can limit the available methods (for example, ['CARD', 'ACCOUNT_TRANSFER']).

Virtual accounts and recurring payments

The shared virtual-account contract supports creating, reading, listing, and deactivating accounts. Provide the customer details and a unique reference; the contract code can be read from config('payment-gateways.gateways.monnify.contract_code').

Monnify subscriptions use Direct Debit mandates. Creation requires customer/bank information and mandate parameters such as mandate_type and frequency; the customer must complete the provider authorization process. The driver also supports charging stored card authorizations through chargeAuthorization().

Transfers and additional features

The driver implements shared disbursement, balance, settlement, and payment-link contracts. Transfers require the recipient account and bank code, a unique reference, a wallet account number, and a reason/narration. Merchant permissions and available balances apply.

Webhooks

Use the package endpoint POST /webhooks/payment-gateways/monnify, enable signature checks, and configure the webhook secret. Verify provider payment status before fulfillment. See webhook configuration.

The Monnify API reference section includes mandate, card authorization, virtual-account, transfer, and balance examples. Related: payments · configuration · gateway directory.