# Initialization

## **Import SDK**

To use the Wepin React Native PIN Pad SDK, you first need to import the SDK. Add the following import statements:

```javascript
import WepinPin from '@wepin/pin-rn';
```

## Creating **the WepinPINPadSDK Instance**

Before creating an instance of `WepinPin`, you must register your app's Android/iOS information in the Wepin Workspace.

{% content-ref url="../../../wepin/workspace/app-registration-and-key-issuance" %}
[app-registration-and-key-issuance](https://docs.wepin.io/en/wepin/workspace/app-registration-and-key-issuance)
{% endcontent-ref %}

Using the registered app information, create an instance of `WepinPin`. Create the `WepinPin` instance as follows:

```javascript
const wepinPin = new WepinPin({
  appId: 'wepinAppId',
  appKey: 'wepinAppKey',
});
```

## **SDK Initialization (init)**

When initializing the Wepin React Native PIN Pad SDK, you can define the required widget properties.

```javascript
await wepinPin.init(attributes);
```

#### **Parameters**

* **attributes** <`IWepinSDKAttributes`> **optional**
  * defaultLanguage: - `defaultLanguage`: The language to be displayed on the widget (default: `'en'`) Currently, only `ko`, `en`, and `ja` are supported.
  * **defaultCurrency**: The currency to be displayed on the widget (default: `'USD'`) Currently, only `'KRW'`,`'USD'` and `'JPY'` are supported.

#### **Return value**

* **Promise**<`boolean`>

#### **Example**

```javascript
await wepinPin.init({
  defaultLanguage: 'ko',
  defaultCurrency: 'KRW',
});
```

## **Checking Initialization Status (isInitialized)**

You can check whether the Wepin PIN Pad SDK has been successfully initialized.

```javascript
wepinPin.isInitialized();
```

#### **Parameters**

* **None**

#### **Return Value**

* **\<boolean>**
  * Returns `true` if the initialization was successful, and `false` if it failed.

## **Changing Language**

You can change the language of the PIN Pad SDK.

```javascript
await wepinPin.changeLanguage({ language: 'ko' });
```

#### **Parameters**

* **\<object>**
  * **language** `<String>`\
    Specifies the language to be displayed in the PIN Pad screen. Currently supported languages are `en,` `ja` and `ko`.
