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 6y 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 4d 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://www.gravatar.com/avatar/733fc1f2441ce029f483493c25fb340b9a5238a597d9cb00cf5156313f8ff9f6?d=identicon)[ktpay](/maintainers/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

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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