Instamojo NodeJs Wrapper
A node wrapper library for Instamojo APIs.
npm install instamojo-nodejs
Include and set keys
var Insta = ;Insta;
APIs Available
- Create a payment request
- See all payment links
- Get all payments
- See payment request details
- See payment details
- Initiate refund
- Get refund details
- Get all refunds
- Set sanbox mode
Create new payment request
var data = ; datapurpose = "Test"; // REQUIREDdataamount = 9; // REQUIREDdata; Insta;
You can set additional data parameters. See here
See all payment links
Insta;
Get all payment requests
Insta;
Get payment status for a particular payment request id
Insta;
Get payment details for a particular payment id and payment request id
Insta;
Initiate refund
var refund = ;refundpayment_id = ''; // This is the payment_id, NOT payment_request_idrefundtype = ''; // Available : ['RFD', 'TNR', 'QFL', 'QNR', 'EWN', 'TAN', 'PTH']refundbody = ''; // Reason for refundrefund; // Optional, if you want to refund partial amountInsta;
Details on refund types here.
Get refund status for a refund id
Insta;
Get all refunds
Insta;
Additional Payment Data
datacurrency = 'INR';databuyer_name = '<buyer name>';dataemail = '<buyer email>';dataphone = 1234567890;datasend_sms = 'False';datasend_email = 'False';dataallow_repeated_payments = 'False';datawebhook = 'Your endpoint to capture POST data from a payment';dataredirect_url = 'Your endpoint where instamojo redirects user to after payment';
Set sandbox mode
Add this line after setting your keys
Insta;
Changes in v0.0.4
Changes in v0.0.3
- Added get all refunds API
- Added payment details API
- Updated payment request details API
- Updated get all payment requests API
Submit issues
You can raise an issue in this repo or mail me at sidhant@hashexclude.com