PHPackages                             ibnuhalimm/laravel-tripay - 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. ibnuhalimm/laravel-tripay

ActiveLibrary[Payment Processing](/categories/payments)

ibnuhalimm/laravel-tripay
=========================

Laravel Wrapper for Tripay Payment Gateway

v1.1.1(3y ago)049MITPHPPHP ^7.4|^8.0

Since Jun 15Pushed 3y ago1 watchersCompare

[ Source](https://github.com/ibnuhalimm/laravel-tripay)[ Packagist](https://packagist.org/packages/ibnuhalimm/laravel-tripay)[ Docs](https://github.com/ibnuhalimm/laravel-tripay)[ RSS](/packages/ibnuhalimm-laravel-tripay/feed)WikiDiscussions 1.x Synced 1mo ago

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

Laravel - Tripay
================

[](#laravel---tripay)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1d369e6f32399995a3617246ba970a5a0010d23013034fe9d4ff335bc4ef5a12/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f69626e7568616c696d6d2f6c61726176656c2d7472697061792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ibnuhalimm/laravel-tripay)[![Total Downloads](https://camo.githubusercontent.com/596a460a684bab01ae6425de9551fc33cd72fde4d5ab72701ae75aebf64e4c26/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f69626e7568616c696d6d2f6c61726176656c2d7472697061792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ibnuhalimm/laravel-tripay)

Laravel wrapper for [Tripay](https://tripay.co.id/) payment gateway.

Contents
--------

[](#contents)

- [Installation](#installation)
- [Setting Up](#setting-up)
- [Usage](#usage)
- [Testing](#testing)
- [Changelog](#changelog)
- [Contributing](#contributing)
- [Security](#security)
- [Credits](#credits)
- [License](#license)

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

[](#installation)

You can install the package via composer:

```
composer require ibnuhalimm/laravel-tripay
```

Optionally, you can publish the config file of this package with this command:

```
php artisan vendor:publish --tag="laravel-tripay-config"
```

Setting up
----------

[](#setting-up)

Put some environment variable to `.env` file:

```
TRIPAY_MERCHANT_CODE=
TRIPAY_API_KEY=
TRIPAY_PRIVATE_KEY=
TRIPAY_PRODUCTION_MODE=
```

\*\* Valid value for `TRIPAY_PRODUCTION_MODE` is `true` or `false`

Usage
-----

[](#usage)

You can directly use the `Tripay` Facade (the alias or class itself):

#### Payment Channels

[](#payment-channels)

```
use Ibnuhalimm\LaravelTripay\Facades\Tripay;

// Get all available payment channels
Tripay::paymentChannels();

// Or get single payment channels by specifying the code
Tripay::paymentChannels('BRIVA');
```

#### Get Fee of Payment Channel

[](#get-fee-of-payment-channel)

```
use Ibnuhalimm\LaravelTripay\Facades\Tripay;

$amount = 12000;
$paymentChannelCode = 'BRIVA';
Tripay::feeCalculator($amount, $paymentChannelCode);
```

#### Fetch the Transactions

[](#fetch-the-transactions)

```
use Ibnuhalimm\LaravelTripay\Facades\Tripay;

Tripay::transactions();
```

#### Get Transaction Details

[](#get-transaction-details)

```
use Ibnuhalimm\LaravelTripay\Facades\Tripay;

$reference = 'DEV-T11958501451EJYV'; // Get from create transaction response / Transaction list
Tripay::transactionDetails($reference);
```

#### Create a Transaction

[](#create-a-transaction)

```
use Ibnuhalimm\LaravelTripay\Facades\Tripay;

// All required parameters
$params = [
    'method'            => 'MANDIRIVA',
    'merchant_ref'      => 'INV-123456',
    'amount'            => 25000,
    'customer_name'     => 'Your Customer Name',
    'customer_email'    => 'customer.email@domain.com',
    'customer_phone'    => '081234567890',
    'order_items'       => [
        [
            'name'        => 'Product Name 1',
            'price'       => 6000,
            'quantity'    => 2
        ],
        [
            'name'        => 'Product Name 2',
            'price'       => 13000,
            'quantity'    => 1
        ]
    ]
];

// You can override the callback URL
// By adding the `callback_url` parameter
$params = [
    ...
    'callback_url' => 'https://yourdomain.tld/callback',
    ...
];

// By default, expired time will be set for 24 hours
// You can change it by adding 'expired_time'
$params = [
    ...
    'expired_time' => 1582855837 // Should be in integer value as unix format
    ...
];

// Add more info of ordered items
$params = [
    ...
    'order_items'    => [
        [
            'sku'         => 'FB-01',
            'name'        => 'Product Name',
            'price'       => 20000,
            'quantity'    => 1,
            'product_url' => 'https://yourstore.com/product/product-01',
            'image_url'   => 'https://yourstore.com/product/product-01.jpg',
        ],
        [
            'sku'         => 'FB-07',
            'name'        => 'Product Name 2',
            'price'       => 5000,
            'quantity'    => 1,
            'product_url' => 'https://yourstore.com/product/product-02',
            'image_url'   => 'https://yourstore.com/product/product-02.jpg',
        ]
    ],
    ...
];

Tripay::createTransaction($params);
```

#### Override Default Config

[](#override-default-config)

```
use Ibnuhalimm\LaravelTripay\Facades\Tripay;

// Override the default config
Tripay::setConfig([
    'merchant_code' => 'NEW-CODE',
    'api_key' => 'ANOTHER-API-KEY',
    ...
])->paymentChannels();
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

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

Credits
-------

[](#credits)

- [Ibnu Halim Mustofa](https://github.com/ibnuhalimm)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

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

Total

4

Last Release

1421d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/14322078?v=4)[IBNU HALIM MUSTOFA](/maintainers/ibnuhalimm)[@ibnuhalimm](https://github.com/ibnuhalimm)

---

Top Contributors

[![ibnuhalimm](https://avatars.githubusercontent.com/u/14322078?v=4)](https://github.com/ibnuhalimm "ibnuhalimm (6 commits)")

---

Tags

payment gatewayibnuhalimmlaravel-tripay

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ibnuhalimm-laravel-tripay/health.svg)

```
[![Health](https://phpackages.com/badges/ibnuhalimm-laravel-tripay/health.svg)](https://phpackages.com/packages/ibnuhalimm-laravel-tripay)
```

###  Alternatives

[shetabit/multipay

PHP Payment Gateway Integration Package

291348.2k3](/packages/shetabit-multipay)[luigel/laravel-paymongo

A laravel wrapper for Paymongo API

7956.2k1](/packages/luigel-laravel-paymongo)[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)[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4845.9k](/packages/sebdesign-laravel-viva-payments)[karson/mpesa-php-sdk

172.2k](/packages/karson-mpesa-php-sdk)[henryejemuta/laravel-monnify

A laravel package to seamlessly integrate monnify api within your laravel application

132.1k](/packages/henryejemuta-laravel-monnify)

PHPackages © 2026

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