PHPackages                             tygapay/tygabank - 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. tygapay/tygabank

ActiveLibrary[Payment Processing](/categories/payments)

tygapay/tygabank
================

TygaBank (TygaPay) PHP SDK with Laravel 12 integration

v1.0.2(7mo ago)0174MITPHPPHP ^8.3

Since Nov 27Pushed 7mo agoCompare

[ Source](https://github.com/quato/tygabank)[ Packagist](https://packagist.org/packages/tygapay/tygabank)[ RSS](/packages/tygapay-tygabank/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (5)Versions (4)Used By (0)

TygaBank PHP SDK (Laravel 12 Ready)
===================================

[](#tygabank-php-sdk-laravel-12-ready)

Framework-agnostic PHP SDK and Laravel integration for TygaBank (TygaPay) APIs.

- Package: `tygapay/tygabank`
- Namespace: `TygaPay\TygaBank`
- PHP: ^8.3

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

[](#installation)

```
composer require tygapay/tygabank
```

Configuration (Laravel)
-----------------------

[](#configuration-laravel)

Publish config:

```
php artisan vendor:publish --tag=tygabank-config
```

Set environment variables in `.env`:

```
TYGABANK_API_KEY=your_key
TYGABANK_API_SECRET=your_secret
TYGABANK_APP_URL=https://app.tygabank.com

# Optional: Override base URLs
TYGABANK_BASE_URL_AUTH=https://api-auth-it7ww2bo7q-uc.a.run.app
TYGABANK_BASE_URL_USERS=https://api-users-it7ww2bo7q-uc.a.run.app
TYGABANK_BASE_URL_ORDERS=https://api-orders-it7ww2bo7q-uc.a.run.app
TYGABANK_BASE_URL_TRANSACTIONS=https://api-transactions-it7ww2bo7q-uc.a.run.app
```

Usage
-----

[](#usage)

### Create Payment Order

[](#create-payment-order)

```
use TygaPay\TygaBank\Core\DTO\Orders\OrderCreateRequest;

$order_request = new OrderCreateRequest(
    type: 'payment',
    order_number: '123',
    amount: 9.99,
    webhook_url: 'https://example.com/ipn',
    return_url: 'https://example.com/ok',
    customer_email: 'user@example.com',
);

$result = tygabank()->orders()->create($order_request);
```

### Create User

[](#create-user)

```
use TygaPay\TygaBank\Core\DTO\Users\UserCreateRequest;

$user_request = new UserCreateRequest(
    email: 'user@example.com',
    created_by: 'system',
    external_user_id: '123',
    first_name: 'John',
    last_name: 'Doe',
    phone_number: '+1234567890',
    date_of_birth: '1990-01-01',
    customer_address: ['country' => 'US']
);

$result = tygabank()->users()->create($user_request);
```

### Get User Balances

[](#get-user-balances)

```
$balances = tygabank()->users()->balances('userId');
```

### Create Payout

[](#create-payout)

```
use TygaPay\TygaBank\Core\DTO\Transactions\PayoutRequest;

$payout_request = new PayoutRequest(
    user_id: 'tygabank-user-id',
    amount: 50.00,
    external_transaction_id: 'ext_123',
    created_by: 'system',
    email: 'user@example.com',
    currency: 'USD',
    webhook_url: 'https://example.com/webhook'
);

$result = tygabank()->transactions()->createPayout($payout_request);
```

### Generate SSO Token

[](#generate-sso-token)

```
$sso = tygabank()->auth()->clientToken(
    timestamp_ms: null,
    user_id: 'tygabank-user-id',
    external_user_id: '123'
);

// Redirect to: $sso['loginUrl']
```

Available Endpoints
-------------------

[](#available-endpoints)

```
// Auth
$token = tygabank()->auth()->clientToken();

// Users
$user = tygabank()->users()->getByEmail('user@example.com');
$user = tygabank()->users()->getById('userId');
$balances = tygabank()->users()->balances('userId');

// Transactions
$payout = tygabank()->transactions()->createPayout($request);
$status = tygabank()->transactions()->payoutStatus('payoutId', time() * 1000);
$transactions = tygabank()->transactions()->listByUser('userId');

// Orders
$order = tygabank()->orders()->create($request);

// Reporting
$tenant = tygabank()->reporting()->tenantTransactions(
    '2025-03-01',
    '2025-04-01',
    'commission_payout',
    time() * 1000
);
```

Webhooks
--------

[](#webhooks)

The SDK includes webhook signature verification:

```
use TygaPay\TygaBank\Core\Webhooks\WebhookVerifier;

$verifier = app(WebhookVerifier::class);
$is_valid = $verifier->verify(
    $signature,
    $api_path,
    $payload
);
```

License
-------

[](#license)

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

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance65

Regular maintenance activity

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

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 ~2 days

Total

3

Last Release

213d ago

### Community

Maintainers

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

---

Top Contributors

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

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/tygapay-tygabank/health.svg)

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

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M736](/packages/sylius-sylius)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)

PHPackages © 2026

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