---
title: Initialize using npm
slug: initialize-using-npm
docTags: 
createdAt: 2025-05-02T10:40:00.253Z
---

## Install dependency&#x20;

Install `@pay3/sdk` package using package manager which adds it to your `packages.json` &#x20;

:::CodeblockTabs
index.js

```shell
npm install --save @pay3/sdk
```
:::

The above command will add pay3 js sdk to dependencies section of your `package.json`

:::CodeblockTabs
index.js

```shell
"dependencies": {
    ...
    "@pay3/sdk": "^1.6.4",
    ...
}
```
:::

## initPay3()

Pay3 SDK supports Fiat Checkout flow using payment only mode.

*Pay3 team* shares `hostname` and `clientId` during onboarding. Following parameters can be used for creating new instance of Pay3.&#x20;

**Parameters**

1. **hostname**: Pay3 will be opened in a new window using this hostname prefix. The host name is environment dependent.&#x20;
2. **clientId**: A unique client ID is created for each client application. The client ID is environment dependent.
3. **isPaymentMode** : Pass `true` for fiat checkout in payments only mode.&#x20;
4. **lang&#x20;**(optional, default value '**en**'):  This parameter specifies the language preference for the Pay3 SDK. The strings used follow two letter language code as in ISO 639-1. Example **pt** for Portuguese, **en** for English.

:::CodeblockTabs
index.js

```javascript
import { initPay3, Pay3 } from '@pay3/sdk';

const pay3Pay: Pay3 = initPay3({ clientId, hostname, isPaymentMode: true, lang: 'en' });
```
:::

***

