# 2. 객체 초기화 하기

{% hint style="warning" %}
**Deprecated**

이 문서는 더 이상 관리되지 않습니다.

[PortOne 개발자센터](https://developers.portone.io/)를 이용해주세요.
{% endhint %}

#### 주문 페이지에서 가맹점 식별코드를 이용하여 IMP 객체를 초기화 합니다.

{% tabs %}
{% tab title="JavaScript" %}
{% code title="Client-side" %}

```javascript
  const IMP = window.IMP; // 생략 가능
  IMP.init("가맹점 식별코드"); // 예: imp00000000a
```

{% endcode %}
{% endtab %}

{% tab title="JavaScript (ES5)" %}
{% code title="Client-side" %}

```javascript
  var IMP = window.IMP;   // 생략 가능
  IMP.init("가맹점 식별코드"); // 예: imp00000000 
```

{% endcode %}
{% endtab %}
{% endtabs %}

{% hint style="warning" %}
해당 초기화 작업을 **1회 이상** 처리되지 않도록 유의하세요
{% endhint %}

{% hint style="info" %}
**하위가맹점(Tier) 결제창 호출 방법**

`IMP.agency('가맹점 식별코드', 'ABC'); //`<mark style="color:red;">**ABC = Tier Code**</mark>
{% endhint %}


---

# Agent Instructions: 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:

```
GET https://portone.gitbook.io/docs/auth/guide/2..md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
