bearname / nowpayments-api-php
Nowpayments php api client with types
Installs: 103
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 1
Forks: 2
Type:project
pkg:composer/bearname/nowpayments-api-php
Requires
- php: ^7.4
- symfony/http-client: ^4.4
Requires (Dev)
- phpdocumentor/phpdocumentor: ^2.0
- phpmd/phpmd: ^2.6
- phpunit/phpunit: ^6.0
- squizlabs/php_codesniffer: ^3.0
This package is auto-updated.
Last update: 2025-10-15 15:11:35 UTC
README
Installation
This project using composer.
$ composer require bearname/nowpayments-api-php
Compatible with php8 and ignore platform requirements
$ composer require bearname/nowpayments-api-php --ignore-platform-reqs
Usage
Genrate random password.
<?php require ("vendor/autoload.php"); use NowPaymentsIO\NOWPaymentsApi; $apiClient = new NOWPaymentsApi("YOUR API KEY"); echo $apiClient->status();
Use with token
1. get token by username and password
require ("vendor/autoload.php"); use NowPaymentsIO\NOWPaymentsApi; $apiClient = new NOWPaymentsApi("YOUR API KEY"); echo $apiClient->auth('username', 'password');
2. Direct init with token
require ("vendor/autoload.php"); use NowPaymentsIO\NOWPaymentsApi; $apiClient = new NOWPaymentsApi('apiKey', 'token');
Direct call specific method
require ("vendor/autoload.php"); use NowPaymentsIO\NOWPaymentsApi; $apiClient = new NOWPaymentsApi('apiKey', 'token'); $params = [ id => 111, offset => 0, limit => 10, order => 'DESC' ]; $apiClient.callGet('/sub-partner', $params);
require ("vendor/autoload.php"); use NowPaymentsIO\NOWPaymentsApi; $apiClient = new NOWPaymentsApi('apiKey', 'token'); $data = [ id => 111, offset => 0, limit => 10, order => 'DESC' ]; $apiClient.callPost('/sub-partner/transfer', $data);