---
title: Initialize using script tag
slug: crypto/initialize-using-script-tag
docTags: 
createdAt: 2023-10-19T09:55:57.409Z
---

## Include script dependency&#x20;

When using script dependency you can include the javascript's url with in the head section of the application.  X.Y.Z is the version of the javascript file, for instance: `https://pay3.money/pay3-sdk-pay/index.global.1.2.3.js`

:::CodeblockTabs
index.js

```html
<head>
  <script src="https://pay3.money/pay3-sdk-pay/index.global.X.Y.Z.js"></script>
</head>
```
:::

&#x20; This script creates a singleton instance of the Pay3 class and exports an object `window.pay3Pay`

## init()

Init saves the parameters which will be used during future function calls. It also registers a listener to listen for messages from Pay3. Pay3 team shares `hostname` and `clientId` during onboarding. &#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 by the Pay3 team to identify the client application. The client ID is environment dependent.
3. **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
window.pay3Pay.init(hostname, clientId);
```
:::

***

