PHPackages                             opennode/opennode-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. [Payment Processing](/categories/payments)
4. /
5. opennode/opennode-php

ActiveLibrary[Payment Processing](/categories/payments)

opennode/opennode-php
=====================

OpenNode PHP library for API v1

1.1.0(4y ago)1627.1k↑97%5[6 issues](https://github.com/opennodedev/opennode-php/issues)[1 PRs](https://github.com/opennodedev/opennode-php/pulls)MITPHPPHP &gt;=5.6.4CI failing

Since Oct 23Pushed 4y ago3 watchersCompare

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

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

OpenNode PHP library for API v1
===============================

[](#opennode-php-library-for-api-v1)

[![Build Status](https://camo.githubusercontent.com/21451868db970076f63ce89721343945eccda065df357438f6cced218f309fda/68747470733a2f2f7472617669732d63692e6f72672f6f70656e6e6f64656465762f6f70656e6e6f64652d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/opennodedev/opennode-php)

PHP library for OpenNode API.

You can sign up for a OpenNode account at  for production and  for testing.

Please note, that for testing you must generate separate API credentials on . API credentials generated on  will only work in production mode.

Composer Installation
---------------------

[](#composer-installation)

Install library via [Composer](http://getcomposer.org/). Run the following command in your terminal:

```
composer require opennode/opennode-php
```

Manual Installation
-------------------

[](#manual-installation)

Donwload [latest release](https://github.com/opennodedev/opennode-php/releases) and include `init.php` file.

```
require_once('/path/opennode-php/init.php');
```

Getting Started
---------------

[](#getting-started)

OpenNode PHP library instructions.

### Setting up OpenNode library

[](#setting-up-opennode-library)

#### Setting default authentication

[](#setting-default-authentication)

```
use OpenNode\OpenNode;

\OpenNode\OpenNode::config(array(
    'environment'               => 'dev', // dev OR live
    'auth_token'                => 'YOUR_AUTH_TOKEN',
    'curlopt_ssl_verifypeer'    => TRUE // default is false
));

// $order = \OpenNode\Merchant\Charge::find('c1cddabe-c27b-44a6-91e8-a8f3553dc5c7');
```

#### Setting authentication individually

[](#setting-authentication-individually)

```
use OpenNode\OpenNode;

# \OpenNode\Merchant\Charge::find($orderId, $options = array(), $authentication = array())

$charge = \OpenNode\Merchant\Charge::find('c1cddabe-c27b-44a6-91e8-a8f3553dc5c7', array(), array(
    'environment' => 'dev', // dev OR live
    'auth_token' => 'YOUR_AUTH_TOKEN'));
```

### Creating Charge

[](#creating-charge)

```
use OpenNode\OpenNode;

$charge_params = array(
                   'description'       => '1x Book', //Optional
                   'amount'            => 20.00,
                   'currency'          => 'USD', //Optional
                   'order_id'          => 'YOUR-PLATFORM-ID', //Optional
                   'email'             => 'johndoe@example.com', //Optional
                   'name'              => 'John Doe', //Optional
                   'callback_url'      => 'https://site.com/?handler=opennode', //Optional
                   'success_url'       => 'https://example.com/order/abc123', //Optional
                   'auto_settle'       => false //Optional
               );

try {
  $charge = \OpenNode\Merchant\Charge::create($charge_params);

  echo 'LN BOLT11: ' . $charge->lightning_invoice["payreq"].PHP_EOL;
  echo 'BTC address: ' . $charge->chain_invoice['address'];

  print_r($charge);

} catch (Exception $e) {
  echo $e->getMessage(); // InvalidRequest Error creating order
}
```

### Getting Charge Info

[](#getting-charge-info)

```
use OpenNode\OpenNode;

try {
    $charge = \OpenNode\Merchant\Charge::find('c1cddabe-c27b-44a6-91e8-a8f3553dc5c7');

    if ($charge) {
      var_dump($charge);
    }
    else {
      echo 'Charge not found';
    }
} catch (Exception $e) {
  echo $e->getMessage(); // Unauthorized Not authorized: invalid api key
}
```

### Getting Paid Charges

[](#getting-paid-charges)

```
try {
  $charges = \OpenNode\Merchant\Charge::findAllPaid();

  foreach ($charges as $charge) {
    print_r($charge);
  }
} catch (Exception $e) {
  echo $e->getMessage(); // Unauthorized Not authorized: invalid api key
}
```

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.1% 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 ~1004 days

Total

2

Last Release

1795d ago

### Community

Maintainers

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

---

Top Contributors

[![joaodealmeida](https://avatars.githubusercontent.com/u/5623455?v=4)](https://github.com/joaodealmeida "joaodealmeida (16 commits)")[![webdev23](https://avatars.githubusercontent.com/u/2503337?v=4)](https://github.com/webdev23 "webdev23 (1 commits)")

---

Tags

bitcoincryptocurrencylightning-networkopennodepaymentspaymentgatewaybitcoinprocessorcryptocurrencyLightning

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[coingate/coingate-php

CoinGate library for PHP

57498.3k1](/packages/coingate-coingate-php)[bitpay/sdk

Complete version of the PHP library for the new cryptographically secure BitPay API

42352.5k4](/packages/bitpay-sdk)[omnipay/bitpay

BitPay driver for the Omnipay payment processing library

1383.4k1](/packages/omnipay-bitpay)[coingate/omnipay-coingate

CoinGate driver for the Omnipay payment processing library

1037.1k1](/packages/coingate-omnipay-coingate)[plisio/plisio-api-php

156.4k](/packages/plisio-plisio-api-php)

PHPackages © 2026

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