PHPackages                             ktpay/ktwidget-api-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. ktpay/ktwidget-api-php

ActiveLibrary[API Development](/categories/api)

ktpay/ktwidget-api-php
======================

PHP client for ktwidget

011PHP

Since Jul 1Pushed 7y ago1 watchersCompare

[ Source](https://github.com/ktpay/ktwidget-api-php)[ Packagist](https://packagist.org/packages/ktpay/ktwidget-api-php)[ RSS](/packages/ktpay-ktwidget-api-php/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

KTWidget API client (Language PHP)
==================================

[](#ktwidget-api-client-language-php)

[![pipeline status](https://camo.githubusercontent.com/10e4f11847b655bb8de379125b44ce13fe4c3dbf36376d1da765ab2e03537e60/68747470733a2f2f6769746c61622e636f6d2f6e706c7573746563682f6b747769646765742d73646b2d7068702f6261646765732f6d61737465722f706970656c696e652e737667)](https://gitlab.com/nplustech/ktwidget-sdk-php/commits/master)[![coverage report](https://camo.githubusercontent.com/5d4a0aee715dc6422f7ff02d7abeebc532420be13d5b9c7b85f6baeb07d5b720/68747470733a2f2f6769746c61622e636f6d2f6e706c7573746563682f6b747769646765742d73646b2d7068702f6261646765732f6d61737465722f636f7665726167652e737667)](https://gitlab.com/nplustech/ktwidget-sdk-php/commits/master)

### Installation

[](#installation)

First download and install [composer](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-macos). In our project root directory

```
composer require ktpay/ktwidget-api-php:dev-master
```

On production environment

```
composer install --no-ansi --no-dev --no-interaction --no-progress --no-scripts --optimize-autoloader
```

If your project has not been used `composer` before:

- Load `require_once __DIR__ . './vendor/autoload.php';` bootstrap in our "main" file
- Then use it

### Base usage

[](#base-usage)

```
$appID = "xxx";
$appKey = "xxx";
$apiRequest = new \KTWidget\Merchant\Request($appID, $appKey);

$response = $apiRequest->nameOfApiMethod(['data' => []]);

if (!$response->success()) {
    var_dump($response->message());
    die();
}

var_dump($response->data())
```

### Payment create

[](#payment-create)

```
$response = $apiRequest->paymentCreate([
    "order" => [
        "amount" => 1000,
        "order_id" => "Order1",
        "description" => "Тестовая оплата за Order1",
        "callback_back_url" => "https://our.store.kz",
        "type" => "ecom",
    ],
    "user" => [
        "merchant_user_id" => "user1",
        "phone" => "+77001234567",
        "email" => "test@example.com",
    ]
]);
```

### Tests

[](#tests)

Run this

```
[user@localhost xxx]$ KTPAYAPI_APP_KEY=xxx;KTPAYAPI_KEY=yyy phpunit
```

Or add environments into config file `phpunit.xml`

```

    ...

    ...

```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 96.9% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/48579491?v=4)[ktpay](/maintainers/ktpay)[@ktpay](https://github.com/ktpay)

---

Top Contributors

[![nickarsar](https://avatars.githubusercontent.com/u/1687549?v=4)](https://github.com/nickarsar "nickarsar (31 commits)")[![kovalevcon](https://avatars.githubusercontent.com/u/13128872?v=4)](https://github.com/kovalevcon "kovalevcon (1 commits)")

### Embed Badge

![Health badge](/badges/ktpay-ktwidget-api-php/health.svg)

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M19](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k12](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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