Client for QIWI
Easy and lightweight client for QIWI payment system.
This library is THE FIRST open source client for QIWI.
Currently this library is in development, so not all may work as expected.
$ npm install qiwi
QIWI = require'qiwi'client =clientcreateSessionunless error?clientsetSessionsessionclientaccountInfounless error?consolelog'Your account details:'consoleloginfoelseconsolelog'Something went wrong:'consolelogerrorreturnelseconsolelog'Unable to open session'consolelogerrorreturn
This class represents client for QIWI.
Default server name or IP address for connections to.
Default server port for connections to.
Charset which will be used by client while sending requests.
Description will be added.
Sets HTTP header with pointed name and value for subsequent requests.
Removes header with pointed name.
publicKeyBuffer | String
callbackFunction | null
Establishes new encrypted sesssion.
You need to specify
publicKey which currently is the same for all clients and can be loaded from
./qiwi.pub. This function generates symmetric key for AES-256, encrypts it using
publicKey and sends to the server. Session object will be passed to
callback. In order to make other calls you should install session into client using
The schema described above is similar to SSL in general states.
Sets session object for subsequent requests.
Removes stored session from client.
valueNumber | String | Boolean | null
Sets extra field with
value to be sent to the server on each request.
Removes field identified by
terminalIdString | undefined
terminalId for subsequent requests.
Removes previously stored token and terminal ID.