{"_id":"cashfree-sdk","_rev":"3-00fadbcae2f1dcb615d227724a5644aa","name":"cashfree-sdk","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"cashfree-sdk","version":"0.1.0","description":"This module contains all methods to help you integrate cashfree's payout solution","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"Cashfree"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/cashfree/cashfree-sdk-nodejs.git"},"keywords":["cashfree","node","sdk","payment","gateway"],"bugs":{"url":"https://github.com/cashfree/cashfree-sdk-nodejs/issues"},"homepage":"https://github.com/cashfree/cashfree-sdk-nodejs#readme","gitHead":"e824562853a146a0b9d21a1af2092a0314d9dae2","_id":"cashfree-sdk@0.1.0","_npmVersion":"6.2.0","_nodeVersion":"10.7.0","_npmUser":{"name":"preetha-in","email":"akash@cashfree.com"},"dist":{"integrity":"sha512-h7UBqJYBdpFh746e4Z8oTrX/S0uL0xUEXzSqaktdxhH7FLtoTfY5lfVlxAC10yqENHMlDIxUq0UAeAl553gOow==","shasum":"ca0dd5745003064a64d38d68073c08aa0ae330d2","tarball":"https://registry.npmjs.org/cashfree-sdk/-/cashfree-sdk-0.1.0.tgz","fileCount":14,"unpackedSize":41981,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeX74NCRA9TVsSAnZWagAAK98P/1TfGxu9zXpJNnlqwPSl\nsoKJrc9wYEpbiHv4sjIF7ZBJ67zWwsG2TxD7uElGao26pbo2PeSjpsQKLzJF\nX6ijWxqcPJMi9LQrT0Nqzbq1OUj3jwn9VqHfj6hzyoT8HpusNuPEncuUkx4e\nnYrXZajidAkrmdWIu3giYjvGq0CurYpTJdhfI7rvDq8wTEwombN/4+A6ekNZ\ncSIqouyVDlZbbkNwZdak4QpILDV8G3axqiThrJQ6B6M7ue3yHLFg8g9SKg1i\n0fpG6pN+o62X2XP0gwr38TIAAuAh2W4irPI0OSs5yjG1KqBggna8tHy4LyeD\nWMVFVlum0aWS8mhycvgqqeQDFhLQw78rKsJELEObnQXf0MGM5BnKqNO6U7Hv\ntHMA0JJuLuNKRIwC3EPoXta1+3qYlHgS2v5JyAes80SmcPA/RnHRaS51TnHq\njLiEdSBQh63/f4AUshpWVSenaaDUCEHWB30zO63dZoMPp0Zbvo8P/cAGkLB0\njsK8p+LwRnX7SSQU+lAFhZbFDin2qznXzhnCYjSHtOF9x+LkXP7d4GhbKbyD\nf04Zu/sRgfG5rpI6gqpscCzXS253wN65YHEHxS/n/N1E13CZXYrRoR/9ZD7e\ngY5fRRgnBKO6Da/+nsHbq8vHMoEIO0UNb9zuZUt0e4PyVSMep7bemk99+e1I\nZHhp\r\n=4v4N\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDAnW2VXGnmSUJw/I1gURBH3uVJ+bWLYNkkzs/InxNARwIhALaeiFkVOk2nv8N5CbUTGlYoA4BcTdgqq7DG+GleWe3c"}]},"maintainers":[{"name":"preetha-in","email":"akash@cashfree.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cashfree-sdk_0.1.0_1583332876832_0.8695675252616186"},"_hasShrinkwrap":false},"0.1.1":{"name":"cashfree-sdk","version":"0.1.1","description":"This module contains all methods to help you integrate cashfree's payout solution","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"Cashfree"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/cashfree/cashfree-sdk-nodejs.git"},"keywords":["cashfree","node","sdk","payment","gateway"],"bugs":{"url":"https://github.com/cashfree/cashfree-sdk-nodejs/issues"},"homepage":"https://github.com/cashfree/cashfree-sdk-nodejs#readme","gitHead":"e1252d715fd221b6fe769b02b7622a6630e48c64","_id":"cashfree-sdk@0.1.1","_npmVersion":"6.2.0","_nodeVersion":"10.7.0","_npmUser":{"name":"preetha-in","email":"akash@cashfree.com"},"dist":{"integrity":"sha512-Mr7oJObcDJR7tHeDvCyMeD2nsJhtik8P0I1hxZ+VbqtL+DtImirHKm/SsX8SikJuR4c+letYXgQfTeEbpEnoLw==","shasum":"dd2ea59eb9f1c8ff211aa3973ab3c4c420a8c0db","tarball":"https://registry.npmjs.org/cashfree-sdk/-/cashfree-sdk-0.1.1.tgz","fileCount":14,"unpackedSize":41940,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeX8AECRA9TVsSAnZWagAAH0wP/RGLoMl+z5uDU0JGrDW0\nDRTdEfkW+DdQZagb8OgULygWsdOMFyP7wJVjL1BM+8JJoskjsU7N/T1kOeeF\nJGchHsPTIgufeIOUncqQytIGRhkqq9lAXz1IQFOM4/S69Vo0i/ifRo/URa7l\nCKqxZ79ABWDz4FGDVnjpLHExgCkLyOKuVkgaHoRTWjOyY3ZPQpdG1xycpWjc\nKISUceqWtTgQSlLjkNRUCOGDP9UVHnyAUYorY+To3eLiO4DtHi74/KjjQkk/\nVE3tPGtexZMBYbeAFDfj6Jx5aBtB7qoRPwqCInfJ9clAt/6u1M4kaFNCVfim\nRuubvUvOUjaBWpAdYt8/Hs+Zdno9Cf1SkWW4949nbLHYtLIrsT03F3oBudrR\n2NHEvRGaQyICr6qYKY4S9XD4UrNhIgjer7i8KDmqeISJc7ukL9wUnHzv4MOL\ngcG1mqp4p3ZHAaygIZ3z9DO9aBXKsYdusQ64690DKB9ZcDCKnmRtoG4UBM0J\n1N4hpQcAm5GLdR6fp76vholhWQB5mDYVLCu+IubsSkojeOES6m/x7OAumw4Q\nRFg6lMTsZsrRWxA63k0HWY1GGP2vlGeonBKLzJlX7I4g98Cwn0STZJGvuT6k\n68TXvK05Gm4K6f9lVaV8f/9/1065YZZEU7D2OzICCN4cBNPZT1TkM3+rP20F\n6jjc\r\n=/Zd3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBc9q8EEegZRrDpuHRunDpT5D8NS3jBgGjvXSN1CAGMMAiEAqQ5baCcqqIMpUJsnoDUuqITMDo9CNwv+FVNYEihRuiM="}]},"maintainers":[{"name":"preetha-in","email":"akash@cashfree.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cashfree-sdk_0.1.1_1583333379771_0.2798994009520672"},"_hasShrinkwrap":false}},"time":{"created":"2020-03-04T14:41:16.831Z","0.1.0":"2020-03-04T14:41:16.997Z","modified":"2022-04-12T05:25:29.192Z","0.1.1":"2020-03-04T14:49:39.959Z"},"maintainers":[{"email":"akash@cashfree.com","name":"cashfreeorg"}],"description":"This module contains all methods to help you integrate cashfree's payout solution","homepage":"https://github.com/cashfree/cashfree-sdk-nodejs#readme","keywords":["cashfree","node","sdk","payment","gateway"],"repository":{"type":"git","url":"git+https://github.com/cashfree/cashfree-sdk-nodejs.git"},"author":{"name":"Cashfree"},"bugs":{"url":"https://github.com/cashfree/cashfree-sdk-nodejs/issues"},"license":"ISC","readme":"Cashfree libraries are released in Beta. This is work in progress and we are continuously working on improving various aspects of it. It is released as a learning aid and an example kit for the API integrators. This is not recommended by Cashfree for direct use in production code. Please report any bugs to Cashfree at techsupport@cashfree.com.\n# cashfree-sdk-nodejs\n\nThe official Cashfree SDK for JavaScript, available for Node.js backends. Node version 10.9.0 was used for this SDK.\n\nGet started quickly using Cashfree with the Cashfree SDK for JavaScript in Node.js. The SDK helps take the complexity out of coding by providing JavaScript objects for Cashfree services including Payouts, Payment Gateway, Marketplace and Autocollect. The single, downloadable package includes the Cashfree JavaScript Library and documentation.\n\nPlease refer to the [Cashfree Docs](https://docs.cashfree.com/docs/)  for the complete API reference.\n\n## Installing\n### In Node.js\n\nThe preferred way to install the Cashfree SDK for Node.js is to use the [npm](http://npmjs.org) package manager for Node.js. Simply type the following into a terminal window:\n```sh\nnpm i cashfree-sdk\n```\n\n## Getting Started\n### Pre-requisites\n  - A [Cashfree Merchant Account](https://merchant.cashfree.com/merchant/sign-up)\n  - API keys for different products. You can generate them from your Dashboard\n### IP Whitelisting and dynamic IPs\nYour IP has to be whitelisted to hit Cashfree's server. Or if you have a dynamic IP please pass in the public key parameter during the init method as shown below. For more information please go [here](https://dev.cashfree.com/development/quickstart#ip-whitelisting).\n## Usage\n### Payouts\nThe package needs to be configured with your account's secret key which is available in your Cashfree Dashboard.\n###### In case of static IP (Your IP is whitelisted)\n```js\nconst Cashfree = require(\"cashfree-sdk\");\n\n//Initialize Cashfree Payout\nlet Payouts = Cashfree.Payouts;\nPayouts.Init({\n    \"ENV\": \"TEST\", \n    \"ClientID\": \"CLIENTID\",\n    \"ClientSecret\": \"CLIENTSECRET\"\n});\n```\n#\n###### In case of dynamic IP you will need a public key to generate a signature(which will be done by sdk itself)\n```js\nconst Cashfree = require(\"cashfree-sdk\");\n\n//Initialize Cashfree Payout\nlet Payouts = Cashfree.Payouts;\nPayouts.Init({\n    \"ENV\": \"TEST\", \n    \"ClientID\": \"CLIENTID\",\n    \"ClientSecret\": \"CLIENTSECRET\",\n    \"PathToPublicKey\": \"/path/to/your/public/key/file.pem\",\n    //\"PublicKey\": \"ALTERNATIVE TO SPECIFYING PATH (DIRECTLY PASTE PublicKey)\"\n});\n```\n| Option              | Default                       | Description                                                                           |\n| ------------------- | ----------------------------- | ------------------------------------------------------------------------------------- |\n| `ENV`        | `TEST`                        | Environment to be initialized. Can be set to `TEST` or `PRODUCTION` |\n| `ClientID` | ``                             | `ClientID` which can be generated on cashfree dashboard.                  |\n| `ClientSecret`         | ``                        | `ClientSecret` which can be found alongside generated `ClientID`.                        |\n| `PathToPublicKey`         | ``                        | Either specify the path to your `.pem` public key file or use `PublicKey` Param and pass the key there.                        |\n| `PublicKey`         | ``                        | Pass your Public Key to this parameter as an alternative to `PathToPublicKey`.                        |\n\n\n### WebHook Verification\n\nTo verify the webhook received from Cashfree for different events and accept the webhook only when it returns `true`.\n\n#### Usage\nPass the webhook received along with the payload type.\n\n```js\nCashfree.Payouts.VerifySignature(webhookPostDataJson) // returns true or false\n```\n\n\n### Using Promises\nEvery method returns a promise which can be used:\n```js\nPayouts.Beneficiary.Add({\n\t\"beneId\": \"JOHN18012\", \n\t\"name\": \"john doe\",\n\t\"email\": \"johndoe@cashfree.com\", \n\t\"phone\": \"9876543210\", \n\t\"bankAccount\": \"00001111222233\", \n\t\"ifsc\": \"HDFC0000001\", \n\t\"address1\" : \"ABC Street\", \n\t\"city\": \"Bangalore\", \n\t\"state\":\"Karnataka\", \n\t\"pincode\": \"560001\"\n}).then(function(res){\n\tconsole.log(res)\n});\n```\n\n### Using Async/Await\nCan also be used synchronously using async/await:\n\n```js\nvar syncCall = async function (){\n\tvar res = await Payouts.Beneficiary.Add({\n\t\t\"beneId\": \"JOHN18012\", \n\t\t\"name\": \"john doe\",\n\t\t\"email\": \"johndoe@cashfree.com\", \n\t\t\"phone\": \"9876543210\", \n\t\t\"bankAccount\": \"00001111222233\", \n\t\t\"ifsc\": \"HDFC0000001\", \n\t\t\"address1\" : \"ABC Street\", \n\t\t\"city\": \"Bangalore\", \n\t\t\"state\":\"Karnataka\", \n\t\t\"pincode\": \"560001\"\n\t});\n\treturn res;\n}\nsyncCall();\n```\n- For more information about the APIs go to [Payouts](Payouts).\n- Complete list of [APIs](https://docs.cashfree.com/docs/payout/guide/#fetch-beneficiary-id).\n### TODO\n- #### PG\n- #### Market Place\n- #### Autocollect\n","readmeFilename":"README.md"}