PHPackages                             passimpay/passimpay-php-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. [API Development](/categories/api)
4. /
5. passimpay/passimpay-php-api

ActiveLibrary[API Development](/categories/api)

passimpay/passimpay-php-api
===========================

Passimpay API PHP wrapper

v1.0.0(2y ago)178[1 issues](https://github.com/Passimpay/passimpay-api-php/issues)PHPPHP &gt;=7.1.0

Since Aug 8Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Passimpay/passimpay-api-php)[ Packagist](https://packagist.org/packages/passimpay/passimpay-php-api)[ Docs](https://github.com/Passimpay/passimpay-api-php)[ RSS](/packages/passimpay-passimpay-php-api/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Passimpay API PHP wrapper
-------------------------

[](#passimpay-api-php-wrapper)

This is a library for easy integration of Passimpay API to your PHP project.

Requirements
------------

[](#requirements)

- PHP &gt;= 7.1.0
- ext-mbstring
- ext-json
- ext-curl

You will also need to create your platform [here](https://passimpay.io/account/platform/module) and specify certain values in code:

- platform id
- secret key

Composer installation
---------------------

[](#composer-installation)

```
$ composer require passimpay/passimpay-php-api

```

Examples
--------

[](#examples)

1. Getting balance:

```
use Passimpay/PassimpayApi;

$api = new PassimpayApi(123, 'secret key');

list($balance, $error) = $api->balance();

if (null !== $error) {
  throw new Exception($error);
}

dosomething($balance);

```

2. Getting list of currencies:

```
use Passimpay/PassimpayApi;

$api = new PassimpayApi(123, 'secret key');

list($currencies, $error) = $api->currencies();

if (null !== $error) {
  throw new Exception($error);
}

dosomething($currencies);

```

3. Creating invoice link:

```
use Passimpay/PassimpayApi;

$api = new PassimpayApi(123, 'secret key');

list($url, $error) = $api->invoice('your invoice id', 999.0);

if (null !== $error) {
  throw new Exception($error);
}

dosomething($url);

```

4. Checking invoice status:

```
use Passimpay/PassimpayApi;

$api = new PassimpayApi(123, 'secret key');

list($status, $error) = $api->invoiceStatus('your invoice id');

if (null !== $error) {
  throw new Exception($error);
}

dosomething($status);

```

5. Getting wallet address for payments:

```
use Passimpay/PassimpayApi;

$api = new PassimpayApi(123, 'secret key');

list($address, $error) = $api->paymentWallet('order id', 'payment id');

if (null !== $error) {
  throw new Exception($error);
}

dosomething($address);

```

6. Withdraw:

```
use Passimpay/PassimpayApi;

$api = new PassimpayApi(123, 'secret key');

list($response, $error) = $api->withdraw('payment id', 'addressTo', 999.0);

if (null !== $error) {
  throw new Exception($error);
}

dosomething($response);

```

7. Checking transaction status:

```
use Passimpay/PassimpayApi;

$api = new PassimpayApi(123, 'secret key');

list($response, $error) = $api->transactionStatus('transaction hash');

if (null !== $error) {
  throw new Exception($error);
}

dosomething($response);

```

8. Handling notifications:

Upon creating platform at [passimpay.io](passimpay.io) you could specify endpoint to call when invoice status is changed.
Use code below to handle this notification:

```
$secretKey = '123';

$hash = $_POST['hash'];

$data = [
  'platform_id'  => (int) $_POST['platform_id'],  // Platform ID
  'payment_id'   => (int) $_POST['payment_id'],   // currency ID
  'order_id'     => (int) $_POST['order_id'],     // Payment ID of your platform
  'amount'       => $_POST['amount'],             // transaction amount
  'txhash'       => $_POST['txhash'],             // Hash or transaction ID. You can find the transaction ID in the PassimPay transaction history in your account.
  'address_from' => $_POST['address_from'],       // sender address
  'address_to'   => $_POST['address_to'],         // recipient address
  'fee'          => $_POST['fee'],                // network fee
];

if (isset($_POST['confirmations']))
{
  $data['confirmations'] = $_POST['confirmations']; // number of network confirmations (Bitcoin, Litecoin, Dogecoin, Bitcoin Cash)
}

$payload = http_build_query($data);

if (!isset($hash) || hash_hmac('sha256', $payload, $secretKey) != $hash)
{
  return false;
}

// payment credited
// your code...

```

Contribution
------------

[](#contribution)

Feel free to [create an issue](https://github.com/Passimpay/passimpay-api-php/issues) in case you have found a bug or have a suggestion.

###  Health Score

16

—

LowBetter than 4% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

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

Unknown

Total

1

Last Release

1050d ago

### Community

Maintainers

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

---

Top Contributors

[![Passimpay](https://avatars.githubusercontent.com/u/118345040?v=4)](https://github.com/Passimpay "Passimpay (7 commits)")

---

Tags

phpapicurrencycryptopaypalbitcoinbtcmerchantlitecoincryptocurrencypayment gatewayethereumtronpayment methodbitpayblock.iocoinpaymentspayment processortrc20tetherPassimpay

### Embed Badge

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

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

###  Alternatives

[coinpaymentsnet/coinpayments-php

A PHP wrapper for the CoinPayments.net v1 API.

56129.9k](/packages/coinpaymentsnet-coinpayments-php)[ccxt/ccxt

A cryptocurrency trading API with more than 100 exchanges in JavaScript / TypeScript / Python / C# / PHP / Go

42.9k337.6k1](/packages/ccxt-ccxt)[kornrunner/ccxt

A PHP cryptocurrency trading library with support for more than 90 bitcoin/altcoin exchanges

371.6k](/packages/kornrunner-ccxt)

PHPackages © 2026

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