Installations
npm install razorpay
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
16.20.2
NPM Version
8.19.4
Releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
razorpay
Download Statistics
Total Downloads
5,865,139
Last Day
3,453
Last Week
59,666
Last Month
233,976
Last Year
2,187,575
GitHub Statistics
186 Stars
440 Commits
111 Forks
184 Watching
120 Branches
998 Contributors
Package Meta Information
Latest Version
2.9.5
Package Id
razorpay@2.9.5
Unpacked Size
304.61 kB
Size
49.87 kB
File Count
60
NPM Version
8.19.4
Node Version
16.20.2
Publised On
23 Oct 2024
Total Downloads
Cumulative downloads
Total Downloads
5,865,139
Last day
-1.1%
3,453
Compared to previous day
Last week
6.6%
59,666
Compared to previous week
Last month
14.3%
233,976
Compared to previous month
Last year
47.6%
2,187,575
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
Razorpay Node SDK
Official nodejs library for Razorpay API.
Read up here for getting started and understanding the payment flow with Razorpay: https://docs.razorpay.com/docs/getting-started
Installation
1npm i razorpay
Documentation
Documentation of Razorpay's API and their usage is available at https://docs.razorpay.com
Basic Usage
Instantiate the razorpay instance with key_id
& key_secret
. You can obtain the keys from the dashboard app (https://dashboard.razorpay.com/#/app/keys)
1const Razorpay = require('razorpay'); 2 3var instance = new Razorpay({ 4 key_id: 'YOUR_KEY_ID', 5 key_secret: 'YOUR_KEY_SECRET', 6});
The resources can be accessed via the instance. All the methods invocations follows the namespaced signature
1// API signature 2// {razorpayInstance}.{resourceName}.{methodName}(resourceId [, params]) 3 4// example 5instance.payments.fetch(paymentId);
Every resource method returns a promise.
1instance.payments 2 .all({ 3 from: '2016-08-01', 4 to: '2016-08-20', 5 }) 6 .then(response => { 7 // handle success 8 }) 9 .catch(error => { 10 // handle error 11 });
If you want to use callbacks instead of promises, every resource method will accept a callback function as a last parameter. The callback functions will behave as Error First Callbacks
1instance.payments.all( 2 { 3 from: '2016-08-01', 4 to: '2016-08-20', 5 }, 6 (error, response) => { 7 if (error) { 8 // handle error 9 } else { 10 // handle success 11 } 12 } 13);
Supported Resources
Development
1npm install
Testing
1npm test
Release
- Switch to
master
branch. Make sure you have the latest changes in the local master - Update the
CHANGELOG.md
& bump the version inpackage.json
- Commit
- Tag the release & push to Github
- Create a release on GitHub using the website with more details about the release
- Publish to npm with
npm publish
command
Licence
MIT Licensed. See LICENSE.txt for more details
No vulnerabilities found.
Reason
all changesets reviewed
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENCE.txt:0
- Info: FSF or OSI recognized license: MIT License: LICENCE.txt:0
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/razorpay/razorpay-node/ci.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/razorpay/razorpay-node/ci.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/razorpay/razorpay-node/ci.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/razorpay/razorpay-node/ci.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/razorpay/razorpay-node/ci.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/razorpay/razorpay-node/node.js.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/razorpay/razorpay-node/node.js.yml/master?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:28
- Warn: npmCommand not pinned by hash: .github/workflows/node.js.yml:30
- Info: 0 out of 6 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 1 third-party GitHubAction dependencies pinned
- Info: 1 out of 3 npmCommand dependencies pinned
Reason
8 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-8hc4-vh64-cxmj
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx
- Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55
Reason
2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/ci.yml:1
- Warn: no topLevel permission defined: .github/workflows/node.js.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 30 are checked with a SAST tool
Score
4.2
/10
Last Scanned on 2024-12-16
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More