PHPackages                             azaharizaman/nexus-payment-bank - 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. azaharizaman/nexus-payment-bank

ActiveLibrary[Payment Processing](/categories/payments)

azaharizaman/nexus-payment-bank
===============================

Payment bank extension providing direct bank integrations for real-time payments, open banking (PSD2), and bank account verification

v0.1.0-alpha1(1mo ago)00MITPHPPHP ^8.3

Since May 5Pushed 1mo agoCompare

[ Source](https://github.com/azaharizaman/nexus-payment-bank)[ Packagist](https://packagist.org/packages/azaharizaman/nexus-payment-bank)[ RSS](/packages/azaharizaman-nexus-payment-bank/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (6)Versions (2)Used By (0)

Nexus PaymentBank
=================

[](#nexus-paymentbank)

**Version:** 0.1.0 **Status:** In Progress (see IMPLEMENTATION\_SUMMARY.md for details) **PHP:** ^8.3 **Extends:** `azaharizaman/nexus-payment`

Overview
--------

[](#overview)

`Nexus\PaymentBank` is an extension package for `Nexus\Payment` providing direct bank integrations for open banking (PSD2/Open Banking UK), real-time payments (RTP, FAST, SEPA Instant), and bank account verification services (Plaid, Yodlee, MX).

It provides a unified abstraction layer over various banking providers, handling connection lifecycles, account data retrieval, ownership verification, and payment initiation.

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

[](#installation)

```
composer require azaharizaman/nexus-payment-bank
```

Features
--------

[](#features)

- **Bank Connection Management**: Securely link and manage bank connections (OAuth2, Credentials).
- **Account Information**: Retrieve account details, balances, and transaction history.
- **Account Verification**: Verify account ownership via instant verification or micro-deposits.
- **Payment Initiation**: Initiate and track payments directly from bank accounts (PIS).
- **Security**: Built-in encryption for sensitive credentials using `Nexus\Crypto`.

Architecture
------------

[](#architecture)

This package follows the Nexus Monorepo architecture:

- **Contracts**: Define the behavior (`src/Contracts`).
- **Services**: Implement the business logic (`src/Services`).
- **Entities**: Rich domain models (`src/Entities`).
- **Providers**: Adapter pattern for external banking APIs (`src/Contracts/ProviderInterface`).

Usage
-----

[](#usage)

### 1. Managing Bank Connections

[](#1-managing-bank-connections)

Use `BankConnectionManagerInterface` to handle the lifecycle of a bank connection.

```
use Nexus\PaymentBank\Contracts\BankConnectionManagerInterface;

public function connect(BankConnectionManagerInterface $manager)
{
    // 1. Initiate connection flow
    $result = $manager->initiateConnection(
        providerName: 'plaid',
        tenantId: 'tenant-1',
        parameters: [
            'redirect_url' => 'https://app.example.com/callback',
            'scopes' => ['transactions', 'auth']
        ]
    );

    // Redirect user to the authorization URL from $result

    // 2. Complete connection after callback
    $connection = $manager->completeConnection(
        providerName: 'plaid',
        tenantId: 'tenant-1',
        callbackData: [
            'public_token' => 'public-token-from-callback',
            'institution_id' => 'ins_123'
        ]
    );
}
```

### 2. Retrieving Account Data

[](#2-retrieving-account-data)

Use `AccountServiceInterface` to fetch account information.

```
use Nexus\PaymentBank\Contracts\AccountServiceInterface;

public function showAccounts(AccountServiceInterface $service, string $connectionId)
{
    // Get all accounts for a connection
    $accounts = $service->getAccounts($connectionId);

    foreach ($accounts as $account) {
        echo $account->getName() . ': ' . $account->getBalance()->getAmount();
    }

    // Get transactions
    $transactions = $service->getTransactions(
        connectionId: $connectionId,
        accountId: $accounts[0]->getId(),
        startDate: new \DateTimeImmutable('-30 days'),
        endDate: new \DateTimeImmutable('now')
    );
}
```

### 3. Verifying Accounts

[](#3-verifying-accounts)

Use `VerificationServiceInterface` for KYC and ownership checks.

```
use Nexus\PaymentBank\Contracts\VerificationServiceInterface;

public function verify(VerificationServiceInterface $service, string $connectionId, string $accountId)
{
    // Instant verification (e.g., Plaid Identity)
    $verificationResult = $service->verifyOwnership($connectionId, $accountId, [
        'name' => 'John Doe',
        'email' => 'john@example.com'
    ]);

    // Micro-deposit verification
    $verificationId = $service->initiateMicroDeposits($connectionId, $accountId);

    // ... later ...
    $verified = $service->verifyMicroDeposits($connectionId, $verificationId, [0.12, 0.45]);
}
```

### 4. Initiating Payments

[](#4-initiating-payments)

Use `PaymentInitiationServiceInterface` for PIS (Payment Initiation Services).

```
use Nexus\PaymentBank\Contracts\PaymentInitiationServiceInterface;
use Nexus\PaymentBank\ValueObjects\Beneficiary;
use Nexus\Common\ValueObjects\Money;

public function pay(PaymentInitiationServiceInterface $service, string $connectionId, string $sourceAccountId)
{
    $beneficiary = new Beneficiary(
        name: 'Acme Corp',
        iban: 'GB82WEST12345698765432',
        bic: 'WESTGB21XXX',
        address: '123 Business St, London'
    );

    $result = $service->initiatePayment(
        connectionId: $connectionId,
        sourceAccountId: $sourceAccountId,
        beneficiary: $beneficiary,
        amount: Money::of(100, 'USD'),
        reference: 'INV-001'
    );

    // Check status
    $status = $service->getPaymentStatus($connectionId, $result->paymentId);
}
```

Testing
-------

[](#testing)

```
composer test
```

License
-------

[](#license)

MIT License. See [LICENSE](LICENSE) for details.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance93

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

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

36d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/117408?v=4)[Azahari Zaman](/maintainers/azaharizaman)[@azaharizaman](https://github.com/azaharizaman)

---

Top Contributors

[![azaharizaman](https://avatars.githubusercontent.com/u/117408?v=4)](https://github.com/azaharizaman "azaharizaman (14 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (14 commits)")

---

Tags

paymentBankERPpsd2Open Bankingreal-time-paymentsaccount-verification

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/azaharizaman-nexus-payment-bank/health.svg)

```
[![Health](https://phpackages.com/badges/azaharizaman-nexus-payment-bank/health.svg)](https://phpackages.com/packages/azaharizaman-nexus-payment-bank)
```

###  Alternatives

[shetabit/payment

Laravel Payment Gateway Integration Package

943336.8k5](/packages/shetabit-payment)[shetabit/multipay

PHP Payment Gateway Integration Package

293355.3k4](/packages/shetabit-multipay)[larabook/gateway

A Laravel package for connecting to all Iraninan payment gateways

24753.9k](/packages/larabook-gateway)[ondrakoupil/csob-eapi-paygate

PHP Client library for easy integration of ČSOB payment gateway

46432.7k3](/packages/ondrakoupil-csob-eapi-paygate)[omalizadeh/laravel-multi-payment

A driver-based laravel package for online payments via multiple gateways

491.1k](/packages/omalizadeh-laravel-multi-payment)[aharen/pay

Payment processing with Bank of Maldives/Maldives Payment Gateway (MPG), Maldives Islamic Bank (MIB) &amp; MFaisaa by Oooredoo Maldives.

271.5k](/packages/aharen-pay)

PHPackages © 2026

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