PHPackages                             dwedaz/tripayid - 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. dwedaz/tripayid

ActiveLibrary[Payment Processing](/categories/payments)

dwedaz/tripayid
===============

Laravel package for integrating Tripay.id PPOB (Payment Point Online Bank) services - supports both prepaid and postpaid transactions

125PHPCI failing

Since Sep 16Pushed 7mo agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Tripay PPOB with Backpack Admin
=======================================

[](#laravel-tripay-ppob-with-backpack-admin)

[![Latest Version](https://camo.githubusercontent.com/fa4ce00129208bffec86de63d8c32b6827c57f58af403b15d4695d93df50936b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64776564617a2f74726970617969642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dwedaz/tripayid)[![Total Downloads](https://camo.githubusercontent.com/838308f2bb9555f10803fa5643f6349507948cef7568c096e1c95da0640c7cb8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f64776564617a2f74726970617969642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dwedaz/tripayid)[![MIT Licensed](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Tests](https://camo.githubusercontent.com/4a483e2cf70e756f248fd325547102e4c4890d4401389699ccdd40dec40336e5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f64776564617a2f74726970617969642f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/dwedaz/tripayid/actions)[![Laravel](https://camo.githubusercontent.com/abe68f67815b35dbc9b4d7b0c7b1eae72949ee098d3fd302f96183b81366fbe2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31302532422d7265642e7376673f7374796c653d666c61742d737175617265)](https://laravel.com)[![Backpack](https://camo.githubusercontent.com/33aae0da28558441d8cf4d726e2160ce4f52f58d05ef0921c086253f22daa763/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4261636b7061636b2d362e302532422d626c75652e7376673f7374796c653d666c61742d737175617265)](https://backpackforlaravel.com)

A comprehensive Laravel package for integrating **Tripay.id PPOB (Payment Point Online Bank)** services with a beautiful **Backpack admin panel**. This package provides a clean, type-safe API for handling both **prepaid** (pulsa, data, e-money) and **postpaid** (bill payments like PLN, PDAM, TV, etc.) transactions, complete with a professional admin dashboard for managing your PPOB business.

🎆 Features
----------

[](#-features)

### 📊 Admin Panel (Backpack Integration)

[](#-admin-panel-backpack-integration)

- **🎨 Beautiful Dashboard** - Real-time statistics, balance monitoring, and transaction overview
- **🗂 Categories Management** - CRUD interface for managing product categories
- **🏢 Operators Management** - Manage telecom operators with logos and status
- **📦 Products Catalog** - Complete product management with pricing and profit calculations
- **📈 Transaction Monitor** - View, filter, and analyze all transactions
- **🔄 One-Click Sync** - Synchronize data from Tripay API with one click
- **📱 Responsive Design** - Works perfectly on desktop and mobile devices
- **🔍 Advanced Filtering** - Filter by category, operator, status, date range, and more

### ⚡ Core API Features

[](#-core-api-features)

- **✨ Complete API Coverage** - Full integration with Tripay.id PPOB API endpoints
- **🔒 Type Safety** - Strongly typed DTOs with PHP 8.1+ readonly properties
- **⚡ High Performance** - Built-in caching for product catalogs and categories
- **🚀 Laravel Integration** - Service provider, facades, and Artisan commands
- **🎯 Error Handling** - Comprehensive exception handling with detailed error messages
- **📈 Logging** - Configurable request/response logging
- **🔄 Retry Logic** - Automatic retry with exponential backoff
- **🔐 Webhook Security** - HMAC signature verification for callbacks

Requirements
------------

[](#requirements)

- PHP 8.1+
- Laravel 10.0+

```

## 🎨 Backpack Admin Panel

### Installation with Backpack

This package includes a beautiful admin panel built with Backpack CRUD. To use the admin interface:

1. Install Backpack (if not already installed):
```bash
composer require backpack/crud
php artisan backpack:install

```

2. Run migrations to create the admin tables:

```
php artisan migrate
```

3. Access the admin panel:

- **Dashboard**: `https://yourapp.com/admin/tripay`
- **Categories**: `https://yourapp.com/admin/tripay/categories`
- **Operators**: `https://yourapp.com/admin/tripay/operators`
- **Products**: `https://yourapp.com/admin/tripay/products`
- **Transactions**: `https://yourapp.com/admin/tripay/transactions`

### Admin Features

[](#admin-features)

- 📊 **Real-time Dashboard** - Live balance, transaction counts, and quick actions
- 🗂 **Category Management** - Add, edit, and organize product categories
- 🏢 **Operator Management** - Manage telecom operators with logos and status
- 📦 **Product Catalog** - Complete product management with pricing and profit tracking
- 📈 **Transaction Monitor** - Filter and analyze all transactions with advanced search
- 🔄 **One-Click Sync** - Sync all data from Tripay API with a single button
- 📱 **Responsive Design** - Fully responsive interface for mobile and desktop

[![Tripay Admin Dashboard](https://camo.githubusercontent.com/7189f4fd2d08f7643485d46804ba595b4df519e324c1874a6c835750cfe53770/68747470733a2f2f7669612e706c616365686f6c6465722e636f6d2f383030783430302f3466343665352f6666666666663f746578743d5472697061792b41646d696e2b44617368626f617264)](https://camo.githubusercontent.com/7189f4fd2d08f7643485d46804ba595b4df519e324c1874a6c835750cfe53770/68747470733a2f2f7669612e706c616365686f6c6465722e636f6d2f383030783430302f3466343665352f6666666666663f746578743d5472697061792b41646d696e2b44617368626f617264)

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

[](#installation)

Install the package via Composer:

```
composer require dwedaz/tripayid
```

Publish the configuration file:

```
php artisan vendor:publish --provider="Tripay\PPOB\TripayServiceProvider" --tag="tripay-config"
```

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

[](#configuration)

Add your Tripay API credentials to your `.env` file:

```
TRIPAY_MODE=sandbox
TRIPAY_API_KEY=your_api_key_here
TRIPAY_SECRET_PIN=your_secret_pin_here
TRIPAY_CALLBACK_URL=https://yourapp.com/api/tripay/webhook
TRIPAY_CALLBACK_SECRET=your_callback_secret

# Optional caching settings
TRIPAY_CACHE_ENABLED=true
TRIPAY_CACHE_TTL=43200

# Optional logging settings
TRIPAY_LOG_ENABLED=true
TRIPAY_LOG_REQUESTS=false
TRIPAY_LOG_RESPONSES=false
```

Basic Usage
-----------

[](#basic-usage)

### Using the Facade

[](#using-the-facade)

```
use Tripay\PPOB\Facades\Tripay;

// Test connection
$isConnected = Tripay::testConnection();

// Check balance
$balance = Tripay::getBalance();

// Get prepaid categories
$categories = Tripay::prepaid()->getCategories();

// Purchase prepaid product
$result = Tripay::purchasePrepaid('AX5', '08123456789', 'INV001', '1234');

// Check postpaid bill
$bill = Tripay::checkBill('PLN', '08123456789', '123456789012', '1234', 'INV002');

// Pay postpaid bill
$payment = Tripay::payBill($bill->trxid, 'INV002', '1234');
```

### Using Service Classes

[](#using-service-classes)

```
use Tripay\PPOB\Services\PrepaidService;
use Tripay\PPOB\Services\PostpaidService;
use Tripay\PPOB\Services\TransactionService;

public function __construct(
    private PrepaidService $prepaid,
    private PostpaidService $postpaid,
    private TransactionService $transaction
) {}

public function buyPulsa()
{
    // Get available products
    $products = $this->prepaid->getProducts();

    // Get products by operator
    $axisProducts = $this->prepaid->getProductsByOperator('AX');

    // Search products
    $searchResults = $this->prepaid->searchProducts('5000');

    // Purchase
    $result = $this->prepaid->purchase('AX5', '08123456789', 'TRX001', '1234');

    return $result;
}

public function payElectricityBill()
{
    // Check bill first
    $bill = $this->postpaid->checkBillByParams(
        'PLN',
        '08123456789',
        '123456789012',
        '1234'
    );

    if ($bill->success) {
        // Pay the bill
        $payment = $this->postpaid->payBillByParams(
            $bill->trxid,
            'TRX002',
            '1234'
        );
        return $payment;
    }

    return $bill;
}

public function getTransactionHistory()
{
    // Get all transactions
    $history = $this->transaction->getHistory();

    // Get today's transactions
    $today = $this->transaction->getTodayTransactions();

    // Get pending transactions
    $pending = $this->transaction->getPendingTransactions();

    // Search transactions
    $search = $this->transaction->searchTransactions('pulsa');

    return $history;
}
```

Available Services
------------------

[](#available-services)

### Server Service

[](#server-service)

```
Tripay::server()->checkServer();
Tripay::server()->testConnection();
```

### Balance Service

[](#balance-service)

```
Tripay::balance()->getBalance();
Tripay::balance()->getBalanceAmount(); // Returns float
Tripay::balance()->isSufficientBalance(10000);
```

### Prepaid Service (Pulsa, Data, E-money, etc.)

[](#prepaid-service-pulsa-data-e-money-etc)

```
// Categories and Products
Tripay::prepaid()->getCategories();
Tripay::prepaid()->getOperators();
Tripay::prepaid()->getProducts();
Tripay::prepaid()->getProductsByOperator('TSEL');
Tripay::prepaid()->getProductDetail('TSEL5');
Tripay::prepaid()->searchProducts('5000');

// Transactions
Tripay::prepaid()->purchase($productId, $phone, $apiTrxId, $pin);
```

### Postpaid Service (PLN, PDAM, TV bills, etc.)

[](#postpaid-service-pln-pdam-tv-bills-etc)

```
// Categories and Products
Tripay::postpaid()->getCategories();
Tripay::postpaid()->getOperators();
Tripay::postpaid()->getProducts();
Tripay::postpaid()->getProductDetail('PLN');

// Bill Operations
Tripay::postpaid()->checkBillByParams($productId, $phone, $customerNo, $pin);
Tripay::postpaid()->payBillByParams($trxId, $apiTrxId, $pin);
Tripay::postpaid()->checkAndPayBill(..., $autoPay = true); // Check and pay in one call
```

### Transaction Service

[](#transaction-service)

```
// History
Tripay::transaction()->getHistory();
Tripay::transaction()->getHistoryByDate('2024-01-01', '2024-01-31');
Tripay::transaction()->getTodayTransactions();
Tripay::transaction()->getThisMonthTransactions();

// Details
Tripay::transaction()->getDetail('TRX001'); // By API transaction ID
Tripay::transaction()->getDetailByTrxId(12345); // By Tripay transaction ID

// Filtering
Tripay::transaction()->getPendingTransactions();
Tripay::transaction()->getSuccessfulTransactions();
Tripay::transaction()->getFailedTransactions();
Tripay::transaction()->searchTransactions('pulsa');
```

Data Transfer Objects (DTOs)
----------------------------

[](#data-transfer-objects-dtos)

This package uses strongly-typed DTOs for all API responses:

```
// Category Response
$categories = Tripay::prepaid()->getCategories();
foreach ($categories->data as $category) {
    echo $category->product_id;    // string
    echo $category->product_name;  // string
}

// Product Response
$products = Tripay::prepaid()->getProducts();
foreach ($products->data as $product) {
    echo $product->product_id;     // string
    echo $product->product_name;   // string
    echo $product->price;          // ?float
    echo $product->selling_price;  // ?float
}

// Transaction Response
$result = Tripay::prepaid()->purchase('AX5', '08123456789', 'TRX001', '1234');
echo $result->success;    // bool
echo $result->message;    // string
echo $result->trxid;      // ?int
echo $result->api_trxid;  // ?string
```

Error Handling
--------------

[](#error-handling)

The package provides comprehensive error handling:

```
use Tripay\PPOB\Exceptions\ApiException;
use Tripay\PPOB\Exceptions\AuthenticationException;
use Tripay\PPOB\Exceptions\ValidationException;

try {
    $result = Tripay::prepaid()->purchase('AX5', '08123456789', 'TRX001', '1234');
} catch (AuthenticationException $e) {
    // Invalid API key or credentials
    Log::error('Auth failed: ' . $e->getMessage());
} catch (ValidationException $e) {
    // Validation errors
    $errors = $e->getErrors();
    Log::error('Validation failed: ', $errors);
} catch (ApiException $e) {
    // General API errors
    Log::error('API Error: ' . $e->getMessage(), $e->getContext());
}
```

Caching
-------

[](#caching)

Products and categories are automatically cached to improve performance:

```
// Cache configuration in config/tripay.php
'cache' => [
    'enabled' => true,
    'ttl' => 43200, // 12 hours
    'prefix' => 'tripay',
    'store' => null, // Use default cache store
],

// Manual cache control
Tripay::prepaid()->getClient()->clearCache(); // Clear all cache
```

Artisan Commands
----------------

[](#artisan-commands)

The package includes useful Artisan commands:

```
# Test API connection
php artisan tripay:test-connection

# Sync categories from API (useful for seeding)
php artisan tripay:sync-categories

# Sync products from API
php artisan tripay:sync-products

# Clear package cache
php artisan tripay:clear-cache
```

Webhooks
--------

[](#webhooks)

Handle Tripay callbacks securely:

1. Publish webhook routes:

```
php artisan vendor:publish --provider="Tripay\PPOB\TripayServiceProvider" --tag="tripay-routes"
```

2. The package will automatically register webhook endpoint at `/api/tripay/webhook`
3. Create a listener for transaction updates:

```
use Tripay\PPOB\Events\TripayTransactionUpdated;

class UpdateTransactionStatus
{
    public function handle(TripayTransactionUpdated $event)
    {
        $transactionData = $event->transactionData;
        $signature = $event->signature;

        // Update your transaction status
        Transaction::where('api_trx_id', $transactionData['api_trxid'])
                  ->update(['status' => $transactionData['status']]);
    }
}
```

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

[](#contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Support
-------

[](#support)

- 📚 [Documentation](docs/)
- 🐛 [Issue Tracker](https://github.com/dwedaz/tripayid/issues)
- 💬 [Discussions](https://github.com/dwedaz/tripayid/discussions)

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance43

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity13

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

[![dwedaz](https://avatars.githubusercontent.com/u/1939059?v=4)](https://github.com/dwedaz "dwedaz (32 commits)")

### Embed Badge

![Health badge](/badges/dwedaz-tripayid/health.svg)

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

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

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