PHPackages                             adityadarma/laravel-duitku - 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. adityadarma/laravel-duitku

ActiveLibrary[Payment Processing](/categories/payments)

adityadarma/laravel-duitku
==========================

Library payment gateway duitku for laravel

1.0.10(8mo ago)4330↓100%MITPHPPHP ^8.1

Since May 9Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/adityadarma/laravel-duitku)[ Packagist](https://packagist.org/packages/adityadarma/laravel-duitku)[ Docs](https://github.com/adityadarma/laravel-duitku)[ RSS](/packages/adityadarma-laravel-duitku/feed)WikiDiscussions main Synced today

READMEChangelog (9)Dependencies (1)Versions (12)Used By (0)

Laravel Duitku
==============

[](#laravel-duitku)

Laravel Duitku is package to provide payment gateway Duitku.

### Laravel Installation Instructions

[](#laravel-installation-instructions)

1. From your projects root folder in terminal run:

    ```
    composer require adityadarma/laravel-duitku
    ```
2. Install config:

    ```
    php artisan duitku:install
    ```

### Configuration

[](#configuration)

Laravel Duitku can be configured in directly in `/config/duitku.php`. Add variables to your `.env` file.

##### Environment File

[](#environment-file)

Here are the `.env` file variables available:

```
DUITKU_ENV=development
DUITKU_MERCHANT_CODE=xxxxxxx
DUITKU_API_KEY=xxxxxx
DUITKU_CALLBACK_URL=https://example.com/callback
DUITKU_RETURN_URL=https://example.com/return
```

### Usage API

[](#usage-api)

##### Get Payment Method

[](#get-payment-method)

example:

```
use AdityaDarma\LaravelDuitku\Facades\DuitkuAPI;

$listPayments = DuitkuAPI::getPaymentMethod(1000000);
```

##### Create Payment

[](#create-payment)

example:

```
use AdityaDarma\LaravelDuitku\Facades\DuitkuAPI;

DuitkuAPI::createTransaction([
    'merchantOrderId'   => 10000,
    'customerVaName'    => 'Aditya Darma',
    'email'             => 'email@example.com',
    'paymentAmount'     => 100000,
    'paymentMethod'     => 'VC',
    'productDetails'    => 'Buy Company',
    'expiryPeriod'      => 10,  // optional (minute)
    'phoneNumber'       => '08123456789', // optional
    'itemDetails'       => [ // optional
        [
            'name' => 'Test Item 1',
            'price' => 10000,
            'quantity' => 1
        ],[
            'name' => 'Test Item 2',
            'price' => 10000,
            'quantity' => 1
        ]
    ],
    'customerDetail'    => [ // optional
        'firstName'         => 'Aditya',
        'lastName'          => 'Darma',
        'email'             => 'email@example.com',
        'phoneNumber'       => $phoneNumber,
        'billingAddress'    => $address,
        'shippingAddress'   => $address
    ],
    'additionalParam'   => '', // optional
    'merchantUserInfo'  => '', // optional
]);
```

[List Payment Method](https://docs.duitku.com/api/id/#metode-pembayaran)

##### Check Transaction

[](#check-transaction)

example:

```
use AdityaDarma\LaravelDuitku\Facades\DuitkuAPI;

DuitkuAPI::checkTransactionStatus(1000000);
```

##### Handle Callback Transaction

[](#handle-callback-transaction)

example:

```
use AdityaDarma\LaravelDuitku\Facades\DuitkuAPI;

$payment = DuitkuAPI::getNotificationTransaction();
```

### Usage POP

[](#usage-pop)

##### Create Payment

[](#create-payment-1)

example:

```
use AdityaDarma\LaravelDuitku\Facades\DuitkuPOP;

DuitkuPOP::createTransaction([
    'merchantOrderId'   => 10000,
    'customerVaName'    => 'Aditya Darma',
    'email'             => 'email@example.com',
    'paymentAmount'     => 100000,
    'productDetails'    => 'Buy Company',
    'expiryPeriod'      => 10,  // optional (minute)
    'phoneNumber'       => '08123456789', // optional
    'itemDetails'       => [ // optional
        [
            'name' => 'Test Item 1',
            'price' => 10000,
            'quantity' => 1
        ],[
            'name' => 'Test Item 2',
            'price' => 10000,
            'quantity' => 1
        ]
    ],
    'customerDetail'    => [ // optional
        'firstName'         => 'Aditya',
        'lastName'          => 'Darma',
        'email'             => 'email@example.com',
        'phoneNumber'       => $phoneNumber,
        'billingAddress'    => $address,
        'shippingAddress'   => $address
    ],
    'additionalParam'   => '', // optional
    'merchantUserInfo'  => '', // optional
]);
```

[List Payment Method](https://docs.duitku.com/pop/id/?php#payment-method)

#### Modal Pop Up Duitku JS

[](#modal-pop-up-duitku-js)

- Production

```

```

- Sandbox

```

```

- Implement

```
checkout.process("DXXXXS875LXXXX32IJZ7", {
    defaultLanguage: "id", //optional
    successEvent: function(result){
        console.log(result);
        alert('Payment Success');
    },
    pendingEvent: function(result){
        console.log(result);
        alert('Payment Pending');
    },
    errorEvent: function(result){
        console.log(result);
        alert('Payment Error');
    },
    closeEvent: function(result){
        console.log(result);
        alert('customer closed the popup without finishing the payment');
    }
});

```

##### Handle Callback Transaction

[](#handle-callback-transaction-1)

example:

```
use AdityaDarma\LaravelDuitku\Facades\DuitkuPOP;

$payment = DuitkuPOP::getNotificationTransaction();
```

License
-------

[](#license)

This Package is licensed under the MIT license. Enjoy!

###  Health Score

38

—

LowBetter than 86% of packages

Maintenance61

Regular maintenance activity

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

Recently: every ~35 days

Total

11

Last Release

249d ago

### Community

Maintainers

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

---

Top Contributors

[![adityadarma](https://avatars.githubusercontent.com/u/37822288?v=4)](https://github.com/adityadarma "adityadarma (28 commits)")

---

Tags

laravelduitkularavel duitku

### Embed Badge

![Health badge](/badges/adityadarma-laravel-duitku/health.svg)

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

###  Alternatives

[evryn/laravel-toman

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

1079.8k](/packages/evryn-laravel-toman)[zoparga/laravel-szamlazzhu

Szamlazz.hu integration for Laravel

1120.5k1](/packages/zoparga-laravel-szamlazzhu)

PHPackages © 2026

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