PHPackages                             flexonexus/laravel-tap-payments - 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. flexonexus/laravel-tap-payments

ActiveLibrary[Payment Processing](/categories/payments)

flexonexus/laravel-tap-payments
===============================

Laravel integration for Tap Payments (charges, refunds, webhooks).

v1.0.0(7mo ago)011MITPHPPHP ^8.1

Since Sep 29Pushed 7mo agoCompare

[ Source](https://github.com/flexonexus/laravel-tap-payments)[ Packagist](https://packagist.org/packages/flexonexus/laravel-tap-payments)[ RSS](/packages/flexonexus-laravel-tap-payments/feed)WikiDiscussions main Synced 1mo ago

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

Laravel Tap Payments
====================

[](#laravel-tap-payments)

[![Latest Version](https://camo.githubusercontent.com/921879798ebe17d5fc3fa13ee40ce8736527449297277dec24b627630edb2120/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f666c65786f6e657875732f6c61726176656c2d7461702d7061796d656e74732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/flexo/laravel-tap-payments)[![License](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)](#-license)

> 🚀 Elegant Laravel integration with [Tap Payments](https://www.tap.company/): charges, refunds, webhooks — the clean Laravel way.

---

✨ Features
----------

[](#-features)

- 🔑 Simple **Facade API**: `Tap::createCharge()`, `Tap::refundCharge()`, etc.
- ⚙️ **Configurable** via `.env` (`TAP_SECRET_KEY`, `TAP_MODE`, etc.)
- 🔔 Built-in **Webhook signature verification**
- 📦 PSR-4 autoload &amp; **Laravel auto-discovery**
- 🧪 **Testbench support** for easy unit testing

---

📦 Installation &amp; Setup
--------------------------

[](#-installation--setup)

Follow these steps to fully install and configure the package:

### 1. Install via Composer

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

```
composer require flexonexus/laravel-tap-payments
```

### 2. Publish the Config File

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

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

This will create:

```
config/tap.php

```

### 3. Add Environment Variables

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

In your `.env` file:

```
TAP_MERCHANT_ID=your_merchant_id_here # Your Merchant ID
TAP_SECRET_KEY=sk_test_xxx   # Your Tap secret key
TAP_PUBLIC_KEY=pk_test_xxx   # Your Tap public key
TAP_WEBHOOK_SECRET=whsec_xxx # Webhook secret for signature verification
TAP_MODE=sandbox             # sandbox | live
```

### 4. Configure Webhook URL

[](#4-configure-webhook-url)

Set the webhook endpoint in your Tap dashboard:

```
https://your-domain.com/tap/webhook

```

The package already registers this route automatically.

### 5. Clear Cached Configs

[](#5-clear-cached-configs)

If your app uses config caching, run:

```
php artisan config:clear
```

### 6. Test the Integration

[](#6-test-the-integration)

Use the Facade to create a test charge:

```
use Tap;

$charge = Tap::createCharge([
    'amount'   => 50,
    'currency' => 'USD',
    'customer' => [
        'first_name' => 'Test',
        'email'      => 'test@example.com',
        'phone'      => ['country_code' => '966', 'number' => '500000000'],
    ],
    'merchant' => ['id' => config('tap.merchant_id')],
    'source'   => ['id' => 'src_all'],
    'redirect' => ['url' => route('checkout.callback')],
    'description' => 'Order #1001',
    // ...any other Tap fields you need
]);

dd($charge);
```

If you see a JSON response with a `charge_id`, 🎉 the package is working.

---

🚀 Usage Examples
----------------

[](#-usage-examples)

### Create a Charge

[](#create-a-charge)

```
$charge = Tap::createCharge([
    'amount'   => 50,
    'currency' => 'USD',
    'customer' => [
        'first_name' => 'Mohamed',
        'email'      => 'mohamed@example.com',
        'phone'      => ['country_code' => '966', 'number' => '500000000'],
    ],
    'merchant' => ['id' => config('tap.merchant_id')],
    'source'   => ['id' => 'src_all'],
    'redirect' => ['url' => route('checkout.callback')],
    'description' => 'Order #1234',
    // ...any other Tap fields you need
]);
```

### Retrieve a Charge

[](#retrieve-a-charge)

```
$charge = Tap::retrieveCharge($charge['id']);
```

### Refund a Charge

[](#refund-a-charge)

```
$refund = Tap::refundCharge($charge['id'], [
    'amount' => 50,
    'reason' => 'customer_request'
]);
```

---

🔔 Webhooks
----------

[](#-webhooks)

- The package registers `/tap/webhook` automatically.
- All requests are verified with `TAP_WEBHOOK_SECRET`.

### Example: Listen for events

[](#example-listen-for-events)

```
Event::listen('tap::charge.succeeded', function ($payload) {
    // Update your order, mark it as paid
});
```

---

🧪 Testing
---------

[](#-testing)

```
composer test
```

This uses PHPUnit with Orchestra Testbench.

---

🤝 Contributing
--------------

[](#-contributing)

PRs are welcome!
Please run `composer test` before submitting.

---

💡 Credits
---------

[](#-credits)

- Built with ❤️ by [Flexo Nexus](https://flexonexus.com)
- Tap Payments API —

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance63

Regular maintenance activity

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity44

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

Unknown

Total

1

Last Release

224d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5981e4cc0001a874c8e3f761863973702771221b3bcca68926aeaec34af97a95?d=identicon)[flexonexus](/maintainers/flexonexus)

---

Top Contributors

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

---

Tags

laravelpaymentsgatewayksatapkuwait

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/flexonexus-laravel-tap-payments/health.svg)

```
[![Health](https://phpackages.com/badges/flexonexus-laravel-tap-payments/health.svg)](https://phpackages.com/packages/flexonexus-laravel-tap-payments)
```

###  Alternatives

[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4845.9k](/packages/sebdesign-laravel-viva-payments)[evryn/laravel-toman

A simple stable Laravel package to handle popular payment gateways in Iran including ZarinPal and IDPay.

1079.9k](/packages/evryn-laravel-toman)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)[itsmurumba/laravel-mpesa

Laravel Package for Mpesa Daraja API

191.6k](/packages/itsmurumba-laravel-mpesa)

PHPackages © 2026

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