PHP code example of bearname / nowpayments-api-php

1. Go to this page and download the library: Download bearname/nowpayments-api-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

bearname / nowpayments-api-php example snippets




owPaymentsIO\NOWPaymentsApi;

$apiClient = new NOWPaymentsApi("YOUR API KEY");
echo $apiClient->status();



use NowPaymentsIO\NOWPaymentsApi;

$apiClient = new NOWPaymentsApi("YOUR API KEY");
echo $apiClient->auth('username', 'password');




use NowPaymentsIO\NOWPaymentsApi;

$apiClient = new NOWPaymentsApi('apiKey', 'token');




use NowPaymentsIO\NOWPaymentsApi;

$apiClient = new NOWPaymentsApi('apiKey', 'token');
$params = [
    id => 111,
    offset => 0,
    limit => 10,
    order => 'DESC'
];

$apiClient.callGet('/sub-partner', $params);




use NowPaymentsIO\NOWPaymentsApi;

$apiClient = new NOWPaymentsApi('apiKey', 'token');
$data = [
    id => 111,
    offset => 0,
    limit => 10,
    order => 'DESC'
];

$apiClient.callPost('/sub-partner/transfer', $data);


$ composer 

$ composer