PHPackages                             inpayuz/inpay-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. [Payment Processing](/categories/payments)
4. /
5. inpayuz/inpay-php

ActiveLibrary[Payment Processing](/categories/payments)

inpayuz/inpay-php
=================

Official inPAY PHP SDK — create invoices, check status, and verify webhooks for the inPAY payment platform (Uzbekistan).

v1.0.1(1mo ago)06MITPHPPHP &gt;=7.4CI passing

Since Jul 12Pushed 1mo agoCompare

[ Source](https://github.com/inpayuz/inpay-php)[ Packagist](https://packagist.org/packages/inpayuz/inpay-php)[ Docs](https://inpay.uz)[ RSS](/packages/inpayuz-inpay-php/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

inPAY PHP SDK
=============

[](#inpay-php-sdk)

Official PHP SDK for the [inPAY](https://inpay.uz) payment platform (Uzbekistan). One inPAY contract → accept **Click, Payme, UzCard/HUMO** with a few lines of code.

> Bitta inPAY shartnomasi bilan barcha to'lov usullarini qabul qiling — har bir PSP bilan alohida integratsiya qilish shart emas.

O'rnatish / Installation
------------------------

[](#ornatish--installation)

```
composer require inpayuz/inpay-php
```

Talab: PHP ≥ 7.4, `ext-curl`, `ext-json`.

Tez boshlash / Quick start
--------------------------

[](#tez-boshlash--quick-start)

```
use InPay\InPay;

$inpay = new InPay([
    'merchant_id'    => 12345,          // kassa merchant_id
    'bearer_token'   => 'xxxxxxxx',     // kassa bearer token
    'webhook_secret' => 'yyyyyyyy',     // webhook imzosi uchun
]);

// 1) To'lov yaratish
$invoice = $inpay->create([
    'amount'       => 50000,            // so'm (min 1000)
    'callback_url' => 'https://shop.uz/inpay/webhook.php',
    'order_id'     => 'A-123',          // sizning ichki reference
]);

header('Location: ' . $invoice->payUrl);   // foydalanuvchini yo'naltiring
```

`$invoice`:

XususiyatIzoh`$invoice->orderId`inPAY buyurtma ID (16 hex)`$invoice->payUrl`Universal checkout sahifasi`$invoice->payUrlLink`So'ralgan usulga mos to'g'ridan havola`$invoice->payLinks``['click'=>..., 'payme'=>...]` to'g'ridan havolalar### To'g'ridan-to'g'ri bitta usul

[](#togridan-togri-bitta-usul)

```
$invoice = $inpay->create([
    'amount'         => 50000,
    'payment_method' => 'click',   // 'click' | 'payme' | 'myuzcard'
]);
header('Location: ' . $invoice->payUrlLink);
```

2) Holatni tekshirish / Status
------------------------------

[](#2-holatni-tekshirish--status)

```
$tx = $inpay->status('a1b2c3d4e5f6a7b8');
if ($tx->isPaid()) {
    // ...
}
// $tx->status: 'pending' | 'success' | 'failed'
```

3) Webhook (payment.success)
----------------------------

[](#3-webhook-paymentsuccess)

inPAY to'lov muvaffaqiyatli bo'lganda `callback_url`'ingizga POST yuboradi va uni `X-InPAY-Signature` (HMAC-SHA256) bilan imzolaydi. SDK imzoni **constant-time**tekshiradi.

```
use InPay\InPay;
use InPay\Transaction;

$inpay = new InPay([
    'merchant_id'    => 12345,
    'bearer_token'   => 'xxxxxxxx',
    'webhook_secret' => 'yyyyyyyy',
]);

$inpay->webhook()->onSuccess(function (Transaction $tx) {
    // ⚠️ IDEMPOTENT bo'ling — takror kelishi mumkin
    // if (already_paid($tx->orderId)) return;
    // mark_paid($tx->orderId, $tx->amount);
});
```

Qo'lda tekshirish (framework ichida):

```
$wh   = $inpay->webhook();
$body = file_get_contents('php://input');
$sig  = $_SERVER['HTTP_X_INPAY_SIGNATURE'] ?? '';

if ($wh->isValid($body, $sig)) {
    $tx = $wh->verify($body, $sig);   // Transaction
}
```

> **Xavfsizlik:** imzo tekshiruvidan o'tmagan webhook'ni HECH QACHON to'lov deb qabul qilmang. Tekshiruvsiz har kim soxta `success` yuborishi mumkin.

Xatolar / Errors
----------------

[](#xatolar--errors)

```
use InPay\Exception\ApiException;      // inPAY biznes-xatosi (error_code bilan)
use InPay\Exception\SignatureException;// webhook imzosi mos emas
use InPay\Exception\InPayException;    // bazaviy tur (hammasini ushlaydi)

try {
    $inpay->create([...]);
} catch (ApiException $e) {
    echo $e->getErrorCode();   // masalan "MERCHANT_INACTIVE", "AMOUNT_TOO_LOW"
}
```

Litsenziya
----------

[](#litsenziya)

MIT © inPAY

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance90

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

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

Total

2

Last Release

49d ago

### Community

Maintainers

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

---

Top Contributors

[![inpayuz](https://avatars.githubusercontent.com/u/263878881?v=4)](https://github.com/inpayuz "inpayuz (2 commits)")

---

Tags

paymentinvoicewebhookclickУзбекистанinpaypaymeHumouzcard

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[payum/offline

The Payum extension. It provides Offline payment integration.

324.1M20](/packages/payum-offline)[omalizadeh/laravel-multi-payment

A driver-based laravel package for online payments via multiple gateways

491.2k](/packages/omalizadeh-laravel-multi-payment)

PHPackages © 2026

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