1.1.5 • Published 8 years ago

paybook v1.1.5

Weekly downloads
30
License
-
Repository
github
Last release
8 years ago

Paybook

Isomorphic JS, integrated with redux to work with Paybook API

Install

Install the dependencies

npm install paybook

Server

Import paybook and set the apikey

First you need to import paybook and set the api key.

var pb = require("paybook");
pb.api.setApiKey("YOUR_API_KEY_HERE");
// You can set the test paybook enviroment to use dummy banks
pb.api.setTest(true); 

Use API method

Each method has a callback as last argument, the first parameter in these function is an error, and the second is the api response, this response is the same as the one listend in the Paybook Sync Rest API.

pb.api.createUser("myUserNam","externalId",function(err,resp){
		if(err){
			console.log(err); 
			return;
		}
		console.log(resp);
});

API methods list

This the list of api methods to simplify the use of the Paybook Sync Rest API.

Users

ActionREST API ENDPOINTSDK METHOD
Creates a userPOST https://sync.paybook.com/v1/userscreateUser(userName, external_id, callback)
Deletes a userDELETE https://sync.paybook.com/v1/usersdeleteUser(id_user,callback)
Get usersGET https://sync.paybook.com/v1/usersgetUsers(options, callback)

Sessions

ActionREST API ENDPOINTSDK METHOD
Creates a sessionPOST https://sync.paybook.com/v1/sessionscreateSession(id_user, callback)
Verify a sessionGET https://sync.paybook.com/v1/sessions/:token/verifyverifySession(session, callback)
Deletes a sessionDELETE https://sync.paybook.com/v1/sessions/:tokendeleteSession(session, callback)

Catalogues

ActionREST API ENDPOINTSDK METHOD
Request account typesGET https://sync.paybook.com/v1/catalogues/account_typescataloguesAccountTypes(session,callback)
Request attachment typesGET https://sync.paybook.com/v1/catalogues/attachment_typescataloguesAttachmentTypes(session,callback)
Request available countriesGET https://sync.paybook.com/v1/catalogues/countriescataloguesAccountCountries(session,callback)
Request available sitesGET https://sync.paybook.com/v1/catalogues/sitescataloguesSites(session,callback)
Request site organizationsGET https://sync.paybook.com/v1/catalogues/site_organizationscataloguesSiteOrganizations(session,callback)

Credentials

ActionREST API ENDPOINTSDK METHOD
Creates or updates credentialsPOST https://sync.paybook.com/v1/credentialscredentials(token,id_site,credentials_data, callback)
Deletes credentialsDELETE https://sync.paybook.com/v1/credentials/:id_credentialdeleteCredentials(token, id_credential, callback)
Request register credentialsGET https://sync.paybook.com/v1/credentialsgetCredentials(session, callback)

Accounts

ActionREST API ENDPOINTSDK METHOD
Requests accounts of a userGET https://sync.paybook.com/v1/accountsgetAccounts(session,options,callback)

Transactions

ActionREST API ENDPOINTSDK METHOD
Requests number of transactionsGET https://sync.paybook.com/v1/transactions/countgetTRansactionsCount(session, options, callback)
Requests transactionsGET https://sync.paybook.com/v1/transactionsgetTransactions(session,options, callback)

Attachments

ActionREST API ENDPOINTSDK METHOD
Requests attachmentsGET https://sync.paybook.com/v1/attachmentsgetAttachments(session,options, callback)
Request an attachmentsGET https://sync.paybook.com/v1/attachments/:id_attachmentgetAttahcment(session,id_attachment, callback)
Request the extracted data from attachmentGET https://sync.paybook.com/v1/attachments/:id_attachment/extragetAttachmentExtra(session,id_attachment, callback)
Request the number of attachmentsGET https://sync.paybook.com/v1/attachments/countsagetAttachmentCount(session,options, callback)
1.1.5

8 years ago

1.1.4

9 years ago

1.1.3

9 years ago

1.1.2

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago