# 블루월넛

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

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

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

### 1. 블루월넛 PG 설정하기

[**블루월넛 설정**](/docs/ready/2.-pg/payment-gateway/blue.md) 페이지의 내용을 참고하여 PG 설정을 진행합니다.

![](/files/yYZHcDW57LcajXYhsQcX)

### 2.결제 요청하기

[Ja](/docs/sdk/javascript-sdk-old.md)[JavaScript SDK](/docs/sdk/javascript-sdk-old.md) IMP.**request\_pay**(param, callback)을 호출하여 블루월넛 결제창을 호출할 수 있습니다. **결제결과**는 PC의 경우 IMP.request\_pay(param, callback) 호출 후 <mark style="color:red;">**callback**</mark> 으로 수신되 모바일의 경우 <mark style="color:red;">**m\_redirect\_url**</mark> 로 리디렉션됩니다.

{% tabs %}
{% tab title="인증결제창 요청" %}
{% code title="Javascript SDK" %}

```javascript
IMP.request_pay({
    pg : 'bluewalnut.{상점 ID}',
    pay_method : 'card',
    merchant_uid: "order_no_0001", // 상점에서 관리하는 주문 번호
    name : '주문명:결제테스트',
    amount : 14000,
    buyer_email : 'test@portone.io',
    buyer_name : '구매자이름',
    buyer_tel : '010-1234-5678',
    buyer_addr : '서울특별시 강남구 삼성동',
    buyer_postcode : '123-456'
}, function(rsp) { // callback 로직
	//* ...중략... *//
});
```

{% endcode %}

**주요 파라미터 설명**

**`pg` \***<mark style="color:green;">**string**</mark>

**PG사 구분코드**

**`bluewalnut`** 로 지정하면 됩니다.

**`pay_method`** <mark style="color:red;">**\***</mark> <mark style="color:green;">**string**</mark>

**결제수단 구분코드**

* card (신용카드)
* trans (실시간 계좌이체)
* vbank(가상계좌)
* phone (휴대폰소액결제)

**`merchant_uid`** <mark style="color:red;">**\***</mark> <mark style="color:green;">**string**</mark>

**`주문번호`**

매번 고유하게 채번되어야 합니다.

**`amount`** <mark style="color:red;">**\***</mark> <mark style="color:purple;">**`integer`**</mark>

**결제금액**

<mark style="color:green;">**string**</mark> 이 아닌점에 유의하세요

{% embed url="<https://codepen.io/chaiport/pen/wvyXrbp>" %}
블루월넛 결제창 예시
{% endembed %}
{% endtab %}

{% tab title="비 인증결제" %}
**포트원은 블루월넛 비 인증 결제를 지원하지 않습니다.**
{% 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/pg/payment-gateway/blue.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.
