PHPackages                             hymns/toyyibpay - 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. [API Development](/categories/api)
4. /
5. hymns/toyyibpay

ActiveLibrary[API Development](/categories/api)

hymns/toyyibpay
===============

Library Package for ToyyibPay API

v1.0.1(5y ago)0291MITPHP

Since Jan 29Pushed 1y ago1 watchersCompare

[ Source](https://github.com/hymns/toyyibpay)[ Packagist](https://packagist.org/packages/hymns/toyyibpay)[ RSS](/packages/hymns-toyyibpay/feed)WikiDiscussions master Synced 1mo ago

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

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

[](#installation)

To install the package within your laravel project use the following composer command:

```
composer require hymns/toyyibpay

```

### Publish the Config File

[](#publish-the-config-file)

```
php artisan vendor:publish --provider="Hymns\ToyyibPay\ToyyibPayServiceProvider"

```

Credentials
-----------

[](#credentials)

You are require to have `User Secret Key` before can use this Laravel ToyyibPay package. To get the credential for development on sandbox, you need create an account at [ToyyibPay Staging Portal](https://dev.toyyibpay.com).

### Environment Credential Setup

[](#environment-credential-setup)

```
TOYYIBPAY_USER_SECRET_KEY=YOUR_TOYYIBPAY_USER_SECRET_KEY
TOYYIBPAY_REDIRECT_URI=YOUR_TOYYIBPAY_REDIRECT_URI
TOYYIBPAY_PRODUCTION_MODE=YOUR_TOYYIBPAY_PRODUCTION_MODE (TRUE|FALSE)
```

Auto Discovery
--------------

[](#auto-discovery)

If you're using Laravel 5.5+ you don't need to manually add the service provider or facade. This will be Auto-Discovered. For all versions of Laravel below 5.5, you must manually add the ServiceProvider &amp; Facade to the appropriate arrays within your Laravel project `config/app.php`

### Provider

[](#provider)

```
Hymns\ToyyibPay\ToyyibPayServiceProvider::class,
```

### Alias / Facade

[](#alias--facade)

```
'ToyyibPay' => Hymns\ToyyibPay\ToyyibPayFacade::class,
```

Usage
-----

[](#usage)

### APIs (All Users)

[](#apis-all-users)

All the APIs writen based on official documentation at [ToyyibPay API Reference](https://toyyibpay.com/apireference/).

#### Use ToyyibPay Facade

[](#use-toyyibpay-facade)

```
use ToyyibPay;

class YourController extends Controller
{
  // Rest of your controller code here...
}
```

#### Create Category

[](#create-category)

Create collection or category of bills

```
$response = ToyyibPay::createCategory($name, $description);
var_dump($response);
```

#### Get Category

[](#get-category)

Get the category or collection information

```
$response = ToyyibPay::getCategory($category_code);
var_dump($response);
```

### Create Bill

[](#create-bill)

Create bill as an invoice to your customer with ToyyibPay

```
$response = ToyyibPay::createBill($category_code, [
    'billName' => $request->bill_name,
    'billDescription' => $request->bill_description,
    ...
]);
var_dump($response);
```

#### Get Bill Payment Link

[](#get-bill-payment-link)

```
$response = ToyyibPay::billPaymentLink($bill_code);
var_dump($response);
```

### APIs (Enterprise Partner Only)

[](#apis-enterprise-partner-only)

#### Get Bank

[](#get-bank)

Get Bank API is useful for you to get bank information which are accepted to be used with toyyibPay.

```
$response = ToyyibPay::getBanks();
var_dump($response);
```

#### Get FPX Bank Code

[](#get-fpx-bank-code)

```
$response = ToyyibPay::getBanksFPX();
var_dump($response);
```

#### Get Packages

[](#get-packages)

```
$response = ToyyibPay::getPackages();
var_dump($response);
```

If you have associative array of data set using from `stdClass` class that you want to pass into `ToyyibPay::createBill($category_code, $array)`. Just simply cast it using `(object)` as example below.

```
$response = ToyyibPay::createBill($category_code, (object) $array)
var_dump($response);
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

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

Total

2

Last Release

1928d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/63188e5a567b1352306b9279475af9fa5d6730b0cbb9e24d6e12bfb3b75999e0?d=identicon)[hymns](/maintainers/hymns)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hymns-toyyibpay/health.svg)

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

###  Alternatives

[skagarwal/google-places-api

Google Places Api

1913.0M8](/packages/skagarwal-google-places-api)[dcblogdev/laravel-microsoft-graph

A Laravel Microsoft Graph API (Office365) package

168285.5k1](/packages/dcblogdev-laravel-microsoft-graph)[vluzrmos/slack-api

Wrapper for Slack.com WEB API.

102589.1k3](/packages/vluzrmos-slack-api)[smodav/mpesa

M-Pesa API implementation

16363.7k1](/packages/smodav-mpesa)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1344.8k1](/packages/jasara-php-amzn-selling-partner-api)[grantholle/powerschool-api

A Laravel package to make interacting with PowerSchool less painful.

1715.6k1](/packages/grantholle-powerschool-api)

PHPackages © 2026

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