PHPackages                             puresoft/jibimo-api - 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. puresoft/jibimo-api

AbandonedArchivedLibrary[Payment Processing](/categories/payments)

puresoft/jibimo-api
===================

This library will connect to Jibimo API and bring you a reliable interface to work with

v1.1.0(6y ago)0161MITPHPPHP &gt;=7.1.0

Since May 26Pushed 6y ago1 watchersCompare

[ Source](https://github.com/J-TAG/jibimo-api-php-lib)[ Packagist](https://packagist.org/packages/puresoft/jibimo-api)[ RSS](/packages/puresoft-jibimo-api/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (1)

🏢 Jibimo API PHP Library
========================

[](#-jibimo-api-php-library)

Welcome to PHP library of Jibimo API, This library will make payment development like a breeze for you!

[![Travis (.org)](https://camo.githubusercontent.com/34f9f47c5d8d6c9be10fa6033061b20f67f1f1b32a08a9dfa9fde5ea81ac123c/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6a2d7461672f6a6962696d6f2d6170692d7068702d6c69622e737667)](https://camo.githubusercontent.com/34f9f47c5d8d6c9be10fa6033061b20f67f1f1b32a08a9dfa9fde5ea81ac123c/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6a2d7461672f6a6962696d6f2d6170692d7068702d6c69622e737667)[![GitHub release](https://camo.githubusercontent.com/f885ba3c192fcccc079098ae5dffded52c4ee56a48b22b86ed33d757079f7a81/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6a2d7461672f6a6962696d6f2d6170692d7068702d6c69622e737667)](https://camo.githubusercontent.com/f885ba3c192fcccc079098ae5dffded52c4ee56a48b22b86ed33d757079f7a81/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6a2d7461672f6a6962696d6f2d6170692d7068702d6c69622e737667)[![PHP from Packagist](https://camo.githubusercontent.com/40da17b3b8ba76bd97dccc6702ec4b223609f5a9cb66eb3ecfb00192a66b14a3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f70757265736f66742f6a6962696d6f2d6170692e737667)](https://camo.githubusercontent.com/40da17b3b8ba76bd97dccc6702ec4b223609f5a9cb66eb3ecfb00192a66b14a3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f70757265736f66742f6a6962696d6f2d6170692e737667)

🎁 Quick Start
-------------

[](#-quick-start)

Actually this library is a general purpose wrapper around the main Jibimo REST API. So it will provide several data model objects and services to use Jibimo API in PHP easily.

Also this library provides a simple exception handling footprint for you to easily find problems of communication with Jibimo REST API.

Below you can see a quick start of how using this package:

### 🎩 Installation

[](#-installation)

Simply install this package using following composer command:

```
composer require puresoft/jibimo-api --prefer-stable
```

So this will check required components of library and install them along with the library itself.

### 💵 Request Money from People

[](#-request-money-from-people)

For using Jibimo money request API you should first initiate the transaction and redirect user to the gateway, after returning back from gateway you **MUST** validate the transaction, and if the transaction was valid and accepted, you are all set and user was paid you correctly.

Below you can see the instruction:

#### 👍 Initiating Transaction and Redirecting User to Gateway

[](#-initiating-transaction-and-redirecting-user-to-gateway)

Use following code to initiate a request transaction and redirect user to gateway:

```
$baseUrl = "https://jibimo.com/api";
$token = "..."; // You should obtain this token from your Jibimo panel

$mobile = "09366061280";
$amountInToman = 8500;
$privacyLevel = JibimoPrivacyLevel::PUBLIC;
$trackerId = "xxxx"; // Anything like a factor number or maybe a UUID, it's up to you
$description = "Thank you for using our service :)"; // Optional, this will show up in Jibimo feed
$returnUrl = "http://mywebsite.com/callback/?something=somethingelse"; // Optional, after paymnt, Jibimo will redirect user to this URL. If you omit it, Jibimo will redirect user to your company homepage

$response = Jibimo::request($baseUrl, $token, $mobile,
            $amountInToman, $privacyLevel, $trackerId, $description, $returnUrl);

// Status of transaction must be `Pending`
if(JibimoTransactionStatus::PENDING === $response->getStatus()) {

    // Save Jibimo transaction ID to database or whatever to use that to verify transaction later
    // $response->getTransactionId();

    // Now, redirect user to Jibimo gateway
    $redirect = $response->getRedirectUrl();
    header("Location: $redirect");
    exit();
}
```

After redirecting user to Jibimo gateway, they will see a web page to pay you money through Jibimo account or normal banking gateway.

#### ✔️ Verifying Request Transactions

[](#️-verifying-request-transactions)

After that, they will be back to your provided `$returnUrl`, so you can validate their transaction there:

```
$baseUrl = "https://jibimo.com/api";
$token = "..."; // You should obtain this token from your Jibimo panel

$transactionId = X; // You should get this transaction ID from where you saved it when you were creating the request in the previous step
$mobile = "09366061280";
$amountInToman = 8500;
$trackerId = "xxxx"; //Tracker ID of main transaction

$validationResult = Jibimo::validateRequest($baseUrl, $token, $transactionId,
            $mobile, $amountInToman, $trackerId);

// Validate and check status of transaction in Jibimo
if($validationResult->isAccepted()) {
    // Transaction was successful, user paid money correctly
}
// Otherwise, there is a problem. You can get raw response or handle exceptions to find out why there is still problem
```

### 💲 Pay Money to People

[](#-pay-money-to-people)

Using Jibimo Payment API is straight forward.

Simply you will pay money and then validate it. There is no extra step like request money to show gateway or anything else to user.

#### 📫 Using Jibimo Pay API

[](#-using-jibimo-pay-api)

Use following code to pay to a mobile number which may or may not be registered in Jibimo. If the mobile number registered in Jibimo, money will be transferred to its Jibimo account immediately, otherwise it will be pending for user to be registered in Jibimo. They will be receive an SMS by Jibimo to be informed about payment.

```
$baseUrl = "https://jibimo.com/api";
$token = "..."; // You should obtain this token from your Jibimo panel

$mobile = "09366061280";
$amountInToman = 8500;
$privacyLevel = JibimoPrivacyLevel::PUBLIC;
$trackerId = "xxxx"; // Anything like a factor number or maybe a UUID, it's up to you
$description = "Thank you for using our service :)"; // Optional, this will show up in Jibimo feed

$response = Jibimo::pay($baseUrl, $token, $mobile,
            $amountInToman, $privacyLevel, $trackerId, $description);

// Here you should save transaction ID to verify it later
// $response->getTransactionId();

if(JibimoTransactionStatus::ACCEPTED === $response->getStatus()) {
    // Money was paid immediately
} else if(JibimoTransactionStatus::PENDING === $response->getStatus()) {
    // The user was not registered in Jibimo, so it will be pending until user being registered in Jibimo
}

// For other problems and errors, you can see the raw response or catch exceptions
```

#### ✔️ Verifying Pay Transactions

[](#️-verifying-pay-transactions)

Validating pay transactions is easy. You can use following code:

```
$baseUrl = "https://jibimo.com/api";
$token = "..."; // You should obtain this token from your Jibimo panel

$transactionId = X; // You should get this transaction ID from where you saved it when you were creating the request in the previous step
$mobile = "09366061280";
$amountInToman = 8500;
$trackerId = "xxxx"; // Tracker ID of main transaction

$validationResult = Jibimo::validatePay($baseUrl, $token, $transactionId,
            $mobile, $amountInToman, $trackerId);

// Validate and check status of transaction in Jibimo
if($validationResult->isAccepted()) {
    // Transaction was successful, user received money
}
// Otherwise, there is a problem. You can get raw response or handle exceptions to find out why there is still problem
```

### 🚄 Extended Pay AKA Direct Pay API

[](#-extended-pay-aka-direct-pay-api)

Using Jibimo *Extended Payment* API, you can pay directly to bank account of people using the combination of their mobile number and IBAN (Sheba) number.

The difference between this method and the normal payment is in IBAN (Sheba) number and also in extended payment, money will be directly transferred to the original bank account of user whereas in normal payment it would transfer to the Jibimo account of user. So if the user is not registered in Jibimo, it will get money anyway without even contacting with any of Jibimo services.

#### 🌈 Using Jibimo Extended Pay API

[](#-using-jibimo-extended-pay-api)

Use following code to pay to combination of a mobile number and IBAN (Sheba) number which may or may not be registered in Jibimo. In this method, money will be transferred directly to the original bank account of user using *Paya*.

```
$baseUrl = "https://jibimo.com/api";
$token = "..."; // You should obtain this token from your Jibimo panel

$mobile = "09366061280";
$amountInToman = 8500;
$iban = "IR140570028870010133089001"; // This is my real IBAN(Sheba), so keep your head up to not pay to it mistakenly, I will not return back your money to you ! :D
$privacyLevel = JibimoPrivacyLevel::PUBLIC;
$trackerId = "xxxx"; // Anything like a factor number or maybe a UUID, it's up to you
$description = "Thank you for using our service :)"; // Optional, this will show up in Jibimo feed
$name = "حسام"; // Optional, The first name of IBAN(Sheba) owner
$family = "غلامی"; // Optional, The last name of IBAN(Sheba) owner

$response = Jibimo::extendedPay($baseUrl, $token, $mobile,
            $amountInToman, $privacyLevel, $iban, $trackerId,
            $description, $name, $family);

// Here you should save transaction ID to verify it later
// $response->getTransactionId();

if(JibimoTransactionStatus::ACCEPTED === $response->getStatus()) {
    // Money was paid successfully
}

// For other problems and errors, you can see the raw response or catch exceptions
```

#### ✔️ Verifying Extended Pay Transactions

[](#️-verifying-extended-pay-transactions)

Validating extended pay transactions is easy. You can use following code:

```
$baseUrl = "https://jibimo.com/api";
$token = "..."; // You should obtain this token from your Jibimo panel

$transactionId = X; // You should get this transaction ID from where you saved it when you were creating the request in the previous step
$mobile = "09366061280";
$amountInToman = 8500;
$trackerId = "xxxx"; // Tracker ID of main transaction

$validationResult = Jibimo::validateExtendedPay($baseUrl, $token, $transactionId,
            $mobile, $amountInToman, $trackerId);

// Validate and check status of transaction in Jibimo
if($validationResult->isAccepted()) {
    // Transaction was successful, user received money
}
// Otherwise, there is a problem. You can get raw response or handle exceptions to find out why there is still problem
```

That was it!, hope this quick start will help you up and running quickly.

Please feel free to post an issue if you found any problems in this package.

📃 Jibimo API Specifications
---------------------------

[](#-jibimo-api-specifications)

To better understanding Jibimo API specifications you can see it’s API documentation available at  . But here you can find a simple cheat sheet to use.

### 🎭 Privacy Levels

[](#-privacy-levels)

Jibimo has 3 privacy levels to show transactions to users.

#### 😃 Personal

[](#-personal)

It means the transaction is only visible between two parties that are involved in it, meaning payer and payee. So only these two people can see this transaction.

#### 👪 Friend

[](#-friend)

It means the transaction is only visible between two parties that are involved in it **AND** their friends, meaning payer and payee and Jibimo friends of payer and Jibimo friends of payee.

Note

In this privacy level, the amount of transaction is not visible for people other than payer and payee.

#### 🏦 Public

[](#-public)

Means anyone who is registered in Jibimo can see this transaction. So it can be a good point for promoting your products in a social media like, type of feed.

Note

In this privacy level, the amount of transaction is not visible for people other than payer and payee.

### 🚦 Transaction Statuses

[](#-transaction-statuses)

In Jibimo API, transactions have three different statuses.

#### ⛔️ Rejected

[](#️-rejected)

Means one of parties were reject to accept the transaction or there is a problem with the transaction.

For example in request money API, if user clicks the cancel button, the transaction status will be set to `Rejected`. Or if you pay to an invalid IBAN(Sheba) number, the transaction status will be `Rejected` after failure response from bank to Jibimo.

#### 🕞 Pending

[](#-pending)

This status means the transaction is pending for something else to happen.

For example if you pay to a user who is not registered in Jibimo using normal pay API, the transaction will be pending until the user comes in Jibimo.

#### ✅ Accepted

[](#-accepted)

This status means that transaction was successful and everything went cool.

### 📱 Mobile Number Format

[](#-mobile-number-format)

This package will try to normalize your mobile numbers to match it with Jibimo API requirement.

In Jibimo API, mobile number must be in following format:

`+989366061280`

But in this package you can use following formats as well:

`9366061280``09366061280``989366061280``+989366061280`

All of above formats are supported.

### 📊 IBAN (Sheba) Format

[](#-iban-sheba-format)

like mobile number, this package will try to normalize your IBAN(Sheba) numbers too.

In Jibimo API, IBAN(Sheba) number must be in following format:

`140570028870010133089001`

But in this package you can use both formats with or without leading `IR`:

`140570028870010133089001``IR140570028870010133089001`

All of above formats are supported.

💝 Contributing
--------------

[](#-contributing)

If you enjoyed this project, please consider contributing to it and make it better.

And please don’t forget to give a star to this project.

Thank you and happy coding!

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

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

Total

2

Last Release

2525d ago

### Community

Maintainers

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

---

Top Contributors

[![j-tag](https://avatars.githubusercontent.com/u/3483320?v=4)](https://github.com/j-tag "j-tag (37 commits)")

---

Tags

jibimopaymentpayment-gatewaypayment-servicephpphp-library

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/puresoft-jibimo-api/health.svg)

```
[![Health](https://phpackages.com/badges/puresoft-jibimo-api/health.svg)](https://phpackages.com/packages/puresoft-jibimo-api)
```

###  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)
