PHPackages                             rawahamid/laravel-fib-integration - 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. rawahamid/laravel-fib-integration

ActiveLibrary[Payment Processing](/categories/payments)

rawahamid/laravel-fib-integration
=================================

Laravel FIB Integration

v1.0.3(1y ago)162145MITPHPPHP &gt;=7.3

Since Apr 27Pushed 1y ago1 watchersCompare

[ Source](https://github.com/rawahamid/laravel-fib-integration)[ Packagist](https://packagist.org/packages/rawahamid/laravel-fib-integration)[ RSS](/packages/rawahamid-laravel-fib-integration/feed)WikiDiscussions main Synced 1mo ago

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

Laravel FIB Integration
=======================

[](#laravel-fib-integration)

Laravel integration for first iraqi bank payment

Features
--------

[](#features)

- Authentication
- Payment Creation
- Checking payment status
- Payment Cancellation

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

[](#installation)

You can install the package through Composer

```
composer require rawahamid/laravel-fib-integration
```

Then publish the config file of the package using the vendor publish command

```
php artisan vendor:publish --tag="fib"
```

Configuration variables
-----------------------

[](#configuration-variables)

All that is left to do is to define four env configuration variables inside `.env` file

```
FIB_ENVIRONMENT="stage"
FIB_CALLBACK_URL="https://localhost:8000/fib-callback-url"
FIB_CLIENT_ID="client-id"
FIB_CLIENT_SECRET="client-secret"
```

- `FIB_ENVIRONMENT` This value is the environment that you want to choose for FIB integration to your application
- `FIB_CALLBACK_URL` The callback url that FIB will send a POST request to when status of the created payment changes
- `FIB_CLIENT_ID` The account client id you use to authenticate the request determines whether the request is live mode or test mode
- `FIB_CLIENT_SECRET` The account client secret you use to authenticate the request determines whether the request is live mode or test mode

Usage
-----

[](#usage)

#### Payment Creation

[](#payment-creation)

```
use Rawahamid\FibIntegration\Payments\FibPayment;

$response = FibPayment::create(100);
```

Response structure

```
{
    "paymentId": "string",
    "readableCode": "string",
    "qrCode": "base64 string",
    "validUntil": "datetime",
    "personalAppLink": "link",
    "businessAppLink": "link",
    "corporateAppLink": "link"
}
```

- `paymentId` A unique identifier of the payment, used later to check the status.
- `readableCode` A payment code that the user can enter manually in case he cannot scan the QR code.
- `qrCode` A base64-encoded data URL of the QR code image that the user can scan with the FIB mobile app.
- `validUntil` an ISO-8601-formatted date-time string, representing a moment in time when the payment expires
- `personalAppLink` A link that the user can tap on his mobile phone to go to the corresponding payment screen in the FIB Personal app
- `businessAppLink` A link that the user can tap on his mobile phone to go to the corresponding payment screen in the FIB Business app
- `corporateAppLink` A link that the user can tap on his mobile phone to go to the corresponding payment screen in the FIB Corporate app

#### Payment Status

[](#payment-status)

```
use Rawahamid\FibIntegration\Payments\FibPayment;

$response = FibPayment::status('payment-uuid');
```

Response structure will be:

```
{
  "paymentId": "string",
  "status": "string",
  "validUntil": "string",
  "amount": {
    "amount": "number",
    "currency": "string"
  },
  "decliningReason": "string",
  "declinedAt": "string",
  "paidBy": {
    "name": "string",
    "iban": "string"
  }
}
```

- `paymentId` A unique identifier of the payment, used later to check the status.
- `status` one of these values: `PAID` | `UNPAID` | `DECLINED`
- `validUntil` an ISO-8601-formatted date-time string, representing a moment in time when the payment expires
- `amount` contains payment amount and its currency
- `decliningReason` can be nullable or one of these values `SERVER_FAILURE` | `PAYMENT_EXPIRATION` | `PAYMENT_CANCELLATION`
- `declinedAt` datetime that represents the time of payment decline
- `paidBy` is nullable object if the payment is still not paid but if paid will contain the name and iban of the user

#### Payment Cancel

[](#payment-cancel)

```
use Rawahamid\FibIntegration\Payments\FibPayment;

$response = FibPayment::cancel('payment-uuid');
```

response will be empty if success

IMPORTANT NOTE\*\*
------------------

[](#important-note)

In every request of these if the response is 500 mean the creation, status or cancellation request something wrong happened

License
-------

[](#license)

The FIB Integration package is open source software licensed under the [License MIT](https://choosealicense.com/licenses/mit/)

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

[](#contributing)

Contributions are always welcome!

Report &amp; Feedback
---------------------

[](#report--feedback)

If you face any problem feel free to contact me :) [rawahamid](mailto://rawahamid4321@gmail.com)

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~157 days

Total

4

Last Release

638d ago

PHP version history (2 changes)v1.0.0PHP &gt;=8.2

v1.0.1PHP &gt;=7.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/aa60e0afd9229a870628ac8ef69a23595d64c21cbe32cd6e965c46b16487ad16?d=identicon)[RawaHamid97](/maintainers/RawaHamid97)

---

Top Contributors

[![rawahamid](https://avatars.githubusercontent.com/u/27570598?v=4)](https://github.com/rawahamid "rawahamid (10 commits)")

---

Tags

laravellaravel-packagepaymentpayment-gatewayspayment-integrationphpintegrationFIBlaravel-fib-integration

### Embed Badge

![Health badge](/badges/rawahamid-laravel-fib-integration/health.svg)

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

PHPackages © 2026

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