load('/tmp/bitpay.pri'); $publicKey = $storageEngine->load('/tmp/bitpay.pub'); /** * Create a new client. You can see the example of how to configure this using * a yml file as well. */ $bitpay = new \Bitpay\Bitpay( array( 'bitpay' => array( 'public_key' => '/tmp/bitpay.pub', //see tutorial/001.php and 002.php 'private_key' => '/tmp/bitpay.pri', 'key_storage' => 'Bitpay\Storage\EncryptedFilesystemStorage', 'key_storage_password' => 'YourTopSecretPassword' ) ) ); /** * Create the client that will be used to send requests to BitPay's API */ $client = $bitpay->get('client'); $client->setPrivateKey($privateKey); $client->setPublicKey($publicKey); /** * Add your btcpayserver url */ $client->setUri('https://btcpay.server/'); $tokens = $client->getTokens(); print_r($tokens);