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

ActiveLibrary[API Development](/categories/api)

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

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

00PHP

Since Mar 5Pushed 2mo 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 1mo ago

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

18

—

LowBetter than 8% of packages

Maintenance57

Moderate activity, may be stable

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)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M479](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M271](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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