{"id":13696704,"url":"https://github.com/razorpay/razorpay-node","last_synced_at":"2025-04-13T19:19:45.725Z","repository":{"id":30559122,"uuid":"34113935","full_name":"razorpay/razorpay-node","owner":"razorpay","description":"Razorpay node.js bindings","archived":false,"fork":false,"pushed_at":"2025-02-25T06:53:52.000Z","size":1388,"stargazers_count":203,"open_issues_count":97,"forks_count":114,"subscribers_count":186,"default_branch":"master","last_synced_at":"2025-04-06T17:01:52.682Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/razorpay.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-04-17T11:54:28.000Z","updated_at":"2025-04-04T09:58:34.000Z","dependencies_parsed_at":"2024-04-18T09:59:36.288Z","dependency_job_id":"179a257e-a662-49e1-b2f9-da37d92bf345","html_url":"https://github.com/razorpay/razorpay-node","commit_stats":{"total_commits":317,"total_committers":27,"mean_commits":11.74074074074074,"dds":0.5110410094637223,"last_synced_commit":"d8369948d5bf4408fbcb1bbc5f3f21f4541b92d2"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razorpay%2Frazorpay-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razorpay%2Frazorpay-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razorpay%2Frazorpay-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razorpay%2Frazorpay-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/razorpay","download_url":"https://codeload.github.com/razorpay/razorpay-node/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248766683,"owners_count":21158302,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T18:00:45.320Z","updated_at":"2025-04-13T19:19:45.702Z","avatar_url":"https://github.com/razorpay.png","language":"JavaScript","funding_links":[],"categories":["Node JS"],"sub_categories":[],"readme":"# Razorpay Node SDK\n\n[![npm](https://img.shields.io/npm/v/razorpay.svg?maxAge=2592000?style=flat-square)](https://www.npmjs.com/package/razorpay)\n\nOfficial nodejs library for [Razorpay API](https://docs.razorpay.com/docs/payments).\n\nRead up here for getting started and understanding the payment flow with Razorpay: \u003chttps://docs.razorpay.com/docs/getting-started\u003e\n\n## Installation\n\n```bash\nnpm i razorpay\n```\n\n## Documentation\n\nDocumentation of Razorpay's API and their usage is available at \u003chttps://docs.razorpay.com\u003e\n\n### Basic Usage\n\nInstantiate the razorpay instance with `key_id` \u0026 `key_secret`. You can obtain the keys from the dashboard app ([https://dashboard.razorpay.com/#/app/keys](https://dashboard.razorpay.com/#/app/keys))\n\n```js\nconst Razorpay = require('razorpay');\n\nvar instance = new Razorpay({\n  key_id: 'YOUR_KEY_ID',\n  key_secret: 'YOUR_KEY_SECRET',\n});\n```\n\n### Using Access Token\nInstantiate the razorpay instance with `access_token`. The `access_token` can be obtained only in case if you are a platform partner. For more information, refer page - https://razorpay.com/docs/partners/platform/.\n\n```js\nconst Razorpay = require('razorpay');\n\nvar instance = new Razorpay({\n  \"oauthToken\": \"ACCESS_TOKEN\"\n})\n```\nx\nThe resources can be accessed via the instance. All the methods invocations follows the namespaced signature\n\n```js\n// API signature\n// {razorpayInstance}.{resourceName}.{methodName}(resourceId [, params])\n\n// example\ninstance.payments.fetch(paymentId);\n```\n\nEvery resource method returns a promise.\n\n```js\ninstance.payments\n  .all({\n    from: '2016-08-01',\n    to: '2016-08-20',\n  })\n  .then(response =\u003e {\n    // handle success\n  })\n  .catch(error =\u003e {\n    // handle error\n  });\n```\n\nIf 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 ](http://fredkschott.com/post/2014/03/understanding-error-first-callbacks-in-node-js/)\n\n```js\ninstance.payments.all(\n  {\n    from: '2016-08-01',\n    to: '2016-08-20',\n  },\n  (error, response) =\u003e {\n    if (error) {\n      // handle error\n    } else {\n      // handle success\n    }\n  }\n);\n```\n\n## Supported Resources\n- [Account](documents/account.md)\n\n- [Addon](documents/addon.md)\n\n- [Item](documents/items.md)\n\n- [Customer](documents/customer.md)\n\n- [Token](documents/token.md)\n\n- [Order](documents/order.md)\n\n- [Payments](documents/payment.md)\n\n- [Settlements](documents/settlement.md)\n\n- [Fund](documents/fund.md)\n\n- [Refunds](documents/refund.md)\n\n- [Invoice](documents/invoice.md)\n\n- [Subscriptions](documents/subscription.md)\n\n- [Payment Links](documents/paymentLink.md)\n\n- [Product Configuration](documents/productConfiguration)\n\n- [Smart Collect](documents/virtualAccount.md)\n\n- [Stakeholder](documents/stakeholders.md)\n\n- [Route](documents/transfer.md)\n\n- [QR Code](documents/qrcode.md)\n\n- [Emandate](documents/emandate.md)\n\n- [Cards](documents/card.md)\n\n- [Paper NACH](documents/papernach.md)\n\n- [UPI](documents/upi.md)\n\n- [Register Emandate and Charge First Payment Together](documents/registerEmandate.md)\n\n- [Register NACH and Charge First Payment Together](documents/registerNach.md)\n\n- [Payment Verification](documents/paymentVerfication.md)\n\n- [Webhook](documents/webhook.md)\n\n- [Dispute](documents/disputes.md)\n\n- [Document](documents/documents.md)\n\n- [oAuthTokenClient](documents/oAuthTokenClient.md)\n\n---\n\n## Development\n\n```bash\nnpm install\n```\n\n## Testing\n\n```bash\nnpm test\n```\n\n## Release\n\n1.  Switch to `master` branch. Make sure you have the latest changes in the local master\n2.  Update the `CHANGELOG.md` \u0026 bump the version in `package.json`\n3.  Commit\n4.  Tag the release \u0026 push to Github\n5.  Create a release on GitHub using the website with more details about the release\n6.  Publish to npm with `npm publish` command\n\n## Licence\n\nMIT Licensed. See [LICENSE.txt](LICENSE.txt) for more details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frazorpay%2Frazorpay-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frazorpay%2Frazorpay-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frazorpay%2Frazorpay-node/lists"}