{"id":18789968,"url":"https://github.com/chetanppatil/pay-instamojo","last_synced_at":"2026-05-03T20:39:28.904Z","repository":{"id":32069904,"uuid":"131501814","full_name":"chetanppatil/pay-instamojo","owner":"chetanppatil","description":"Library to connect Instamojo in your Node application","archived":false,"fork":false,"pushed_at":"2022-12-07T02:13:50.000Z","size":2861,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-16T09:49:02.489Z","etag":null,"topics":["instamojo","library","nodejs","npm","payment","payment-gateway"],"latest_commit_sha":null,"homepage":null,"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/chetanppatil.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-29T14:33:33.000Z","updated_at":"2022-08-15T15:24:01.000Z","dependencies_parsed_at":"2023-01-14T20:26:47.171Z","dependency_job_id":null,"html_url":"https://github.com/chetanppatil/pay-instamojo","commit_stats":null,"previous_names":["the-chetan07/pay-instamojo","chetanppatil/pay-instamojo","chetan07j/pay-instamojo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chetanppatil%2Fpay-instamojo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chetanppatil%2Fpay-instamojo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chetanppatil%2Fpay-instamojo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chetanppatil%2Fpay-instamojo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chetanppatil","download_url":"https://codeload.github.com/chetanppatil/pay-instamojo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239711130,"owners_count":19684540,"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":["instamojo","library","nodejs","npm","payment","payment-gateway"],"created_at":"2024-11-07T21:09:21.688Z","updated_at":"2026-05-03T20:39:23.829Z","avatar_url":"https://github.com/chetanppatil.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NPM Package For Instamojo Payment Gateway REST API\n\n\u003c!-- [![Build Status](https://travis-ci.org/Chetan07j/pay-instamojo.svg?branch=master)](https://travis-ci.org/Chetan07j/pay-instamojo) --\u003e\n[![HitCount](http://hits.dwyl.io/chetan07j/pay-instamojo.svg)](http://hits.dwyl.io/chetan07j/pay-instamojo)\n[![Generic badge](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://standardjs.com)\n[![GitHub license](https://img.shields.io/github/license/chetan07j/pay-instamojo.svg)](https://github.com/Chetan07j/pay-instamojo/blob/master/LICENSE)\n[![GitHub contributors](https://img.shields.io/github/contributors/chetan07j/pay-instamojo.svg)](https://github.com/Chetan07j/pay-instamojo/graphs/contributors/)\n[![GitHub issues](https://img.shields.io/github/issues/chetan07j/pay-instamojo.svg)](https://github.com/Chetan07j/pay-instamojo/issues/)\n[![GitHub issues-closed](https://img.shields.io/github/issues-closed/chetan07j/pay-instamojo.svg)](https://github.com/Chetan07j/pay-instamojo/issues?q=is%3Aissue+is%3Aclosed)\n\n[![NPM](https://nodei.co/npm/pay-instamojo.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/pay-instamojo/)\n\nA node.js module, which provides an object oriented wrapper for the Instamojo REST API.\n\nThis library is built to support version `1.1` of the Instamojo API.\n\nInstamojo API documentation can be found [here](https://docs.instamojo.com/docs/create-a-request)\n\n[All About Instamojo](https://docs.instamojo.com/v1.1/docs)\n\n## Installation\n\nInstall with the node package manager [npm](http://npmjs.org):\n\n```shell\n$ npm install pay-instamojo\n```\n\n## How To Use?\n\n### Create the Instamojo client\n\n```javascript\nconst InstamojoApi = require('pay-instamojo').instamojo;\n\nconst instamojo = new InstamojoApi({\n  host: \u003cinstamojo-host\u003e,\n  apiKey: \u003cinstamojo-x-api-key\u003e,\n  authToken: \u003cinstamojo-x-auth-token\u003e\n});\n```\n\n### Get List of All Payment Requests\n\n```javascript\n/* For getRequestLists input is not required, hence first parameter is null in this call. */\n\ninstamojo.getRequestLists(null, (error, body) =\u003e {\n  console.log('RESPONSE: ', error, body);\n});\n```\n\n### Create Payment Request\n\n```javascript\n\nlet input = {\n  allowRepeatedPayment: \u003cyour-choice\u003e, // true or false (boolean)\n  amount: \u003camount-to-pay\u003e, // e.g., 10\n  buyerName: \u003cbuyer-name\u003e,\n  purpose: \u003cpurpose-of-payment\u003e,\n  redirectUrl: \u003credirectUrl-if-any\u003e,\n  phone: \u003cphone-number\u003e, // 10 digit valid phone number if any\n  sendSMS: \u003cyour-choice\u003e, // true or false (if true then phone is mandatory)\n  email: \u003cemail-id-to-send-payment-link\u003e, // valid email if any\n  sendEmail: \u003cyour-choice\u003e, // true or false (if true then email is mandatory)\n  webhook: \u003cwebhook-url\u003e\n}\ninstamojo.createRequest(input, function (error, body) {\n  console.log('RESPONSE:', error, body)\n})\n```\n\n### Get Payment Request By Id\n\n```javascript\n\nlet input = {\n  paymentRequestId: \u003cpayment-request-id\u003e\n}\ninstamojo.getPaymentRequestById(input, function (error, body) {\n  console.log('RESPONSE:', error, body)\n})\n```\n\n### Create A Refund Request\nFind input parameter values definition [here](https://docs.instamojo.com/docs/creating-a-refund)\n\n```javascript\n\nlet input = {\n  paymentId: \u003cpayment-id\u003e, // Id you got as payment acknowledgment\n  type: \u003ccode-to-identify-reason-for-this\u003e,\n  refundAmount: \u003cpaid-amount\u003e, // not mandatory (if preset then valid amount)\n  body: \u003ctext-explaining-refund\u003e // not mandatory\n}\ninstamojo.createRefund(input, function (error, body) {\n  console.log('RESPONSE:', error, body)\n})\n```\n\n### Get List of Refunds\n\n```javascript\n/* For getListOfRefunds input is not required, hence first parameter is null in this call. */\n\ninstamojo.getListOfRefunds(null, (error, body) =\u003e {\n  console.log('RESPONSE: ', error, body);\n});\n```\n\n### Get Refund Details By Id\n\n```javascript\n\nlet input = {\n  refundId: \u003crefund-id\u003e\n}\ninstamojo.getRefundDetailsById(input, function (error, body) {\n  console.log('RESPONSE:', error, body)\n})\n```\n\n### Get Payment Details By Id\n\n```javascript\n\nlet input = {\n  paymentId: \u003crefund-id\u003e\n}\ninstamojo.getPaymentDetailsById(input, function (error, body) {\n  console.log('RESPONSE:', error, body)\n})\n```\n\n### Disable Payment Request By Id\n\n```javascript\n\nlet input = {\n  paymentRequestId: \u003cpayment-request-id\u003e\n}\ninstamojo.disablePaymentRequest(input, function (error, body) {\n  console.log('RESPONSE:', error, body)\n})\n```\n\n### Enable Payment Request By Id\n\n```javascript\n\nlet input = {\n  paymentRequestId: \u003cpayment-request-id\u003e\n}\ninstamojo.enablePaymentRequest(input, function (error, body) {\n  console.log('RESPONSE:', error, body)\n})\n```\n\n## Options\n\nInstamojoApi options:\n\n- `host\u003cstring\u003e`: The hostname for instamojo\n- `apiKey\u003cstring\u003e`: Instamojo X-Api-Key\n- `authToken\u003cstring\u003e`: Instamojo X-Auth-Token\n\n## Implemented APIs\n\n- Get List of All Payment Requests\n- Create Payment Request\n- Get Payment Request By Id\n- Create Refund\n- Get List Of Refunds\n- Get Refund Details By Id\n- Get Payment Details By Id\n- Disable Payment Request By Id\n- Enable Payment Request By Id\n\n## Changelog\n\n- _1.0.3 getListOfRefunds, getRefundDetailsById, getPaymentDetailsById, disablePaymentRequest, enablePaymentRequest functions added_\n- _1.0.2 get payment request by id, create refund function added_\n- _1.0.1 request dependency missing (added in package.json)_\n- _1.0.0 Initial version_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchetanppatil%2Fpay-instamojo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchetanppatil%2Fpay-instamojo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchetanppatil%2Fpay-instamojo/lists"}