PHPackages                             monnify/monnify-laravel - 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. monnify/monnify-laravel

ActiveLibrary

monnify/monnify-laravel
=======================

A Laravel Monnify Package

1.0.0(1y ago)21.3k↓20%MITPHPPHP ^8.1

Since Apr 16Pushed 1y agoCompare

[ Source](https://github.com/Monnify/monnify-laravel)[ Packagist](https://packagist.org/packages/monnify/monnify-laravel)[ Docs](https://github.com/fredneutron/monnify-laravel)[ RSS](/packages/monnify-monnify-laravel/feed)WikiDiscussions main Synced 1mo ago

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

Laravel Monnify Package Documentation
=====================================

[](#laravel-monnify-package-documentation)

A Laravel package to effortlessly integrate the Monnify payment gateway API into your Laravel projects.

Installation
------------

[](#installation)

Install via Composer:

```
composer require monnify/monnify-laravel
```

Publish the configuration file:

```
php artisan vendor:publish --provider="Monnify\MonnifyLaravel\MonnifyServiceProvider"
```

Add environment variables (`.env`):

```
MONNIFY_API_KEY=your_api_key
MONNIFY_SECRET_KEY=your_secret_key
MONNIFY_CONTRACT_CODE=your_contract_code
MONNIFY_WALLET_ACCOUNT_NUMBER=your_wallet_number
MONNIFY_ACCOUNT_NUMBER=your_account_number
MONNIFY_ENVIRONMENT=SANDBOX # or LIVE
```

Quick Start
-----------

[](#quick-start)

Here's how to quickly initialize a payment transaction:

```
use Monnify\MonnifyLaravel\Facades\Monnify;

$data = [
    'amount' => 100.00,
    'customerName' => 'Jane Doe',
    'customerEmail' => 'jane@example.com',
    'paymentReference' => 'UNIQUE_REF_001',
    'paymentDescription' => 'Payment for Service',
    'currencyCode' => 'NGN',
    'contractCode' => config('monnify.contract_code'),
    'redirectUrl' => 'https://your-site.com/payment-confirmation',
    'paymentMethods' => ['CARD', 'ACCOUNT_TRANSFER'],
];

try {
    $response = Monnify::transactions()->initialise($data);
    return redirect($response['checkoutUrl']);
} catch (Exception $e) {
    // Handle error
    $errorMessage = $e->getMessage();
    // $e->status  // error status
    // $e->error  // error object
}
```

> This package throws exceptions for various error cases. Hence, wrapping your API calls in try-catch blocks.

Available Services
==================

[](#available-services)

This package provides the following services:

1. **Transaction Service**: Manage payments, authorizations, and statuses.
2. **Customer Reserved Account Service**: Create/manage virtual accounts.
3. **Invoice Service**: Generate and manage invoices.
4. **Disbursement Service**: Manage single and bulk fund transfers.
5. **Wallet Service**: Manage wallet creation, balances, and transactions.
6. **Verification Service**: Perform account, BVN, NIN verifications.
7. **Sub Account Service**: Create/manage sub-accounts for split payments.
8. **Refund Service**: Handle payment refunds.
9. **Settlement Service**: Settlement transaction handling.
10. **Limit Profile Service**: Manage transaction limits.
11. **Pay Code Service**: Generate and manage pay codes.
12. **Direct Debit Service**: Manage direct debit mandates.
13. **Recurring Payment Service**: Automate recurring payments.
14. **Helper Service**: Utility functions (fetch banks, etc).

Detailed Usage
==============

[](#detailed-usage)

Transaction Service
-------------------

[](#transaction-service)

The Transaction Service handles all payment-related operations.

### All Available Methods

[](#all-available-methods)

```
// Initialize a new transaction
Monnify::transactions()->initialise($data);

// Initialize bank transfer payment
Monnify::transactions()->payWithBankTransfer($data);

// Charge a card
Monnify::transactions()->chargeCard($data);

/* Card Authorization */

// Authorize with OTP
Monnify::transactions()->authorizeOTP($data);

// Authorize 3D secure card
Monnify::transactions()->authorizeThreeDSCard($data);

/* Transaction Information */

// Get all transactions
Monnify::transactions()->all();

// Get transaction status
Monnify::transactions()->status($transactionReference);

// Get status by reference
Monnify::transactions()->statusByReference($reference, $type);
```

Transaction Initialization
--------------------------

[](#transaction-initialization)

```
Monnify::transactions()->initialise($data);
```

**Required fields:** `amount`, `customerName`, `customerEmail`, `paymentReference`, `currencyCode`, `contractCode`, `redirectUrl`.

**Optional fields:** `paymentMethods`, `incomeSplitConfig`.

### Pay with Bank Transfer

[](#pay-with-bank-transfer)

Initializes a bank transfer payment.

```
Monnify::transactions()->payWithBankTransfer($data);
```

**Required Parameters:**

```
$data = [
    'amount' => 1000.00,
    'customerName' => 'John Doe',
    'customerEmail' => 'john@example.com',
    'paymentReference' => 'UNIQUE-REF-123',
    'currencyCode' => 'NGN',
    'contractCode' => 'CONTRACT-CODE'
];
```

### Charge Card

[](#charge-card)

Process a card payment.

```
Monnify::transactions()->chargeCard($data);
```

**Required Parameters:**

```
$data = [
    'transactionReference' => 'TRANS-REF-123', // string: Transaction reference
    'card' => [
        'number' => '5399********4444',        // string: Card number
        'expiryMonth' => '07',                 // string: Card expiry month
        'expiryYear' => '25',                  // string: Card expiry year
        'cvv' => '123'                         // string: Card CVV
    ]
];
```

### Authorize with OTP

[](#authorize-with-otp)

```
Monnify::transactions()->authorizeOTP($data);
```

**Required Parameters:**

```
$data = [
    'transactionReference' => 'TRANS-REF-123',
    'otp' => '123456'
];
```

### Authorize 3D secure card

[](#authorize-3d-secure-card)

```
Monnify::transactions()->authorizeThreeDSCard($data);
```

**Required Parameters:**

```
$data = [
    'transactionReference' => 'TRANS-REF-123',
    'authorizationCode' => 'AUTH-CODE-123'
];
```

### Get Transaction Status

[](#get-transaction-status)

```
Monnify::transactions()->status($transactionReference);
```

**Parameters:**

- `$transactionReference` (string): The transaction reference to check

### Get Status by Reference

[](#get-status-by-reference)

Check transaction status using different reference types.

```
Monnify::transactions()->statusByReference($reference, $referenceType);
```

**Parameters:**

- `$reference` (string): The reference number
- `$referenceType` (string): Either 'transaction' or 'payment' (default: 'transaction')

Customer Reserved Account Service
---------------------------------

[](#customer-reserved-account-service)

Manages reserved account operations.

### All Available Methods

[](#all-available-methods-1)

```
// Create general account
Monnify::customerReservedAccount()->createGeneralAccount($data);

// Create invoice account
Monnify::customerReservedAccount()->createInvoiceAccount($data);

// Get account details
Monnify::customerReservedAccount()->get($accountReference);

// Add linked accounts
Monnify::customerReservedAccount()->addLinkedAccounts($ref, $data);

// Remove account
Monnify::customerReservedAccount()->deallocateAccount($ref);

/** Account Updates **/

// Update BVN
Monnify::customerReservedAccount()->updateBVN($ref, $bvn);

// Update KYC info
Monnify::customerReservedAccount()->updateKYCInfo($ref, $data);

// Update payment sources
Monnify::customerReservedAccount()->allowedPaymentSource($ref, $data);

// Update split config
Monnify::customerReservedAccount()->updateSplitConfig($ref, $data);

/** Transaction Information **/

 // Get transactions
Monnify::customerReservedAccount()->transactions($ref, $params);
```

### Create General Account

[](#create-general-account)

Creates a new reserved general account.

```
Monnify::customerReservedAccount()->createGeneralAccount($data);
```

**Required Parameters:**

```
$data = [
    'accountReference' => 'ACC-REF-123',    // string: Unique account reference
    'accountName' => 'John Doe',            // string: Account holder name
    'currencyCode' => 'NGN',                // string: Currency code
    'contractCode' => 'CONTRACT-CODE',       // string: Your contract code
    'customerEmail' => 'john@example.com',   // string: Customer email
    'customerName' => 'John Doe',           // string: Customer name
    'getAllAvailableBanks' => true          // boolean: Get all available banks
];
```

**Optional Parameters:**

```
$data['preferredBanks'] = ['035', '058'];  // array: Preferred bank codes
$data['restrictPaymentSource'] = true;      // boolean: Restrict payment sources
$data['allowedPaymentSource'] = [           // array: Allowed payment sources
    'bvns' => ['12345678901']
];
$data['incomeSplitConfig'] = [              // array: Split payment configuration
    [
        'subAccountCode' => 'SUB-ACC-123',
        'feePercentage' => 1.5,
        'splitPercentage' => 30.0,
        'feeBearer' => true
    ]
];
```

### Create Invoice Account

[](#create-invoice-account)

Creates a new reserved invoice account.

```
Monnify::customerReservedAccount()->createInvoiceAccount($data);
```

**Required Parameters:**

```
$data = [
    'contractCode' => 'your_contract_code',
    'accountName' => 'Account Name',
    'currencyCode' => 'NGN',
    'accountReference' => 'unique_reference',
    'customerEmail' => 'customer@email.com',
    'reservedAccountType' => 'INVOICE'
];
```

**Optional Parameters:**

```
$data['customerName'] = 'Customer Name';
$data['bvn'] = '12345678901';
$data['nin'] = '000000009090897878'
```

### Get Account Details

[](#get-account-details)

Get the full reserved account detail.

```
Monnify::customerReservedAccount()->get($accountReference);
```

**Parameters:**

- `$accountReference` (string): The reference of the main account

### Add Linked Accounts

[](#add-linked-accounts)

Add additional accounts to a reserved account.

```
Monnify::customerReservedAccount()->addLinkedAccounts($accountReference, $data);
```

**Parameters:**

- `$accountReference` (string): The reference of the main account
- `$data` (array): Linked accounts configuration

```
$data = [
    'accountNames' => [
        [
            'preferredName' => 'Business Account',
            'accountName' => 'John Doe Business'
        ]
    ],
    'getAllAvailableBanks' => true,
    'preferredBanks' => ['035'] // Optional
];
```

### Deallocate Account

[](#deallocate-account)

```
Monnify::customerReservedAccount()->deallocateAccount($accountReference);
```

**Parameters:**

- `$accountReference` (string): The reference of the main account

### Update the BVN for a reserved account.

[](#update-the-bvn-for-a-reserved-account)

```
Monnify::customerReservedAccount()->updateBVN($accountReference, $bvn);
```

**Parameters:**

- `$accountReference` (string): Account reference
- `$bvn` (string): Bank Verification Number

### Update the KYC Info for a reserved account.

[](#update-the-kyc-info-for-a-reserved-account)

```
Monnify::customerReservedAccount()->updateKYCInfo($accountReference, $data);
```

**Parameters:**

- `$accountReference` (string): Account reference
- `$data` (array): KYC info (BVN, NIN or both)

```
$data = [
    'bvn' => '21212121212',
    'nin' => ''
];
```

### Allowed Payment Source

[](#allowed-payment-source)

```
Monnify::customerReservedAccount()->allowedPaymentSource($accountReference, $data);
```

**Parameters:**

- `$accountReference` (string): Account reference
- `$data` (array): payment source setttings

```
$data = [
    'restrictPaymentSource' => true,
    'allowedPaymentSources' => [
    	'bvns' => [
        	'21212121212',
        	'20202020202'
        ]
    ]
];
```

### Update Split Config for a reserved account.

[](#update-split-config-for-a-reserved-account)

```
Monnify::customerReservedAccount()->updateSplitConfig($accountReference, $data);
```

**Parameters:**

- `$accountReference` (string): Account reference
- `$data` (array): split configs

```
$data = [
    [
    	'subAccountCode' => 'MFY_SUB_305040939040',
        'feePercentage' => 10.50
    ]
];
```

### Get Account Transactions

[](#get-account-transactions)

```
Monnify::customerReservedAccount()->transactions($accountReference, $parameters);
```

**Parameters:**

- `$accountReference` (string): Account reference
- `$parameters` (array): Optional parameters

```
$parameters = [
    'page' => 0,     // integer: Page number (default: 0)
    'size' => 10     // integer: Items per page (default: 10)
];
```

Invoice Service
---------------

[](#invoice-service)

Manage invoice creation and operations.

### All Available Methods

[](#all-available-methods-2)

```
// Create new invoice
Monnify::invoice()->create($data);

// Get invoice details
Monnify::invoice()->get($invoiceReference);

// Get all invoices
Monnify::invoice()->all();

// Cancel invoice
Monnify::invoice()->cancel($invoiceReference);

// Attach reserved account
Monnify::invoice()->attachReservedAccount($data);
```

### Create a new Invoice

[](#create-a-new-invoice)

```
Monnify::invoice()->create($data);
```

**Required Parameters:**

```
$data = [
    'amount' => 1000.00,                    // float: Invoice amount
    'customerName' => 'John Doe',           // string: Customer name
    'customerEmail' => 'john@example.com',  // string: Customer email
    'expiryDate' => '2024-12-31',          // string: Invoice expiry date
    'invoiceReference' => 'INV-123',        // string: Unique invoice reference
    'description' => 'Service payment',     // string: Invoice description
    'currencyCode' => 'NGN',               // string: Currency code
    'contractCode' => 'CONTRACT-CODE'       // string: Your contract code
];
```

### Get Invoice Details

[](#get-invoice-details)

Retrieve details of a specific invoice.

```
Monnify::invoice()->get($invoiceReference);
```

**Parameters:**

- `$invoiceReference` (string): The invoice reference to retrieve

### Retrieve all invoices.

[](#retrieve-all-invoices)

```
Monnify::invoice()->all();
```

### Cancel an existing invoice.

[](#cancel-an-existing-invoice)

```
Monnify::invoice()->cancel($invoiceReference);
```

**Parameters:**

- `$invoiceReference` (string): The invoice reference to cancel

### Attach a reserved account to an existing invoice.

[](#attach-a-reserved-account-to-an-existing-invoice)

```
Monnify::invoice()->cancel($invoiceReference);
```

**Required Parameters:**

```
$data = [
    'amount' => '999',
    'invoiceReference' => '18389131823445',
    'accountReference' => 'reference---1290034',
    'description' => 'test invoice',
    'currencyCode' => 'NGN',
    'contractCode' => config('monnify.contract_code'),
    'customerEmail' => 'janedoe@gmail.com',
    'customerName' => 'Jane Doe',
    'expiryDate' => '2025-04-30 12:00:00'
];
```

**Optional Parameters:**

```
$data['incomeSplitConfig'] = [];  // array: income split config
$data['redirectUrl'] = 'https://your-website.com';
```

Disbursement Service
--------------------

[](#disbursement-service)

Handles money transfers and disbursements.

### All Available Methods

[](#all-available-methods-3)

```
// Single Transfers
Monnify::transfer()->single($data, $async);

// Authorize single transfer
Monnify::transfer()->authoriseSingle($data);

// Get single transfer status
Monnify::transfer()->singleStatus($reference);

// Bulk Transfer
Monnify::transfer()->bulk($data);

// Authorize bulk transfer
Monnify::transfer()->authoriseBulk($data);

// Get bulk status
Monnify::transfer()->bulkStatus($ref, $pageSize, $pageNumber);

// Get transactions
Monnify::transfer()->bulkTransaction($ref, $pageSize, $pageNumber);

/** Other Operations **/

// Resend OTP
Monnify::transfer()->resendOTP($reference);

// Get all transfers
Monnify::transfer()->all($type, $pageSize, $pageNumber);

// Search
Monnify::transfer()->search($accountNumber, $pageSize, $pageNumber);
```

### Single Transfer

[](#single-transfer)

Process a single money transfer.

```
Monnify::transfer()->single($data, $async = false);
```

**Required Parameters:**

```
$data = [
    'amount' => 1000.00,                    // float: Amount to transfer
    'reference' => 'TRANSFER-123',          // string: Unique transfer reference
    'narration' => 'Salary payment',        // string: Transfer description
    'destinationBankCode' => '058',         // string: Bank code
    'destinationAccountNumber' => '0123456789', // string: Account number
    'currency' => 'NGN',                    // string: Currency code
    'sourceAccountNumber' => '1234567890'   // string: Source account number
];
```

**Optional Parameters:**

- `$async` (boolean): Whether to process transfer asynchronously (default: false)

### Bulk Transfer

[](#bulk-transfer)

Process multiple transfers at once.

```
Monnify::transfer()->bulk($data);
```

**Required Parameters:**

```
$data = [
    'title' => 'Bulk Payments',             // string: Batch title
    'batchReference' => 'BULK-123',         // string: Unique batch reference
    'narration' => 'Monthly payments',      // string: Batch description
    'sourceAccountNumber' => '1234567890',  // string: Source account
    'onValidationFailure'  => 'CONTINUE',   // optional
    'notificationInterval' => 10,			// optional
    'transactions' => [                     // array: List of transfers
        [
            'amount' => 1000.00,
            'reference' => 'TRANSFER-1',
            'destinationBankCode' => '058',
            'destinationAccountNumber' => '0123456789',
            'narration' => 'Payment 1',
            'currency' => 'NGN'
        ],
        // More transactions...
    ]
];
```

### Authorize a transfer with OTP.

[](#authorize-a-transfer-with-otp)

```
Monnify::transfer()->authoriseSingle($data);  // For single transfer
Monnify::transfer()->authoriseBulk($data);    // For bulk transfer
```

**Required Parameters:**

```
$data = [
    'reference' => 'TRANSFER-123',  		// string: Transfer reference
    'authorizationCode' => '123456'         // string: OTP received
];
```

### Check Transfer Status

[](#check-transfer-status)

```
// Single transfer status
Monnify::transfer()->singleStatus($reference);
// Bulk transfer status
Monnify::transfer()->bulkStatus($batchReference, $pageSize = 10, $pageNumber = 0);
```

### Get Transaction

[](#get-transaction)

```
// Bulk transfer status
Monnify::transfer()->bulkTransaction($batchReference, $pageSize = 10, $pageNumber = 0);
```

### Other Operations

[](#other-operations)

```
// Resend OTP
Monnify::transfer()->resendOTP($reference);
// Get all transfers
Monnify::transfer()->all($type, $pageSize, $pageNumber);
// Search
Monnify::transfer()->search($accountNumber, $pageSize, $pageNumber);
```

**Parameters:**

- `$accountNumber` (string): Wallet account Number
- `$reference` (string): transaction reference
- `$type` (string): type of transaction (`single` or `bulk`)
- `$pageSize` (integer): Number of records per page (default: 10)
- `$pageNumber` (integer): Page number (default: 0)

Wallet Service
--------------

[](#wallet-service)

Manages wallet operations.

### All Available Methods

[](#all-available-methods-4)

```
// Create wallet
Monnify::wallet()->create($data);

// Get wallet details
Monnify::wallet()->get($customerEmail, $pageSize, $pageNumber);

// Get balance
Monnify::wallet()->balance($accountNumber);

// Get transactions
Monnify::wallet()->transactions($accountNumber, $pageSize, $pageNumber);
```

### Create Wallet

[](#create-wallet)

```
Monnify::wallet()->create($data);
```

**Required Parameters:**

```
$data = [
    'customerEmail' => 'john@example.com',  // string: Customer email
    'customerName' => 'John Doe',           // string: Customer name
    'accountNumber' => '0123456789',        // string: Account number
    'accountName' => 'John Doe',            // string: Account name
    'bvnDetails' =>  [
    	'bvn' =>  '22222222226',			// string: BVN
        'bvnDateOfBirth' =>  '1994-09-07'	// string: Date of Birth
    ],
];
```

### Get Wallet Details

[](#get-wallet-details)

```
Monnify::wallet()->get($customerEmail, $pageSize = 10, $pageNumber = 0);
```

**Parameters:**

- `$customerEmail` (string): Customer's email address
- `$pageSize` (integer): Number of records per page (default: 10)
- `$pageNumber` (integer): Page number (default: 0)

### Check Wallet Balance

[](#check-wallet-balance)

```
Monnify::wallet()->balance($accountNumber);
```

**Parameters:**

- `$accountNumber` (string): Wallet account number

### Get Wallet transactions

[](#get-wallet-transactions)

```
Monnify::wallet()->transactions($accountNumber, $pageSize, $pageNumber);
```

**Parameters:**

- `$accountNumber` (string): Wallet account number
- `$pageSize` (integer): Number of records per page (default: 10)
- `$pageNumber` (integer): Page number (default: 0)

Verification Service
--------------------

[](#verification-service)

### All Available Methods

[](#all-available-methods-5)

```
// Verify account
Monnify::verificationAPI()->bankAccount($accountNumber, $bankCode);
// Verify BVN
Monnify::verificationAPI()->bvnInformation($data);
// Match BVN
Monnify::verificationAPI()->matchBVNAndBankAccount($bvn, $bankCode, $accountNumber);
// Verify NIN
Monnify::verificationAPI()->nin($nin);
```

### Verify Bank Account

[](#verify-bank-account)

```
Monnify::verificationAPI()->bankAccount($accountNumber, $bankCode);
```

**Required Parameters:**

- `$accountNumber` (string): Account number to verify
- `$bankCode` (string): Bank code

### Verify BVN Information

[](#verify-bvn-information)

```
Monnify::verificationAPI()->bvnInformation($data);
```

**Required Parameters:**

```
$data = [
    'bvn' => '12345678901',           // string: BVN to verify
    'name' => 'John Doe',             // string: Name to match
    'dateOfBirth' => '1990-01-01'     // string: Date of birth (YYYY-MM-DD)
    'mobileNo' => '08142223149'		  // string: mobile number
];
```

### Match BVN with Bank Account

[](#match-bvn-with-bank-account)

```
Monnify::verificationAPI()->matchBVNAndBankAccount($bvn, $bankCode, $accountNumber);
```

**Required Parameters:**

- `$bvn` (string): BVN to match
- `$bankCode` (string): Bank code
- `$accountNumber` (string): Account number

### Verify NIN

[](#verify-nin)

```
Monnify::verificationAPI()->nin($nin);
```

Sub Account Service
-------------------

[](#sub-account-service)

Manages sub-accounts for split payments.

### All Available Methods

[](#all-available-methods-6)

```
// Create sub account
Monnify::subAccount()->create($data);
// Get all sub accounts
Monnify::subAccount()->all();
// Update sub account
Monnify::subAccount()->update($data);
// Delete sub account
Monnify::subAccount()->delete($subAccountCode);
```

### Create Sub Account

[](#create-sub-account)

Creates a new sub-account for split payments.

```
Monnify::subAccount()->create($data);
```

**Required Parameters:**

```
$data = [
    'bankCode' => '058',              // string: Bank code
    'accountNumber' => '0123456789',  // string: Account number
    'email' => 'sub@example.com',     // string: Sub-account email
    'currencyCode' => 'NGN'           // string: Currency code (NGN, USD, etc.)
    'defaultSplitPercentage' => 20.87 // integer: split percentage
];
```

### Get All Sub Accounts

[](#get-all-sub-accounts)

Retrieves all sub-accounts associated with your contract.

```
Monnify::subAccount()->all();
```

### Update Sub Account

[](#update-sub-account)

Updates an existing sub-account's details.

```
Monnify::subAccount()->update($data);
```

**Required Parameters:**

```
$data = [
    'subAccountCode' => 'SUB-ACC-123',  // string: Sub account code
    'bankCode' => '058',                // string: New bank code
    'accountNumber' => '0123456789',    // string: New account number
    'email' => 'sub@example.com',       // string: New email
    'currencyCode' => 'NGN'             // string: Currency code
    'defaultSplitPercentage' => 20.87   // integer: split percentage
];
```

### Delete Sub Account

[](#delete-sub-account)

Removes a sub-account from your contract.

```
Monnify::subAccount()->delete($subAccountCode);
```

**Required Parameters:**

- `$subAccountCode` (string): The unique code of the sub-account to delete

Refund Service
--------------

[](#refund-service)

### All Available Methods

[](#all-available-methods-7)

```
// Initialize a refund
Monnify::refund()->initialise($data);
// Get all refunds
Monnify::refund()->all($pageSize, $pageNumber);
// Check refund status
Monnify::refund()->status($refundReference);
```

### Initialize Refund

[](#initialize-refund)

Creates a new refund request.

```
Monnify::refund()->initialise($data);
```

**Required Parameters:**

```
$data = [
    'transactionReference' => 'TRANS-123',  // string: Original transaction reference
    'refundReference' => 'REFUND-123',      // string: Unique refund reference
    'refundReason' => 'Customer request',   // string: Refund reason
    'refundAmount' => 1000.00,              // float: Amount to refund
    'customerNote' => 'An optional note',   // string: customer side note
];
```

### Get Refund Status

[](#get-refund-status)

Check the status of a specific refund.

```
Monnify::refund()->status($refundReference);
```

**Parameters:**

- `$refundReference` (string): Refund reference to check

### Get All Refunds

[](#get-all-refunds)

Retrieves all refunds with pagination.

```
Monnify::refund()->all($pageSize = 10, $pageNumber = 0);
```

**Optional Parameters:**

- `$pageSize` (integer): Number of records per page (default: 10)
- `$pageNumber` (integer): Page number (default: 0)

Settlement Service
------------------

[](#settlement-service)

Manages settlement information and transactions.

### All Available Methods

[](#all-available-methods-8)

```
// Get settlement transactions
Monnify::settlements()->transactions($settlementReference, $pageSize, $pageNumber);
 // Get by transaction reference
Monnify::settlements()->getByTransaction($transactionReference);
```

### Get Settlement Transactions

[](#get-settlement-transactions)

Retrieves transactions for a specific settlement.

```
Monnify::settlements()->transactions($settlementReference, $pageSize = 10, $pageNumber = 0);
```

**Required Parameters:**

- `$settlementReference` (string): Settlement reference to query

**Optional Parameters:**

```
$pageSize = 10;    // integer: Number of records per page
$pageNumber = 0;   // integer: Page number for pagination
```

### Get Settlement by Transaction

[](#get-settlement-by-transaction)

Retrieves settlement details for a specific transaction.

```
Monnify::settlements()->getByTransaction($transactionReference);
```

**Required Parameters:**

- `$transactionReference` (string): Transaction reference to query

Limit Profile Service
---------------------

[](#limit-profile-service)

Manages transaction limits.

### All Available Methods

[](#all-available-methods-9)

```
// Get all profiles
Monnify::limitProfile()->all();
// Create profile
Monnify::limitProfile()->create($data);
// Update profile
Monnify::limitProfile()->update($limitProfileCode, $data);
// Reserve account
Monnify::limitProfile()->reserveAccount($data);
// Update account reserved account with Limit profile
Monnify::limitProfile()->updateReserveAccount($accountRef, $limitProfileCode);
```

### Get All Limit Profiles

[](#get-all-limit-profiles)

```
Monnify::limitProfile()->all();
```

Create Limit Profile
--------------------

[](#create-limit-profile)

```
Monnify::limitProfile()->create($data);
```

**Required Parameters:**

```
$data = [
    'limitProfileName' => 'Basic Tier',     // string: Profile name
    'dailyTransactionLimit' => 1000000,     // float: Daily limit
    'dailyTransactionVolume' => 100,        // integer: Daily transaction count
    'singleTransactionLimit' => 100000      // float: Single transaction limit
];
```

### Update Limit Profile

[](#update-limit-profile)

```
Monnify::limitProfile()->update($limitProfileCode, $data);
```

**Parameters:**

- `$limitProfileCode` (string): Profile code to update
- `$data` (array): New limit settings (same structure as create)

### Reserve Account with Limit

[](#reserve-account-with-limit)

Creates a reserved account with specific limits.

```
Monnify::limitProfile()->reserveAccount($data);
```

**Required Parameters:**

```
$data = [
    'accountReference' => 'ACC-REF-123',    // string: Account reference
    'limitProfileCode' => 'LIMIT-123',      // string: Limit profile code
    'contractCode' => config('monnify.contract_code'),	// string: Contract code
    'accountName' => "Kan Yo' Reserved with Limit",		// string: Account Name
];
```

### Update Reserved Account with Limit Profile

[](#update-reserved-account-with-limit-profile)

```
Monnify::limitProfile()-updateReserveAccount($accountReference, $limitProfileCode);
```

Pay Code Service
----------------

[](#pay-code-service)

Manages payment codes.

### All Available Methods

[](#all-available-methods-10)

```
// Create pay code
Monnify::payCodeAPI()->create($data);
// Get pay code details
Monnify::payCodeAPI()->get($payCodeReference);
// Get unmasked pay code
Monnify::payCodeAPI()->getUnMasked($payCodeReference);
// Get pay code history
Monnify::payCodeAPI()->history($parameters);
// Delete pay code
Monnify::payCodeAPI()->delete($payCodeReference);
```

### Create Pay Code

[](#create-pay-code)

```
Monnify::payCodeAPI()->create($data);
```

**Required Parameters:**

```
$data = [
    'amount' => 1000.00,                    // float: Amount
    'paycodeReference' => 'PAYCODE-123',    // string: Unique reference
    'beneficiaryName' => 'John Doe',        // string: Beneficiary name
    'clientId' => 'sEYUG-123',  			// string: Client Id
    'expiryDate' => '2024-12-31'            // string: Expiry date
];
```

### Get Pay Code Details

[](#get-pay-code-details)

Retrieve the full detail of a payment code

```
Monnify::payCodeAPI()->get($payCodeReference);
```

### Get Pay Code Details with Pay Code Unmasked

[](#get-pay-code-details-with-pay-code-unmasked)

Retrieve the full detail of a payment code Unmasked

```
Monnify::payCodeAPI()->getUnMasked($payCodeReference);
```

### Get Pay Code History

[](#get-pay-code-history)

Retrieves history of payment codes.

```
Monnify::payCodeAPI()->history($parameters);
```

**Parameters:**

```
$parameters = [
	'transactionReference' => '', // string: Transaction Reference
    'beneficiaryName' => '',	 // string: Beneficiary Name
    'transactionStatus' => '',	 // string: Transaction status
    'from' => '',				 // string: Start date (YYYY-MM-DD)
    'to' => ''					 // string: End date (YYYY-MM-DD)
];
```

### Delete a payment code

[](#delete-a-payment-code)

```
Monnify::payCodeAPI()->delete($payCodeReference);
```

Direct Debit Service
--------------------

[](#direct-debit-service)

Manages direct debit mandates.

### All Available Methods

[](#all-available-methods-11)

```
// Create mandate
Monnify::directDebitMandate()->create($data);
// Get mandate details
Monnify::directDebitMandate()->get($mandateReference);
// Debit mandate
Monnify::directDebitMandate()->debit($data);
// Get mandate status
Monnify::directDebitMandate()->status($paymentReference);
// Cancel mandate
Monnify::directDebitMandate()->cancel($mandateCode);
```

### Create Mandate

[](#create-mandate)

```
Monnify::directDebitMandate()->create($data);
```

**Required Parameters:**

```
$data = [
    'contractCode' => config('monnify.contract_code'),
    'mandateReference' => 'unique_ref3_02s600972',
    'customerName' => 'Ankit Kushwaha',
    'customerPhoneNumber' => '1234567890',
    'customerEmailAddress' => 'ankit.kushwaha@gmail.com',
    'customerAddress' => '123 Example Street, City, Country',
    'customerAccountNumber' => '0051762787',
    'customerAccountBankCode' => '058',
    'mandateDescription' => 'Subscription Fee',
    'mandateStartDate' => '2024-05-22T10:15:30',
    'mandateEndDate' => '2025-05-22T10:15:30'
];
```

**Optional Parameters:**

```
	'autoRenew' => false,
    'customerCancellation' => true,
    'customerAccountName' => 'Ankit Kushwaha',
```

### Get Mandate Details

[](#get-mandate-details)

Get full detail of a mandate payment.

```
Monnify::directDebitMandate()->get($mandateReference);
```

**Required Parameters:**

- `$mandateReference` (string): Mandate reference

### Debit Mandate

[](#debit-mandate)

Executes a debit on an existing mandate.

```
Monnify::directDebitMandate()->debit($data);
```

**Required Parameters:**

```
$data = [
    'mandateCode' => 'MANDATE-123',    // string: Mandate code
    'amount' => 1000.00,                    // float: Amount to debit
    'paymentReference' => 'PAYMENT-123',    // string: Unique payment reference
    'narration' => 'Monthly subscription'   // string: Transaction description
    'customerEmail' =>'ahsan.saleem@gmail.com' // string: Cunstomer Email
];
```

### Get Mandate Status

[](#get-mandate-status)

Checks the status of a mandate payment.

```
Monnify::directDebitMandate()->status($paymentReference);
```

**Required Parameters:**

- `$paymentReference` (string): Payment reference to check

### Cancel Mandate Payment

[](#cancel-mandate-payment)

```
Monnify::directDebitMandate()->cancel($mandateCode);
```

**Required Parameters:**

- `$mandateCode` (string): Mandate code

Recurring Payment Service
-------------------------

[](#recurring-payment-service)

### All Available Methods

[](#all-available-methods-12)

```
// Charge card using token
Monnify::recurringPayment()->chargeCardToken($data);
```

### Charge Card Token

[](#charge-card-token)

```
Monnify::recurringPayment()->chargeCardToken($data);
```

**Required Parameters:**

```
$data = [
    'cardToken' => 'MNFY_0CD0138B45F7C3EC6D3698969',
    'amount' => 20,
    'customerEmail' => 'benjikali29@gmail.com',
    'paymentReference' => '1642776mml0068n2937',
    'contractCode' => config('monnify.contract_code'),
    'apiKey' => config('monnify.api_key'),
];
```

**Optional Parameters:**

```
	'customerName' => 'Marvelous Benji',
    'paymentDescription' => 'Paying for Product A',
    'currencyCode' => 'NGN',
    'incomeSplitConfig' => [],
    'metaData' => [
    	'ipAddress' => '127.0.0.1',
        'deviceType' => 'mobile'
    ]
```

Other / Helper Service
----------------------

[](#other--helper-service)

Provides utility functions.

### All Available Methods

[](#all-available-methods-13)

```
// Get all banks
Monnify::helper()->banks();

// Get banks with USSD
Monnify::helper()->banksWithUSSD();
```

Error Handling
--------------

[](#error-handling)

Wrap API calls in try-catch blocks to handle exceptions efficiently:

```
try {
    $response = Monnify::transactions()->initialise($data);
} catch (Exception $e) {
    $error = $e->getMessage();
}
```

Testing
-------

[](#testing)

Run package tests with:

```
composer test
```

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

[](#contributing)

- Fork repository
- Create feature/fix branch
- Submit Pull Request

Credits
-------

[](#credits)

- [Babatunde Adelabu](https://github.com/fredneutron)
- [Aransiola Ayodele](https://github.com/CodeLeom)

License
-------

[](#license)

This package is licensed under the [MIT License](LICENSE.md).

Support
-------

[](#support)

For any support or security issues, please contact .

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance47

Moderate activity, may be stable

Popularity21

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.1% 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

Unknown

Total

1

Last Release

398d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/548cab71640e5e369f82a0652a9e96a38bb61b408af16e45d0497ee561309c45?d=identicon)[monnify-integration](/maintainers/monnify-integration)

---

Top Contributors

[![fredneutron](https://avatars.githubusercontent.com/u/11753868?v=4)](https://github.com/fredneutron "fredneutron (39 commits)")[![CodeLeom](https://avatars.githubusercontent.com/u/36636824?v=4)](https://github.com/CodeLeom "CodeLeom (1 commits)")[![oresho](https://avatars.githubusercontent.com/u/92453774?v=4)](https://github.com/oresho "oresho (1 commits)")

---

Tags

laravel-monnifylaravel-packagepayment-gatewaypayment-integrationsdk-laravellaravelpayment gatewaymonnifyMonnify-laravel

### Embed Badge

![Health badge](/badges/monnify-monnify-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/monnify-monnify-laravel/health.svg)](https://phpackages.com/packages/monnify-monnify-laravel)
```

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)[tzsk/sms

A robust and unified SMS gateway integration package for Laravel, supporting multiple providers.

320244.3k6](/packages/tzsk-sms)[rahul900day/laravel-captcha

Different types of Captcha implementation for Laravel Application.

10715.9k](/packages/rahul900day-laravel-captcha)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[luigel/laravel-paymongo

A laravel wrapper for Paymongo API

7956.2k1](/packages/luigel-laravel-paymongo)

PHPackages © 2026

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