PHPackages                             explorer-cash/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. explorer-cash/api-php

ActiveLibrary[API Development](/categories/api)

explorer-cash/api-php
=====================

PHP API binding for explorer.cash Blockchain API service

1.9.3(5y ago)1772712[2 issues](https://github.com/explorer-cash/api-php/issues)PHP

Since Sep 6Pushed 5y ago2 watchersCompare

[ Source](https://github.com/explorer-cash/api-php)[ Packagist](https://packagist.org/packages/explorer-cash/api-php)[ RSS](/packages/explorer-cash-api-php/feed)WikiDiscussions master Synced today

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

[![N|Solid](https://camo.githubusercontent.com/c3ccc0b1d219aecd302de143382c88712e4db0055d76fb3524d427299803d673/68747470733a2f2f7777772e6578706c6f7265722e636173682f6c6f676f2d6461726b2e706e67)](https://www.explorer.cash/)

explorer.cash API for PHP
-------------------------

[](#explorercash-api-for-php)

The library provide an access to explorer.cash Blockchain API for PHP applications. You can easily add payment request and receive a notification when a crypto payment is confirmed on the blockchain. explorer.cash Blockchain API supports multiple cryptocurrencies like Bitcoin (BTC), Bitcoin Cash (BCH), Tether (USDT), USD Coin (USDC), Ethereum (ETH), Litecoin (LTC) ...

📗 [See explorer.cash Blockchain API documentation](https://www.explorer.cash/en/blockchain-api-documentation.html)

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

[](#requirements)

PHP version &gt;= 7.x

How to install
--------------

[](#how-to-install)

```
$ composer require explorer-cash/api-php

```

How to use
----------

[](#how-to-use)

### Register a payment request to explorer.cash

[](#register-a-payment-request-to-explorercash)

```
use ExplorerCash\PaymentRequest;

$payment_request = new PaymentRequest();

$payment_request->push([
    'unit' => 'BTC',
    'address' => '1R9NpmdVpC4eKajqutKqSSEn5hH4DEkLs',
    'payment_reference' => 'ORD-4579',
    'amount' => '0.084',
    'callback_url' => 'https://your-callback-url',
    'timeout' => 10,
    'confirmations' => 3
]);

// In your code
$cart = Cart::byReference('ORD-4579');

$cart->payment_id = $payment_request->paymentId();
$cart->save();
```

### Retrieve payment request when your callback URL is called

[](#retrieve-payment-request-when-your-callback-url-is-called)

You need to check that "payment\_id" associated to the "payment\_reference" are the same.

```
use ExplorerCash\PaymentRequest;

$payment_request = new PaymentRequest();

$payment_data = $payment_request->pull();

// In your code
$cart = Cart::byReference($payment_data['payment_reference']);

if ($cart->payment_id === $payment_data['payment_id']) {
    if ($payment_data['status'] === 'PAID') {
        $cart->isPaid = true;
    }
}
```

### Subscribe to explorer.cash crypto currencies exchange rates

[](#subscribe-to-explorercash-crypto-currencies-exchange-rates)

You will receive the exchange rates of top 100 cryptos in the currency you provided.

```
use ExplorerCash\Api;

Api::subscribeRates([
    'currency' => 'EUR',
    'callback_url' => 'https://your-callback-url'
]);
```

Support or Contact
------------------

[](#support-or-contact)

Having trouble with this library or explorer.cash API ? [Contact our support](https://www.explorer.cash/en/contact-us) and we’ll help you sort it out.

License
-------

[](#license)

GNU Lesser General Public License v3.0

© 2020 explorer.cash. All Rights Reserved.

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 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

3

Last Release

2126d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/106fc1d43404c81eac1faa9aef801906aeb5d111f950a2755c88753a2727f64b?d=identicon)[explorer\_cash](/maintainers/explorer_cash)

---

Top Contributors

[![explorer-cash](https://avatars.githubusercontent.com/u/69138145?v=4)](https://github.com/explorer-cash "explorer-cash (8 commits)")

---

Tags

apibitcoinbitcoincashblockchainethereumlitecoinpaymentphprippletetherusdc

### Embed Badge

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

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

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

Hubspot API client

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

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k14](/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)
