# JavaScript SDK (구버전)

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

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

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

포트원 JavaScript SDK를 사용하면 웹사이트 또는 앱에서 결제창 또는 본인인증창과 연동할 수 있습니다. 버전 내역 및 각 버전의 주요 변경 사항은 [**릴리스 노트**](/docs/sdk/javascript-sdk-old/sdk-release-note.md)를 참조하세요.

### SDK Library 로드하기 <a href="#sdk-library" id="sdk-library"></a>

**포트원 JavaScript SDK**를 사용하기 위해서 먼저 해당 라이브러리를 다음과 같이 페이지에 추가해야 합니다. 해당 라이브러리는 CDN<mark style="color:purple;">**(<https://cdn.iamport.kr/js/iamport.payment-{SDK-최신버전}.js>**</mark>)을 통한 사용을 권장합니다. 라이브러리가 로드되면, **IMP** 전역 객체를 **window** 객체의 프로퍼티로 접근하여 **IMP**의 함수들을 호출할 수 있습니다.

{% code title="HTML" %}

```html
<!-- jQuery -->
<script type="text/javascript" src="https://code.jquery.com/jquery-1.12.4.min.js" ></script>
<!-- iamport.payment.js -->
<script type="text/javascript" src="https://cdn.iamport.kr/js/iamport.payment-{SDK-최신버전}.js"></script>
```

{% endcode %}

{% hint style="warning" %}
**jQuery 1.0 이상이 설치**되어 있어야 합니다.
{% endhint %}

> **CDN 사용에 대한 불편함이 있으신 경우 아래 URL 로 설정해 주셔도 무방합니다.** [**https://service.iamport.kr/js/iamport.payment-**](https://service.iamport.kr/js/iamport.payment-1.2.0.js)**{SDK-최신버전}**[**.js**](https://service.iamport.kr/js/iamport.payment-1.2.0.js)


---

# 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/sdk/javascript-sdk-old.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.
