PHPackages                             interswitch/laravel-interswitch - 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. [Payment Processing](/categories/payments)
4. /
5. interswitch/laravel-interswitch

ActiveLibrary[Payment Processing](/categories/payments)

interswitch/laravel-interswitch
===============================

This package simplifies the integration of Quickteller Business

v1.1.4(4y ago)31.0k5[1 issues](https://github.com/techquest/isw-laravel-sdk/issues)[1 PRs](https://github.com/techquest/isw-laravel-sdk/pulls)MITPHP

Since Mar 26Pushed 3y ago7 watchersCompare

[ Source](https://github.com/techquest/isw-laravel-sdk)[ Packagist](https://packagist.org/packages/interswitch/laravel-interswitch)[ RSS](/packages/interswitch-laravel-interswitch/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (16)Used By (0)

laravel-interswitch
===================

[](#laravel-interswitch)

[![Issues](https://camo.githubusercontent.com/f903226852c0e566db4e7bf40fe9fe8b20cf2359ce7d7b20c9b2058f649bc36c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f7465636871756573742f6973772d6c61726176656c2d73646b)](https://github.com/techquest/isw-laravel-sdk/issues)[![Forks](https://camo.githubusercontent.com/f79c2808defc030fe394bbd8b233ba93c16c489b6edff608a36416660542ef21/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f7465636871756573742f6973772d6c61726176656c2d73646b)](https://github.com/techquest/isw-laravel-sdk/network/members)[![Stars](https://camo.githubusercontent.com/4f0579a2bb1f36f469e9741f140b2ed0307ab33bfafb0d796b65152ac5ddb7a3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f7465636871756573742f6973772d6c61726176656c2d73646b)](https://github.com/techquest/isw-laravel-sdk/stargazers)

> Interswitch's official laravel package to easily integrate to Quickteller Business to collect payments. To begin, create an account at  if you haven't already.

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

[](#installation)

[PHP](https://php.net) 7.2+ and [Composer](https://getcomposer.org) are required.

To get the latest version of Laravel Interswitch, simply require it like so:

```
composer require interswitch/laravel-interswitch
```

Once installed, the package automatically registers its service provider and facade.

Configuration
-------------

[](#configuration)

You can publish the configuration file using this command:

```
php artisan vendor:publish --provider="Interswitch\Interswitch\InterswitchServiceProvider"
```

A configuration file 'interswitch.php' with some defaults is placed in your config directory.

Payment Flow
------------

[](#payment-flow)

The payment flow is described below:

1. User clicks a button to make payment, the user is redirected to the payment page, usually by submitting a form with hidden fields.
2. On the payment page, there are multiple payment options:

- **Card Option:** The user enters card details and follows the prompt.
- **Transfer(Virtual Accounts) Option:** The user can pay via a bank transfer either using their financial/bank app or USSD to the dynamic account number displayed to complete the transaction.
- **QR Option:** The user can scan the QR displayed on the payment page using their bank app to complete the transaction.
- **USSD Option:**
    - The user selects a bank
    - A USSD code is generated
    - User types the USSD code on their mobile device and follows the prompt.
- **Verve Wallet:** The user can login to their verve wallet if they have one.

3. The user gets a prompt indicating a successful or a failed transaction.

Usage
-----

[](#usage)

### Environments

[](#environments)

Quickteller Business provides a test and a live environment.
The test environment allows you to test your integration without actually charging any bank account.
After successfully testing your integration, you can easily switch to the live environment (after all required documents have been uploaded).

For the test environment, in your .env file, add:

```
INTERSWITCH_ENV=TEST
```

For the live environment, in your .env file, add:

```
INTERSWITCH_ENV=LIVE
```

If none is present, the test environment is assummed by default.

Furthermore, you need to add the following environment variables:

```
INTERSWITCH_REDIRECT_URL=
INTERSWITCH_PAY_ITEM_ID=
INTERSWITCH_MERCHANT_CODE=
```

The **INTERSWITCH\_REDIRECT\_URL** is the endpoint you will like to get the status of a transaction. Also define this route in your route file and make a call to **confirmTransaction()** like so:

```
use Interswitch\Interswitch\Facades\Interswitch;

...

Interswitch::confirmTransaction();
```

To get your **INTERSWITCH\_PAY\_ITEM\_ID** and **INTERSWITCH\_MERCHANT\_CODE**, visit

### Sample Payment Form

[](#sample-payment-form)

#### - Create Payment View

[](#--create-payment-view)

Create your view like so:
NOTE: The form must be submitted to **interswitch-pay** using post method.

```

        Pay Now

```

**Note: 'amount' field must be in kobo**

#### - Supported parameters

[](#--supported-parameters)

Below is a list of all the supported parameters. These parameters can be added in your form:

ParametersData TypeRequiredDescriptioncustomerEmailstringtrueThe email of the person making the payment.amountstringtrueThe cost of the item being paid for in kobo.transactionReferencestringtrueThis is a unique reference string required for every transaction. You can create a method to generate this.currencystringfalseThe ISO code of the currency being used. If this field is not added, the currency naira is assumed.customerNamestringfalseThe name of the person making the payment.customerIDstringfalseThe ID of the person making the payment.payItemNamestringfalseThe name of the item being paid for.#### - Further Steps:

[](#--further-steps)

- Click the 'Pay Now' button and follow the required steps.
- Note that the form is submitted to the route 'interswitch-pay', this is predefined in the package.
- On clicking the 'Pay Now' button, the user is redirected to interswitch's payment page. Choose a payment option and follow the steps.
- The user is then redirected back to your website as indicated by 'INTERSWITCH\_REDIRECT\_URL'.
- This url will return the result of the transaction. Sample response will be like so:

```
{
"transactionReference": "y84KWu1617176725",
"responseCode": "00",
"responseDescription": "Approved by Financial Institution",
"paymentReference": "FBN|WEB|MX26070|31-03-2021|3511400|927085",
"returnedReference": "1287984345",
"cardNumber": "",
"approvedAmount": "15000",
"amount": "15000",
"mac": ""
}
```

#### Note:

[](#note)

- **Please ensure APP\_URL is correctly defined. A wrong value will result in unexpected behaviour.**
- To get a list of test cards, visit:

#### - Handling the Response

[](#--handling-the-response)

For integrity purpose, you need to make a server side request to get the final status of a transaction before giving value. To do this, make a call to **confirmTransaction(transactionReference, amount)** like so:

```
use Interswitch\Interswitch\Facades\Interswitch;

...

Interswitch::confirmTransaction(transactionReference, amount);
```

It returns a JSON object containing the status of the transaction. Consider the sample response below:

```
{
"paymentReference": "FBN|WEB|MX26070|31-03-2021|3511400|927085",
"responseCode": "00",
"responseDescription": "Approved by Financial Institution",
"amount": "15000",
"transactionDate": "2021-03-31T08:45:31",
"merchantReference": "y84KWu1617176725"
}
```

Below is a description of the response keys:

KeyMeaningresponseCodeA code indicating the status of the transaction.responseDescriptionThis gives a full description of the transaction statusamountThis indicates the total amount transacted in kobo.paymentReferenceIndicates the transaction reference generated by the payment gateway.merchantReferenceIndicates the transaction reference provided by you.transactionDateShows the date and time the transaction took place.There are quite a number of response codes that can be returned, the full list can be viewed [here](https://sandbox.interswitchng.com/docbase/docs/webpay/response-codes/)

### Live Environment

[](#live-environment)

**To go live,**

- Switch to the live environment on your Quickteller Business dashboard by clicking the 'switch' button at the top right corner of the dashboard.
- Replace **INTERSWITCH\_PAY\_ITEM\_ID** and **INTERSWITCH\_MERCHANT\_CODE** with the new values.
- Also add the following to **.env**:

```
INTERSWITCH_ENV=LIVE
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

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

Every ~9 days

Recently: every ~31 days

Total

15

Last Release

1795d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/42927752f8296e7e43d399d9b0a3bad1928bfe1cff10e4d28dd747fca14d2f20?d=identicon)[interswitch](/maintainers/interswitch)

---

Top Contributors

[![toyosi12](https://avatars.githubusercontent.com/u/26188489?v=4)](https://github.com/toyosi12 "toyosi12 (44 commits)")[![fizo07](https://avatars.githubusercontent.com/u/2125846?v=4)](https://github.com/fizo07 "fizo07 (6 commits)")

### Embed Badge

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

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

###  Alternatives

[msilabs/bkash

bKash Payment Gateway API for Laravel Framework.

181.2k](/packages/msilabs-bkash)[binkode/laravel-paystack

A description for laravel-paystack.

112.1k](/packages/binkode-laravel-paystack)

PHPackages © 2026

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