PHPackages                             abdullahhafizh/jokul-php-library - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. abdullahhafizh/jokul-php-library

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

abdullahhafizh/jokul-php-library
================================

Jokul PHP Library

2.0.41(3y ago)1143MITPHP

Since Oct 28Pushed 3y ago1 watchersCompare

[ Source](https://github.com/abdullahhafizh/jokul-php-library)[ Packagist](https://packagist.org/packages/abdullahhafizh/jokul-php-library)[ Fund](https://issuehunt.io/r/abdullahhafizh)[ Fund](https://ko-fi.com/abdullahhafizh)[ RSS](/packages/abdullahhafizh-jokul-php-library/feed)WikiDiscussions main Synced today

READMEChangelog (10)DependenciesVersions (44)Used By (0)

Jokul PHP Library
=================

[](#jokul-php-library)

Official PHP Library for Jokul. Visit  for more information about the product and  for the technical documentation.

Table of Contents
-----------------

[](#table-of-contents)

- [Payment Channels Supported](#payment-channels-supported)
- [Requirements](#requirements)
- [Installation](#installation)
- [Usage](#usage)
    - [Setup Configuration](#setup-configuration)
    - [Virtual Account](#virtual-account)
    - [Handling HTTP Notification](#handling-http-notification)
- [Sample Project](#sample-project)
- [Help and Support](#help-and-support)

Payment Channels Supported
--------------------------

[](#payment-channels-supported)

Virtual Account

- BCA VA
- Bank Mandiri VA
- Bank Syariah Indonesia VA
- DOKU VA

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

[](#requirements)

- PHP 7.2 or above

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

[](#installation)

If you are using [Composer](https://getcomposer.org), you can install via composer CLI:

```
composer require doku/jokul-php-library

```

**or**

add this require line to your `composer.json` file:

example

```
{
    "require": {
        "doku/jokul-php-library": "2.1.0"
    }
}
```

and run `composer install` on your terminal.

Usage
-----

[](#usage)

### Setup Configuration

[](#setup-configuration)

Get your Client ID and Shared Key from Jokul Back Office. [Sandbox Jokul Back Office (for testing purpose)](https://sandbox.doku.com/bo/login) / [Production Jokul Back Office (for real payments)](https://jokul.doku.com/bo/login)

Setup your configuration:

```
// Instantiate class
$DOKUClient = new DOKU\Client;
// Set your Client ID
$DOKUClient->setClientID('[YOUR_CLIENT_ID]');
// Set your Shared Key
$DOKUClient->setSharedKey('[YOUR_SHARED_KEY]');
// Call this function for production use
$DOKUClient->isProduction(true);
```

If you want to hit to Sandbox, change to `$DOKUClient->isProduction(false);`.

### Virtual Account

[](#virtual-account)

First prepare your payment request data:

```
// Setup VA payment request data
$params = array(
    'customerEmail' => $arr["email"],
    'customerName' => $arr["customerName"],
    'amount' => $arr["amount"],
    'invoiceNumber' => random_strings(20),
    'expiryTime' => $arr["expiredTime"],
    'info1' => $arr["info1"],
    'info2' => $arr["info2"],
    'info3' => $arr["info3"],
    'reusableStatus' => $arr["reusableStatus"]
);
```

For further details of each parameter, please refer to our [Jokul Docs](https://jokul.doku.com/docs/docs/jokul-direct/virtual-account/virtual-account-overview).

#### BCA VA

[](#bca-va)

After preparing the payment request above, call this function to generate BCA VA:

```
// Call this function to generate BCA VA
$DOKUClient->generateBcaVa($params);
```

#### Bank Mandiri VA

[](#bank-mandiri-va)

After preparing the payment request above, call this function to generate Bank Mandiri VA:

```
// Call this function to generate Bank Mandiri VA
$DOKUClient->generateMandiriVa($params);
```

#### Bank Syariah Indonesia VA

[](#bank-syariah-indonesia-va)

After preparing the payment request above, call this function to generate Bank Syariah Indonesia VA:

```
// Call this function to generate Bank Syariah Indonesia VA
$DOKUClient->generateBsiVa($params);
```

#### DOKU VA

[](#doku-va)

After preparing the payment request above, call this function to generate DOKU VA:

```
// Call this function to generate DOKU VA
$DOKUClient->generateDokuVa($params);
```

### Handling HTTP Notification

[](#handling-http-notification)

For async payment from these channels:

- Virtual Account

We will send the HTTP Notification after the payment made from your customers. Therefore, you will need to handle the notification to update the transaction status on your end. Here is the steps:

1. Create notification URL (endpoint) on your server to receieve HTTP POST notification from Jokul. The notification will be sent to you whenever the transaction status is updated on Jokul side. The sample code available in [Jokul Java Example](https://github.com/PTNUSASATUINTIARTHA-DOKU/jokul-java-example).
2. Setup the notification URL that you made to the Payment Configuration on Jokul Back Office. [Sandbox Jokul Back Office (for testing purpose)](https://sandbox.doku.com/bo/login) / [Production Jokul Back Office (for real payments)](https://jokul.doku.com/bo/login)
3. Test the payment with our [Payment Simulator](https://sandbox.doku.com/integration/simulator) (for testing purpose)

Here is the sample of the notification endpoint that you need to setup:

```
// Mapping the notification received from Jokul
$notifyHeaders = getallheaders();
$notifyBody = json_decode(file_get_contents('php://input'), true); // You can use to parse the value from the notification body
$targetPath = '/payments/notifications'; // Put this value with your payment notification path
$secretKey = 'SK-xxxxxxx'; // Put this value with your Secret Key

// Prepare Signature to verify the notification authenticity
$signature = \DOKU\Common\Utils::generateSignature($notifyHeaders, $targetPath, file_get_contents('php://input'), $secretKey);

// Verify the notification authenticity
if ($signature == $notifyHeaders['Signature']) {
    http_response_code(200); // Return 200 Success to Jokul if the Signature is match
    // TODO update transaction status on your end to 'SUCCESS'
} else {
    http_response_code(401); // Return 401 Unauthorized to Jokul if the Signature is not match
    // TODO Do Not update transaction status on your end yet
}
```

For further reference, please refer to our [Jokul Docs](https://jokul.doku.com/docs).

Sample Project
--------------

[](#sample-project)

Please refer to this repo for the example project: [Jokul PHP Example](https://github.com/PTNUSASATUINTIARTHA-DOKU/jokul-php-example).

Help and Support
----------------

[](#help-and-support)

Got any issues? Found a bug? Have a feature requests? You can [open new issue](https://github.com/PTNUSASATUINTIARTHA-DOKU/jokul-php-library/issues/new).

For further information, you can contact us on .

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity63

Established project with proven stability

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

Total

43

Last Release

1206d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/79c1c30a16451a86d8cebea23a3354a6c02137682584d13d6953a8ec2bf9f992?d=identicon)[abdullahhafizh](/maintainers/abdullahhafizh)

### Embed Badge

![Health badge](/badges/abdullahhafizh-jokul-php-library/health.svg)

```
[![Health](https://phpackages.com/badges/abdullahhafizh-jokul-php-library/health.svg)](https://phpackages.com/packages/abdullahhafizh-jokul-php-library)
```

###  Alternatives

[ishanvyas22/asset-mix

Asset Mix plugin for CakePHP

3375.4k2](/packages/ishanvyas22-asset-mix)[prgayman/laravel-zatca

Laravel package a helper to Generate the QR code and signed it for ZATCA E-invoicing

2926.9k1](/packages/prgayman-laravel-zatca)[ducks-project/spl-types

Polyfill Module for SplType PHP extension. This extension aims at helping people making PHP a stronger typed language and can be a good alternative to scalar type hinting. It provides different typehandling classes as such as integer, float, bool, enum and string

1032.4k](/packages/ducks-project-spl-types)

PHPackages © 2026

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