# JavaScript SDK

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

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

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

{% hint style="info" %}
이 문서는 V2 SDK 연동을 위한 문서로 [V2 연동 시작하기](/docs/v2-payment/v2.md)을 먼저 읽으시길 권장드립니다.
{% endhint %}

가맹점 프로젝트 설정에 따라 설치 방법을 선택할 수 있습니다.

* NPM 의존성이 사용 가능한 경우 NPM으로 배포된 SDK를 설치하세요.
* HTML `<script>` 태그를 이용하는 경우 결제창 연동을 진행할 주문 페이지에 SDK를 설치하세요.

{% tabs %}
{% tab title="NPM 패키지로 추가" %}
NPM 이나 yarn 패키지 매니저를 이용해 포트원 SDK를 설치할 수 있습니다.

```shell
npm i @portone/browser-sdk
```

```shell
yarn add @portone/browser-sdk
```

{% endtab %}

{% tab title="<script> 태그로 추가" %}

```html
<script src="https://cdn.portone.io/v2/browser-sdk.js"></script>
```

{% endtab %}
{% endtabs %}


---

# 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/v2-payment/v2-sdk.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.
