Download the PHP package foisalislambd/nowpayments-php without Composer

On this page you can find all versions of the php package foisalislambd/nowpayments-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package nowpayments-php

Packagist version license PHP Composer

nowpayments-php

Full-featured PHP SDK for NOWPayments
Accept 300+ cryptocurrencies with auto-conversion to your wallet

Quick Start • Installation • Configuration • Features • API Reference • Examples • Links


📑 Table of Contents


✨ Features

Feature Support
Payments Create, status, list, update estimate
Invoices Create invoice + redirect flow
Payouts Mass payout, verify 2FA, cancel scheduled
Fiat Payouts Currencies, payment methods, list
Subscriptions Plans, recurring payments, cancel
Custody Sub-partners, transfers, deposit, write-off
Conversions In-custody currency conversion
IPN Webhooks HMAC signature verification
Helpers isPaymentComplete, getStatusLabel, etc.

🚀 Quick Start


📦 Installation

Requirements: PHP 8.0+, Guzzle HTTP 7.x


⚙️ Configuration

Option Required Default Description
apiKey Yes From Dashboard
sandbox No false Use sandbox API
timeout No 30 Request timeout (seconds, or ms if > 100)
ipnSecret No For webhook verification
baseUrl No Override API URL

📖 API Reference & Examples

All examples assume $np is initialized: $np = new NowPayments(['apiKey' => '...', 'sandbox' => true]);


🔌 Status & Auth

getStatus() — Check if API is up

getAuthToken($email, $password) — Get JWT (required for payouts, custody)


💱 Currencies

getCurrencies($fixedRate?) — List all available crypto

getFullCurrencies() — Detailed currency info

getMerchantCoins($fixedRate?) — Coins enabled in your dashboard

getCurrency($currency) — Single currency details


💳 Payments (main flow)

createPayment($params) — Create payment → show address to customer

getPaymentStatus($paymentId) — Status check

getPayments($params?) — List all payments

updatePaymentEstimate($paymentId) — Refresh amount before expiry


📊 Price & Minimum Amount

getEstimatePrice($params) — Fiat → crypto conversion

getMinAmount($params) — Minimum payment amount


🧾 Invoices

createInvoice($params) — Create invoice URL → redirect customer

createInvoicePayment($params) — Payment for existing invoice


💸 Payouts (JWT required)

validatePayoutAddress($params) — Validate address

createPayout($params, $jwtToken) — Mass payout

verifyPayout($payoutId, $verificationCode, $jwtToken) — 2FA verify

cancelPayout($payoutId, $jwtToken) — Cancel scheduled payout

getPayoutStatus($payoutId, $jwtToken?) / getPayouts($params?)


🏦 Fiat Payouts (JWT required)

getFiatPayoutsCryptoCurrencies($params?, $jwtToken?)

getFiatPayoutsPaymentMethods($params?, $jwtToken?)

getFiatPayouts($params?, $jwtToken?)


💰 Balance

getBalance($jwtToken?)


🔄 Subscriptions (recurring)

getSubscriptionPlans($params?) / getSubscriptionPlan($id)

updateSubscriptionPlan($id, $updates)

createSubscription($params, $jwtToken) — Email or custody user

getSubscriptions($params?) / getSubscription($id) / deleteSubscription($id, $jwtToken?)


👥 Custody / Sub-partners (JWT required)

createSubPartner($name, $jwtToken)

createSubPartnerPayment($params, $jwtToken) — Top up sub-partner with crypto

getSubPartners($params?, $jwtToken?) / getSubPartnerBalance($subPartnerId)

createTransfer($params, $jwtToken) — Transfer between users

deposit($params, $jwtToken) / writeOff($params, $jwtToken)

getTransfers($params?, $jwtToken?) / getTransfer($id, $jwtToken?)


🔀 Conversions (JWT required)

createConversion($params, $jwtToken)

getConversionStatus($conversionId, $jwtToken) / getConversions($params?, $jwtToken?)


🔔 IPN / Webhooks

Standalone (without instance):


🛠 Helper Functions


⚠️ Error Handling


📁 Run Examples

Clone the repo and run from the project root:

File Description
01-create-payment.php Create payment
02-check-status.php Check payment status
03-ipn-webhook.php IPN verification

🔗 Links

Link URL
API Docs Postman
Sandbox Postman Sandbox
Help nowpayments.io/help
Dashboard account.nowpayments.io
Node SDK nowpayments-node

📄 License

MIT © Foisalislambd


All versions of nowpayments-php with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
guzzlehttp/guzzle Version ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package foisalislambd/nowpayments-php contains the following files

Loading the files please wait ...