Running Samples

Instructions for running samples are located in the sample directory.

Running Tests

To run the test suite first invoke the following command within the repo

If Grunt is not installed:

npm install -g grunt-cli

If Mocha is not installed:

npm install -g mocha

To install the development dependencies (run where the package.json is):

npm install

Run the tests:

grunt test (timeout is specified in milliseconds eg: 15000ms)

To run the tests without the mocks:

NOCK_OFF=true mocha -t 60000


  • As of version 1.6.2, full request/response are logged for non production environments with PAYPAL_DEBUG set

    You can set the environment variable on the command line by running PAYPAL_DEBUG=1 node <path of script> or by executing export PAYPAL_DEBUG=1 and then running your Node.js script. Please see your command terminal/shell's manual pages for specific information.

  • It is recommended to provide Paypal-Debug-Id if requesting PayPal Merchant Technical Services for support. You can get access to the debug id by setting environment variable PAYPAL_DEBUG=1.

  • The error object returned for any bad request has error.response populated with details. PAYPAL_DEBUG=1 setting also gives you access to stringfied response in error messages.


[REST API Reference] (


  • If you would like to contribute, please fork the repo and send in a pull request.
  • Please ensure you run grunt before sending in the pull request.


Code released under SDK LICENSE


Pull requests and new issues are welcome. See for details.