PHPackages                             payger/php-sdk - 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. payger/php-sdk

ActiveLibrary[Payment Processing](/categories/payments)

payger/php-sdk
==============

The Payger SDK for PHP is a library that enables PHP developers to easily make requests to the Payger Merchant API.

v1.0(7y ago)07GPL-2.0-or-laterPHPPHP &gt;=5.3.0

Since Oct 3Pushed 7y ago1 watchersCompare

[ Source](https://github.com/Payger/payger-merchant-php-sdk)[ Packagist](https://packagist.org/packages/payger/php-sdk)[ Docs](https://github.com/Payger/PHP-SDK)[ RSS](/packages/payger-php-sdk/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (2)Used By (0)

PHP-SDK
=======

[](#php-sdk)

Payger Merchant API - PHP SDK

The Payger SDK for PHP is a library that enables PHP developers to easily make requests to the Payger Merchant API.

To use the library you must first set the pair Key and Secret as the library Username and Password. Please use set userName and setPassword for this. After that you must call connect which will generate a new token for authentication. The following request will use the token and if it expires will request for a new one.

Set credentials, connect and generate a new token
-------------------------------------------------

[](#set-credentials-connect-and-generate-a-new-token)

```
Payger::setUsername( $key );
Payger::setPassword( $secret );
Payger::connect();

```

After that is pretty straight forward methods get, post put or delete depending on what you want from the API, please see some examples below.

\##Exchange Rates - get current rate for conversion between your currency and a crypto currency

```
$args = array(
		'from'   => 'USD',
		'to'     => 'BTC',
		'amount' => 3.00
	);
$response = Payger::get( 'merchants/exchange-rates', $args );

```

Creates new payment
-------------------

[](#creates-new-payment)

```
$args = array (
		'externalId'        => '001',
		'description'       => 'Description',
        'paymentCurrency'	    => 'BTC',
        'productCurrency'    => 'USD',
        'source'            => 'Your Website',
		'outputAmount'	    => 3.0,
        'buyerName'	        => 'Buyer Name',
		'buyerEmailAddress'	=> 'Buyer Address',
		'callback'          => array( 'url' => 'Callback URL', 'method' => 'POST' ),
	);

$response = Payger::post( 'merchants/payments/', $args );

```

Cancel Payment
--------------

[](#cancel-payment)

```
Payger::delete( 'merchants/payments/' . $payment_id );

```

Installation
============

[](#installation)

Payger PHP-SDK is a developer library, not a plugin, which means you need to include it somewhere in your own project. You can use Composer:

```
composer require payger/php-sdk

```

Or you can download the library and include it manually:

```
require_once 'php-sdk/Payger.php';

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

2782d ago

### Community

Maintainers

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

---

Tags

woocommercepayment-gatewayspayger

### Embed Badge

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

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

###  Alternatives

[phpviet/laravel-omnipay

Laravel Omnipay hổ trợ tích hợp các cổng thanh toán trong nước.

987.7k](/packages/phpviet-laravel-omnipay)

PHPackages © 2026

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