PHPackages                             taitech/travfd-php - 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. taitech/travfd-php

ActiveLibrary[API Development](/categories/api)

taitech/travfd-php
==================

A composer package that helps to communicate with TRA \[Tanzania Revenue Authority\] VFD services

1.0.21(1y ago)06MITPHPPHP ^8.0

Since Feb 22Pushed 1y ago1 watchersCompare

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

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

README.md
=========

[](#readmemd)

TRA VFD Client for Laravel
==========================

[](#tra-vfd-client-for-laravel)

**TRA VFD Client** is a Laravel-compatible Composer package for integrating with the Tanzania Revenue Authority (TRA) Virtual Fiscal Device (VFD) service. It provides an easy-to-use interface for:

- Registering a TIN to obtain a VFD number
- Fetching authentication tokens
- Submitting receipts/invoices
- Posting daily Z reports
- Verifying receipts/invoices

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

[](#installation)

### 1. Install via Composer

[](#1-install-via-composer)

```
composer require taitech/travfd-php
```

### 2. Publish Configuration

[](#2-publish-configuration)

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

### 3. Add Environment Variables

[](#3-add-environment-variables)

Update `.env` with TRA API credentials:

```
TRA_VFD_API_BASE=https://virtual.tra.go.tz/efdmsRctApi
TRA_VFD_TIN=123456789
TRA_VFD_USERNAME=your_username
TRA_VFD_PASSWORD=your_password
```

Usage
-----

[](#usage)

### Register VFD

[](#register-vfd)

```
use Taitech\TravfdPhp\Facades\Travfd;
$response = Trarfd::registerVfd();
print_r($response);
```

### Fetch Token

[](#fetch-token)

```
$response = Travfd::getValidToken();
print_r($response);
```

### Submit Receipt

[](#submit-receipt)

```
$receiptData = [
    'Invoice' => [
        'TIN' => '123456789',
        'Date' => '2025-02-22',
        'Total' => '1000.00'
    ]
];
$response = Travfd::sendReceipt($receiptData);
print_r($response);
```

### Submit Z Report

[](#submit-z-report)

```
$response = Travfd::sendZReport([
    'TIN' => '123456789',
    'Date' => '2025-02-22',
    'TotalSales' => '5000.00'
]);
print_r($response);
```

### Verify Receipt

[](#verify-receipt)

```
$response = Travfd::verifyReceipt('INV-12345');
print_r($response);
```

License
-------

[](#license)

This package is licensed under the MIT License. See [LICENSE.md](LICENSE.md) for details.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance43

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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

Total

3

Last Release

449d ago

### Community

Maintainers

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

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/taitech-travfd-php/health.svg)

```
[![Health](https://phpackages.com/badges/taitech-travfd-php/health.svg)](https://phpackages.com/packages/taitech-travfd-php)
```

###  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)
