PHPackages                             tumainimosha/credit-info - 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. tumainimosha/credit-info

AbandonedLibrary[API Development](/categories/api)

tumainimosha/credit-info
========================

A Laravel package for integration with Credit Info (Tanzania) API

0.10.0(5y ago)31.0k↓75%1MITPHPPHP &gt;=7.0CI failing

Since Jan 17Pushed 2y ago1 watchersCompare

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

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

Credit Info (TZ) API Wrapper for Laravel
========================================

[](#credit-info-tz-api-wrapper-for-laravel)

[![Latest Stable Version](https://camo.githubusercontent.com/0750ba7bd2cfd72f8c6f13a1a8ad054530cc94a6116d2431c5c08fad3ee6d0f7/68747470733a2f2f706f7365722e707567782e6f72672f74756d61696e696d6f7368612f6372656469742d696e666f2f762f737461626c65)](https://packagist.org/packages/tumainimosha/credit-info)[![License](https://camo.githubusercontent.com/c463025b0a366b78134bdfc55ebd31f722e1760f2b1ad88e99a1221dd8172f85/68747470733a2f2f706f7365722e707567782e6f72672f74756d61696e696d6f7368612f6372656469742d696e666f2f6c6963656e7365)](https://packagist.org/packages/tumainimosha/credit-info)[![Total Downloads](https://camo.githubusercontent.com/fb3ca29b57491df31c2a7ba2c602dc1663f410d0af66b5f9c02e1ae4b2f1f81c/68747470733a2f2f706f7365722e707567782e6f72672f74756d61696e696d6f7368612f6372656469742d696e666f2f646f776e6c6f616473)](https://packagist.org/packages/tumainimosha/credit-info)

The Unofficial [Credit Info Tanzania](https://creditinfo.co.tz) API wrapper for Laravel.

- [CreditInfo Tanzania website](https://tz.creditinfo.com/)
- [WSDL](https://ws.creditinfo.co.tz/WsReport/v5.39/service.svc?singleWsdl) (requires *Basic Auth* authentication)

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

[](#installation)

Install via composer

```
composer require tumainimosha/credit-info
```

### Publish Configuration File

[](#publish-configuration-file)

Optional! Publish config file only if you wish to customize the default package config.

```
php artisan vendor:publish --provider="CreditInfo\ServiceProvider" --tag="config"
```

Configuration
-------------

[](#configuration)

### Authentication

[](#authentication)

Configure your api username and password in `.env` file as follows

```
CREDIT_INFO_USERNAME=your_api_username
CREDIT_INFO_PASSWORD=your_api_password
```

Apart from authentication configurations, the following remaining configurations are optional.

For basic usage jump straight to [Usage Section](#usage)

### URL

[](#url)

The package config file comes with default API url pointing to `production`.

```
CREDIT_INFO_WSDL=https://ws.creditinfo.co.tz/WsReport/v5.39/service.svc?wsdl
```

To point to `test` environment set the CREDIT\_INFO\_WSDL key in your `.env` file to point to test url given. (See below)

```
CREDIT_INFO_WSDL=https://wstest.creditinfo.co.tz/WsReport/v5.39/service.svc?wsdl
```

Remember

- The WSDL url should end with a `?wsdl` suffix, don't forget to add this if you haven't already.
- You need to first configure correct [Authentication](#authentication) details above for your respective environment, as the WSDL url is secured with Basic Auth.

### Response Caching

[](#response-caching)

The package by default caches API response from Credit Info to speed up subsequent requests for the same data.

You can control this feature by setting the `CREDIT_INFO_CACHE_TTL` value in minutes in your `.env`. (See below)

By default data is cached for 24 hours = 1440 minutes

```
CREDIT_INFO_CACHE_TTL=1440
```

Set the value to zero(0) to completely disable caching.

### WSDL Caching

[](#wsdl-caching)

Default behaviour of PHP Soap Client is to Cache WSDL files for improved performance.

However, during development you may require for debugging reasons to disable WSDL caching of the soap client.

To do so set the `CREDIT_INFO_CACHE_WSDL` key in your `.env` file to `false` (See below)

**Caution:** Disabling WSDL caching will significantly slow down performance. Please remember to always revert this option to `true` after you are done debugging.

```
CREDIT_INFO_CACHE_WSDL=false
```

Usage
-----

[](#usage)

1. [Vehicle Report](#vehicle-report)
2. [Driving License Report](#driving-license-report)
3. [National Id Report](#national-id-report)
4. [Exception Handling](#exception-handling)

### Vehicle Report

[](#vehicle-report)

Method `getVehicleReport()` queries vehicle information by Vehicle Registration ID

```
$creditInfoService = new \CreditInfo\CreditInfo();
$details = $creditInfoService->getVehicleReport($registration_number);
```

### Driving License Report

[](#driving-license-report)

Method `getDrivingLicenseReport()` queries drivers license information by Driving License Number

```
$creditInfoService = new \CreditInfo\CreditInfo();
$details = $creditInfoService->getDrivingLicenseReport($driving_license_no);
```

### National Id Report

[](#national-id-report)

Method `getNationalIdReport()` queries an individual information by National Id Number

```
$creditInfoService = new \CreditInfo\CreditInfo();
$details = $creditInfoService->getNationalIdReport($national_id);
```

### Exception Handling

[](#exception-handling)

The above methods throws the following exceptions

ExceptionCondition`CreditInfo\Exceptions\Exception`This is the package's base exception. All exceptions from this library inherit from it.

 \*\*\* This should be caught last as a catch-all statement.`CreditInfo\Exceptions\InvalidReferenceNumberException`Thrown if supplied reference number fails validation requirements.`CreditInfo\Exceptions\DataNotFoundException`Thrown if no data found for given reference number`CreditInfo\Exceptions\TimeoutException`Thrown if request timeouts
See usage below with exception catching ```
use CreditInfo\Exceptions\DataNotFoundException;
use CreditInfo\Exceptions\Exception;
use CreditInfo\Exceptions\InvalidReferenceNumberException;
use CreditInfo\Exceptions\TimeoutException;
use CreditInfo\CreditInfo;

...

public function testVehicleInfo() {

    $registration = 't100abc';

    $creditInfoService = new CreditInfo();
    try {
        $details = $creditInfoService->getVehicleReport($registration);
    }
    catch(InvalidReferenceNumberException $ex) {
        // Handle case invalid reference number case
        throw($ex);
    }
    catch(TimeoutException $ex) {
        // Handle case if request timeout
        throw($ex);
    }
    catch(DataNotFoundException $ex) {
        // Handle case if registration number not found
        throw($ex);
    }
    catch(Exception $e) {
        // Handle other API errors
        throw($e);
    }

    dd($details);

}
...
```

### TODO

[](#todo)

- Vehicle Report
- Driving license Report
- National ID Report
- TIN Report

Security
--------

[](#security)

If you discover any security related issues, please email [Me](mailto:princeton.mosha@gmail.com?subject=Credit+Info+API+Package+Security+Issue)instead of using the issue tracker.

Credits
-------

[](#credits)

- [Tumaini Mosha](https://github.com/princeton255)
- [All contributors](https://github.com/princeton255/credit-info/graphs/contributors)

This package is bootstrapped with the help of [melihovv/laravel-package-generator](https://github.com/melihovv/laravel-package-generator).

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity53

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

Recently: every ~89 days

Total

13

Last Release

1975d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2bbce5f012137c58d5dfeeba9820bf091177baf88a0c3366258a0838315d3621?d=identicon)[tumainimosha](/maintainers/tumainimosha)

---

Top Contributors

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

---

Tags

credit-infocredit-info-tzcredit-infocredit-info tz

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/tumainimosha-credit-info/health.svg)

```
[![Health](https://phpackages.com/badges/tumainimosha-credit-info/health.svg)](https://phpackages.com/packages/tumainimosha-credit-info)
```

###  Alternatives

[mollie/laravel-mollie

Mollie API client wrapper for Laravel &amp; Mollie Connect provider for Laravel Socialite

3624.1M28](/packages/mollie-laravel-mollie)[mll-lab/laravel-graphiql

Easily integrate GraphiQL into your Laravel project

683.2M9](/packages/mll-lab-laravel-graphiql)[spatie/laravel-route-discovery

Auto register routes using PHP attributes

23645.0k2](/packages/spatie-laravel-route-discovery)[esign/laravel-conversions-api

A laravel wrapper package around the Facebook Conversions API

69145.4k](/packages/esign-laravel-conversions-api)[didww/didww-api-3-php-sdk

PHP SDK for DIDWW API 3

1218.2k](/packages/didww-didww-api-3-php-sdk)[surface/laravel-webfinger

A Laravel package to create an ActivityPub webfinger.

113.8k](/packages/surface-laravel-webfinger)

PHPackages © 2026

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