PHPackages                             plutu/plutu-php - 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. [API Development](/categories/api)
4. /
5. plutu/plutu-php

ActiveLibrary[API Development](/categories/api)

plutu/plutu-php
===============

Plutu for php

1.1.2(2y ago)793711MITPHPPHP ^8.1

Since Feb 26Pushed 2y ago1 watchersCompare

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

READMEChangelog (4)Dependencies (3)Versions (6)Used By (1)

 [ ![Plutu](https://camo.githubusercontent.com/03d2dc2292edf13c64585eedafc14c0df94533875c045b8bc6dc227b6c5e1046/68747470733a2f2f706c7574752e6c792f77702d636f6e74656e742f75706c6f6164732f323032322f30332f706c7574752d6c6f676f2e737667) ](https://plutu.ly)

Official Plutu SDK for PHP
==========================

[](#official-plutu-sdk-for-php)

[![Version](https://camo.githubusercontent.com/e29335b630b99862ef5e54cc85c8ded827764e48d8d73347d280c55adbdea036/687474703a2f2f706f7365722e707567782e6f72672f706c7574752f706c7574752d7068702f76657273696f6e)](https://packagist.org/packages/plutu/plutu-php)[![Total Downloads](https://camo.githubusercontent.com/f87474d50ffa2aa6b35e63fd62f694608ae786d9dd90f7b23dcaa25132ef60d4/687474703a2f2f706f7365722e707567782e6f72672f706c7574752f706c7574752d7068702f646f776e6c6f616473)](https://packagist.org/packages/plutu/plutu-php)[![License](https://camo.githubusercontent.com/dd4b8779f03330d72c3ec185590644b0c534c9bca6e843992a68b3c091fd9345/68747470733a2f2f706f7365722e707567782e6f72672f706c7574752f706c7574752d7068702f6c6963656e7365)](https://packagist.org/packages/plutu/plutu-php)

The Plutu PHP package provides a streamlined integration of Plutu's services into PHP projects. It offers a generic interface that enables easy interaction with the Plutu API and services.

Getting started
---------------

[](#getting-started)

### Requirments

[](#requirments)

Before you can use the Plutu PHP package, you need to have a Plutu API key, access token, and secret key. You can obtain these from your [Plutu](https://plutu.ly) account dashboard.

- PHP version 8.1 or higher

### Official Documentation

[](#official-documentation)

Documentation for Plutu API can be found on the [Plutu Docs](https://docs.plutu.ly) website.

### Installation

[](#installation)

You can install the Plutu PHP package via Composer by running the following command:

```
composer require plutu/plutu-php

```

### Usage

[](#usage)

To use the Plutu PHP package in your project, you first need to include the Composer autoload file:

```
require_once __DIR__ . '/vendor/autoload.php';
```

To set credentials for Plutu PHP, you can use the following method:

```
use Plutu\Services\PlutuAdfali;
use Plutu\Services\PlutuSadad;
use Plutu\Services\PlutuLocalBankCards;
use Plutu\Services\PlutuTlync;
use Plutu\Services\PlutuMpgs;

// Adfali service
$api = new PlutuAdfali;
$api->setCredentials('api_key', 'access_token');
// Sadad service
$api = new PlutuSadad;
$api->setCredentials('api_key', 'access_token');
// Local Bank Cards service
$api = new PlutuLocalBankCards;
$api->setCredentials('api_key', 'access_token', 'secret_key');
// Tlync service
$api = new PlutuTlync;
$api->setCredentials('api_key', 'access_token', 'secret_key');
// MPGS service
$api = new PlutuMpgs;
$api->setCredentials('api_key', 'access_token', 'secret_key');
```

You can then use the various methods provided by the Plutu PHP to interact with the Plutu API. Each Plutu service has different methods and arguments, which you can check out in the examples provided `examples` section below.

```
$mobileNumber = '090000000'; // Mobile number should start with 09
$amount = 5.0; // amount in float format

try {

    $api = new PlutuAdfali;
    $api->setCredentials('api_key', 'access_token');
    $apiResponse = $api->verify($mobileNumber, $amount);

    if ($apiResponse->getOriginalResponse()->isSuccessful()) {
        // Process ID should be sent in the confirmation step
        $processId = $apiResponse->getProcessId();
    } elseif ($apiResponse->getOriginalResponse()->hasError()) {
        $errorCode = $apiResponse->getOriginalResponse()->getErrorCode();
        $errorMessage = $apiResponse->getOriginalResponse()->getErrorMessage();
    }

// Handle exceptions that may be thrown during the execution of the code
} catch (\Exception $e) {
    $exception = $e->getMessage();
}
```

Examples
--------

[](#examples)

The Plutu PHP package includes several examples that demonstrate how to use the package to interact with the Plutu API. The examples cover various use cases for Plutu's services. You can find the examples in the [Examples](https://github.com/getplutu/plutu-php/blob/main/examples.md) document.

Each example includes code snippets with explanations, as well as a link to the full source code. We recommend reviewing the examples to get a better understanding of how to use the package in your own projects.

##### List of Examples

[](#list-of-examples)

- [Usage](https://github.com/getplutu/plutu-php/blob/main/examples.md#usage)
- [Initialization](https://github.com/getplutu/plutu-php/blob/main/examples.md#initialization)
- [Services](https://github.com/getplutu/plutu-php/blob/main/examples.md#services)
    - [Adfali Payment Service](https://github.com/getplutu/plutu-php/blob/main/examples.md#adfali-payment-service)
        - [Verify Process (Send OTP)](https://github.com/getplutu/plutu-php/blob/main/examples.md#verify-process-send-otp)
        - [Confirm Process (Pay)](https://github.com/getplutu/plutu-php/blob/main/examples.md#confirm-process-pay)
    - [Sadad Payment Service](https://github.com/getplutu/plutu-php/blob/main/examples.md#sadad-payment-service)
        - [Verify Process (Send OTP)](https://github.com/getplutu/plutu-php/blob/main/examples.md#verify-process-send-otp-1)
        - [Confirm Process (Pay)](https://github.com/getplutu/plutu-php/blob/main/examples.md#confirm-process-pay-1)
    - [Local Bank Cards Payment Service](https://github.com/getplutu/plutu-php/blob/main/examples.md#local-bank-cards-payment-service)
        - [Confirm (Pay)](https://github.com/getplutu/plutu-php/blob/main/examples.md#confirm-pay)
        - [Callback Handler](https://github.com/getplutu/plutu-php/blob/main/examples.md#callback-handler)
    - [T-Lync Payment Service](https://github.com/getplutu/plutu-php/blob/main/examples.md#t-lync-payment-service)
        - [Confirm (Pay)](https://github.com/getplutu/plutu-php/blob/main/examples.md#confirm-pay-1)
        - [Callback Handler](https://github.com/getplutu/plutu-php/blob/main/examples.md#callback-handler-1)
        - [Return Handler](https://github.com/getplutu/plutu-php/blob/main/examples.md#return-handler)
    - [MPGS Payment Service](https://github.com/getplutu/plutu-php/blob/main/examples.md#mpgs-payment-service)
        - [Confirm (Pay)](https://github.com/getplutu/plutu-php/blob/main/examples.md#confirm-pay-2)
        - [Callback Handler](https://github.com/getplutu/plutu-php/blob/main/examples.md#callback-handler-2)
- [Exceptions and Error Handling](https://github.com/getplutu/plutu-php/blob/main/examples.md#exceptions-and-error-handling)

Official integrations
---------------------

[](#official-integrations)

The following integrations are fully supported and maintained by the Plutu team.

- [Plutu Laravel](https://github.com/getplutu/plutu-laravel)

Resources
---------

[](#resources)

- [Plutu Docs](https://docs.plutu.ly)

License
-------

[](#license)

The Plutu PHP package is open-source software licensed under the [MIT](https://opensource.org/licenses/MIT) License.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity57

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

Total

5

Last Release

989d ago

PHP version history (2 changes)1.0.0PHP ^8.0

1.1.1PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/0fcbfbc0b774367600a47e000d28f407dfc8d0cde4b5605428f8040a0df327ed?d=identicon)[getplutu](/maintainers/getplutu)

---

Top Contributors

[![getplutu](https://avatars.githubusercontent.com/u/126381629?v=4)](https://github.com/getplutu "getplutu (13 commits)")

---

Tags

phpplutusdkphpapipaymentservicesplutu

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/plutu-plutu-php/health.svg)

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

###  Alternatives

[checkout/checkout-sdk-php

Checkout.com SDK for PHP

553.3M7](/packages/checkout-checkout-sdk-php)[contributte/comgate

Comgate Payment Gateway for Nette Framework

19839.7k1](/packages/contributte-comgate)[postfinancecheckout/sdk

PostFinance Checkout SDK for PHP

22219.1k14](/packages/postfinancecheckout-sdk)[wallee/sdk

wallee SDK for PHP

12354.2k11](/packages/wallee-sdk)

PHPackages © 2026

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