PHPackages                             omnilesolutions/theteller-php-sdk - 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. omnilesolutions/theteller-php-sdk

ActiveLibrary[Payment Processing](/categories/payments)

omnilesolutions/theteller-php-sdk
=================================

PHP SDK for theteller payment system

v0.0.12(4y ago)0157MITPHP

Since Aug 15Pushed 4y ago1 watchersCompare

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

READMEChangelog (10)Dependencies (3)Versions (13)Used By (0)

theteller-php-sdk [![Build Status](https://camo.githubusercontent.com/131e85353edb4137cf819a96c55fe00840556ce6e49364d1e7c7f2f64be632f0/68747470733a2f2f7472617669732d63692e6f72672f627269676874616e747769626f617369616b6f2f74686574656c6c65722d7068702d73646b2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/brightantwiboasiako/theteller-php-sdk)
================================================================================================================================================================================================================================================================================================================================================================

[](#theteller-php-sdk-)

PHP SDK for theteller Payments API

Introduction
------------

[](#introduction)

To use this sdk, you'll need an account from [TheTeller](https://theteller.net). Create one [here](https://theteller.net/signup) if you don't already have one. Also, this sdk follows TheTeller documentation

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

[](#installation)

This sdk can be installed using [composer](https://getcomposer.org).

```
composer require omnilesolutions/theteller-php-sdk

```

Authentication
--------------

[](#authentication)

TheTeller uses [basic HTTP authentication](http://www.ietf.org/rfc/rfc2069.txt). You'll need your API username and key, which are available under My Account section of your TheTeller account dashboard.

TheTeller Checkout
------------------

[](#theteller-checkout)

To perform a checkout, you first need to get a payment token with an order payload.

```
// Get the teller instance.

$teller = new TheTeller\TheTeller($username, $apiKey)

// There is a third argument for mode which is LIVE by default. If you want to
// use this sdk in test mode, instantiate the teller as
// $teller = new TheTeller\TheTeller($username, $apiKey, TheTeller\TheTeller::THETELLER_MODE_TEST)

// Create order payload
$order = [
   'merchant_id' => 'YOUR-MERCHANT-ID', // available on TheTeller dashboard, under My Account.
   'transaction_id' => 'A UNIQUE TRANSACTION ID',
   'desc' => 'DESCRIPTION OF YOUR ORDER',
   'amount' => '20', // Amount to charge the customer
   'redirect_url' => 'YOUR REDIRECT URL',
   'email' => 'EMAIL ADDRESS OF CUSTOMER'
];

// Process the checkout
$checkout = $teller->requestPaymentToken($order);

// If successful, the returned $checkout will be an instance of TheTeller\Checkout\Checkout

// You now have to redirect the customer to TheTeller to make payment.
// This will take the customer to TheTeller.
$checkout->proceedToPayment();

// When the payment is completed by the customer, TheTeller will
// redirect them back to your provided 'redirect_url' in the order
// with query parameters indicating the status of the payment.

// The response looks like this:
// https://redirect_url?code=000&status=successful&reason=transaction20%successful&transaction_id=000000000000
```

TheTeller Funds Transfer
------------------------

[](#theteller-funds-transfer)

You can transfer funds from your Merchant Float Account which can be created from TheTeller dashboard. More information [here](https://theteller.net/documentation#theTeller_Standard).

### Mobile Money Transfer

[](#mobile-money-transfer)

```
// Get the teller instance.

$teller = new TheTeller\TheTeller($username, $apiKey);
// There is a third argument for mode which is LIVE by default. If you want to
// use this sdk in test mode, instantiate the teller as
// $teller = new TheTeller\TheTeller($username, $apiKey, TheTeller\TheTeller::THETELLER_MODE_TEST)

// Create transfer payload
$payload = [
    'amount' => '20', // The transfer amount
    'merchant_id' => 'YOUR-MERCHANT-ID', // available on TheTeller dashboard, under My Account.
    'account_number' => '0240000000', // The mobile account number
    'account_issuer' => 'MTN', // The mobile money network
    'transaction_id' => 'A UNIQUE TRANSACTION ID',
    'desc' => 'DESCRIPTION OF TRANSFER',
    'pass_code' => 'UNIQUE FLOAT ACCOUNT PASSCODE'
]

// Process the transfer
try{

    $teller->transfer('mobile-money', $payload);

    // Transfer is successful

}catch(\Exception $e){
    var_dump($e->getMessage()); // The reason for the failure
}
```

### Bank Transfer

[](#bank-transfer)

```
// Get the teller instance.

$teller = new TheTeller\TheTeller($username, $apiKey);
// There is a third argument for mode which is LIVE by default. If you want to
// use this sdk in test mode, instantiate the teller as
// $teller = new TheTeller\TheTeller($username, $apiKey, TheTeller\TheTeller::THETELLER_MODE_TEST)

// Create transfer payload
$payload = [
    'amount' => '20', // The transfer amount
    'merchant_id' => 'YOUR-MERCHANT-ID', // available on TheTeller dashboard, under My Account.
    'account_bank' => 'GCB', // List of supported banks [here](https://theteller.net/documentation#theTeller_Standard)
    'account_number' => '0082000141685300', // The bank account number
    'transaction_id' => 'A UNIQUE TRANSACTION ID',
    'desc' => 'DESCRIPTION OF TRANSFER',
    'pass_code' => 'UNIQUE FLOAT ACCOUNT PASSCODE'
]

// Process the transfer
try{

    // This step performs an enquiry of the bank account

    $transfer = $teller->transfer('bank', $payload);

    // Enquiry was successfull.
    // You can get the bank account name to ensure
    // that the transfer is going to the intended account.
    $name = $transfer->getAccountName();

    // Complete the transfer
    $transfer->confirm($merchantId); // Your TheTeller Merchant ID

}catch(\Exception $e){
    var_dump($e->getMessage()); // The reason for the failure
}
```

### Get Transaction Status

[](#get-transaction-status)

```
// Get the teller instance.

$teller = new TheTeller\TheTeller($username, $apiKey);
// There is a third argument for mode which is LIVE by default. If you want to
// use this sdk in test mode, instantiate the teller as
// $teller = new TheTeller\TheTeller($username, $apiKey, TheTeller\TheTeller::THETELLER_MODE_TEST)

// Get status
try{

    $response = $teller->getTransactionStatus($transactionId, $merchantId);

}catch(\Exception $e){
    var_dump($e->getMessage()); // The reason for the failure
}
```

### Prerequisites

[](#prerequisites)

- PHP 7.0 or above
- [curl](https://secure.php.net/manual/en/book.curl.php) and [openssl](https://secure.php.net/manual/en/book.openssl.php)extensions.

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

[](#contributing)

Contributions are welcome! Please do a PR with any bug-fixes or email me at for a long term commitment.

License
-------

[](#license)

This open-source project is licensed under the [MIT LICENSE](https://opensource.org/licenses/MIT)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 62.5% 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 ~89 days

Recently: every ~170 days

Total

12

Last Release

1478d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/824841b6d0cfb8d074303922801390ab3985f4ba02d0f740bb8c58685522ebfb?d=identicon)[omnilesolutions](/maintainers/omnilesolutions)

---

Top Contributors

[![omnilesolutions](https://avatars.githubusercontent.com/u/58987176?v=4)](https://github.com/omnilesolutions "omnilesolutions (5 commits)")[![brightantwiboasiako](https://avatars.githubusercontent.com/u/8937063?v=4)](https://github.com/brightantwiboasiako "brightantwiboasiako (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/omnilesolutions-theteller-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/omnilesolutions-theteller-php-sdk/health.svg)](https://phpackages.com/packages/omnilesolutions-theteller-php-sdk)
```

###  Alternatives

[chargebee/chargebee-php

ChargeBee API client implementation for PHP

768.0M9](/packages/chargebee-chargebee-php)[imdhemy/google-play-billing

Google Play Billing

491.3M5](/packages/imdhemy-google-play-billing)[bitpay/sdk

Complete version of the PHP library for the new cryptographically secure BitPay API

42337.5k4](/packages/bitpay-sdk)[buckaroo/sdk

Buckaroo payment SDK

12189.1k9](/packages/buckaroo-sdk)[contica/facturador-electronico-cr

Un facturador de código libre para integrar facturación electrónica en Costa Rica a un proyecto PHP

2128.8k](/packages/contica-facturador-electronico-cr)[karson/mpesa-php-sdk

172.2k](/packages/karson-mpesa-php-sdk)

PHPackages © 2026

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