> For the complete documentation index, see [llms.txt](https://docs.ippopay.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ippopay.com/server-side-integrations/node-js-sdk.md).

# Node JS SDK

## Ippopay Node SDK

&#x20;[![npm](https://camo.githubusercontent.com/b5fcc3731cd6163fe2555dbdc927f454920303d080087d42ec4b170e6a2cabdb/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f6e6f64652d6970706f7061792e7376673f6d61784167653d323539323030303f7374796c653d666c61742d737175617265)](https://www.npmjs.com/package/node-ippopay)

Official nodejs library for [Ippopay API](https://docs.ippopay.com/node-js-sdk).

Check this link for detailed information to inteagrate Ippopay Node JS SDK: <https://docs.ippopay.com/node-js-sdk>

### Installation

```bash
npm i node-ippopay
```

### Documentation

Documentation of Ippopay's API is available at <https://docs.ippopay.com/node-js-sdk>

#### Basic Usage

Initiate the Ippopay instance with `public_key` & `secret_key`. You can get the keys from the merchant dashboard (<https://app.ippopay.com/settings/api>)

```javascript
const Ippopay = require("node-ippopay");

var ippopay_instance = new Ippopay({
  public_key: 'YOUR_PUBLIC_KEY',
  secret_key: 'YOUR_SECRET_KEY',
});
```

#### Create an Order

```javascript
ippopay_instance.createOrder({
    amount: 10.00, 
    currency: 'INR',
    payment_modes: "cc,dc,nb,upi",
    customer: {
        name: "Test",
        email: "test@gmail.com",
        phone: {
            country_code: "91",
            national_number: "9876543210"
        }
    }
}, function (err, data){
   console.log(data);
});
```

#### Get Transaction Details of Order

```javascript
ippopay_instance.orderTransactionDetails({
    orderId: 'ORDER_ID'
}, function (err, data){
   console.log(data);
});
```

### Author

This component is written by [IppoPay](https://github.com/ippopay).

### License

IppoPay 2021 © All Rights Reserved. [IppoPay](https://www.ippopay.com)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ippopay.com/server-side-integrations/node-js-sdk.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
