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

ActiveLibrary

sohagsrz/nowpayments-php-sdk
============================

A professional, OOP-compliant PHP SDK for the NowPayments.io API.

00PHP

Since Mar 5Pushed 2w agoCompare

[ Source](https://github.com/Sohagsrz/nowpayments-php-sdk)[ Packagist](https://packagist.org/packages/sohagsrz/nowpayments-php-sdk)[ RSS](/packages/sohagsrz-nowpayments-php-sdk/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

NowPayments PHP SDK
===================

[](#nowpayments-php-sdk)

A professional, standalone, and OOP-compliant PHP library for integrating with the [NowPayments.io](https://nowpayments.io) API.

Features
--------

[](#features)

- **Supports all main methods**: Invoices, Payments, Estimates, Currencies, and Status.
- **Environment Aware**: Seamlessly switch between Sandbox and Production.
- **Secure Webhooks**: Built-in IPN signature verification.
- **Exception Handling**: Custom exceptions with raw API error detail.
- **Standalone**: Perfect for any PHP project or framework.

Installation
------------

[](#installation)

```
composer require sohagsrz/nowpayments-php-sdk
```

Basic Usage
-----------

[](#basic-usage)

```
use NowPayments\NowPayments;

$sdk = new NowPayments('YOUR-API-KEY', true); // true for Sandbox

// Get API Status
$status = $sdk->getStatus();

// Create a professional crypto invoice
$invoice = $sdk->createInvoice([
    'price_amount' => 10.00,
    'price_currency' => 'usd',
    'order_id' => '12345',
    'order_description' => 'Premium Upgrade',
    'success_url' => 'https://yoursite.com/success',
    'ipn_callback_url' => 'https://yoursite.com/webhook'
]);

// Redirect user to payment
header('Location: ' . $invoice['invoice_url']);
```

Webhook Verification
--------------------

[](#webhook-verification)

```
$receivedSig = $_SERVER['HTTP_X_NOWPAYMENTS_SIG'];
$payload = json_decode(file_get_contents('php://input'), true);

$sdk = new NowPayments('API-KEY', false, 'YOUR-IPN-SECRET');
if ($sdk->verifyIPNSignature($payload, $receivedSig)) {
    // Payment is authentic!
}
```

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

[](#requirements)

- PHP &gt;= 7.4
- GuzzleHTTP ^7.0

License
-------

[](#license)

MIT

###  Health Score

20

—

LowBetter than 17% of packages

Maintenance63

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0b54fd787bf38b3fbe6d0e4b5334b36ae7d1775c071acbb2e755aa483067b1a1?d=identicon)[sohagsrz](/maintainers/sohagsrz)

---

Top Contributors

[![Sohagsrz](https://avatars.githubusercontent.com/u/39012004?v=4)](https://github.com/Sohagsrz "Sohagsrz (1 commits)")

### Embed Badge

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

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

PHPackages © 2026

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