# NHN KCP

## Authenticated payment

{% tabs %}
{% tab title="Test" %}

### **Test environment setup**

1. [i'mport Admin console](https://admin.iamport.kr)→ **Payment integration** → **Test settings** → Select PG (**NHN KCP**) → <mark style="color:red;">**NHN KCP**</mark> -> **Add**&#x20;
2. Select **General payment test T0000 Settings** -> **Save**

> A payment is made on the i'mport test account.

![Sample page](https://2814812280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTv8JEzyM5h4cYcL5StH%2Fuploads%2F86NrQ40GQMuyWwU3fe89%2Fimage.png?alt=media\&token=20ebc2ff-a530-49ce-a658-5ffb29233feb)

![Select General payment test T0000 Settings -> Save](https://2814812280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTv8JEzyM5h4cYcL5StH%2Fuploads%2F1XJnE0baymBkmvG8Lvrg%2Fimage.png?alt=media\&token=06b14184-a0c8-436f-9533-5735c29ec7a8)

{% endtab %}

{% tab title="Live" %}

### Live environment setup

Enter the **Site Code** and **Site Key** issued by KCP using the **Add** button and then click **Save**.

<div align="left"><img src="https://2814812280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTv8JEzyM5h4cYcL5StH%2Fuploads%2FYi2qV8VJ7G4Hl9uFSVWC%2Fimage.png?alt=media&#x26;token=0d8807e9-64b8-4e5e-8278-9aec53054c32" alt="Sample page"> <img src="https://2814812280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTv8JEzyM5h4cYcL5StH%2Fuploads%2FPrv2gTUiTZKpA7ShTNTv%2Fimage.png?alt=media&#x26;token=7a7c6a22-c123-4c34-9a6b-65d0ef407645" alt="Input page"></div>
{% endtab %}
{% endtabs %}

## Non-authenticated payment

Since non-authenticated payment has more stringent conditions for service entry than general payment, you must first check service entry possibility with KCP.

{% tabs %}
{% tab title="Payment window" %}

### Test environment setup

1. [i'mport Admin console](https://admin.iamport.kr)→ **Payment integration** → **Test settings** → Select PG (**NHN KCP**) → <mark style="color:red;">**NHN KCP (Subscription)**</mark> -> **Add**&#x20;
2. Check the auto-generated MID value and then click **Save**.

![Sample page](https://2814812280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTv8JEzyM5h4cYcL5StH%2Fuploads%2FLGKls7AzL0om0Fx3DnHZ%2Fimage.png?alt=media\&token=2952cff9-6e59-44dd-ac70-e9d6582b0964)

![Check auto-generated MID value and then click Save.](https://2814812280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTv8JEzyM5h4cYcL5StH%2Fuploads%2FuG7TPJ2KBSuNvtKJ8N0F%2Fimage.png?alt=media\&token=d6189c6b-8c7f-49ae-80b1-72a07353b0a8)

### Live environment setup

Enter the live **Site Code** issued by KCP at contract signing as follows:

1. **Payment integration -> Live settings**
2. **NHN KCP -> NHN KCP(Subscription) -> Add**
3. **Enter Site Code, Site Key, and Batch Payment Group ID -> Save**&#x20;

{% hint style="info" %}
**How to get a Batch Payment Group ID** \
Log in to the KCP merchant admin page with the **site code issued by KCP for subscription payments**, enter a desired user name and a password to get a private certificate.\
&#x20; \- To get a certificate: [https://admin8.kcp.co.kr](https://admin8.kcp.co.kr/) > Log in with subscription payment ID > Customer service > Certificate issuance > KCP private certificate > Click Request NHN KCP certificate > Confirm Username (random input)\
&#x20; \- To get a group ID: [https://admin8.kcp.co.kr](https://admin8.kcp.co.kr/) > Log in with subscription payment ID > Payments > **General payment > Credit card** **> Batch payment ID >** Get group ID&#x20;
{% endhint %}

![Payment integration -> Select Live tab](https://2814812280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTv8JEzyM5h4cYcL5StH%2Fuploads%2FJELBUaAQFKbwQKJSzUFm%2Fimage.png?alt=media\&token=48bfb8ce-7d1d-42b0-8d5e-6f1dfcfc5195)

![NHN KCP -> NHN KCP(Subscription) -> click Add](https://2814812280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTv8JEzyM5h4cYcL5StH%2Fuploads%2FynMfjN2ao2WGo0i864o4%2Fimage.png?alt=media\&token=eaf688ba-e70d-4ef2-b564-5de211953f6c)

![Enter Site Code, Site Key, and Batch Payment Group ID -> Save](https://2814812280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTv8JEzyM5h4cYcL5StH%2Fuploads%2FWqFhXULl0mCaZRjVagVW%2Fimage.png?alt=media\&token=60f0f34a-5737-40cf-9c2b-e335993825f9)
{% endtab %}

{% tab title="API" %}

### Test environment setup

1. [i'mport Admin console](https://admin.iamport.kr)→ **Payment integration** → **Test settings** → Select PG (**NHN KCP**) → <mark style="color:red;">**NHN KCP API**</mark> -> **Add**&#x20;
2. Check the auto-generated MID value and then click **Save**.

![Select NHN KCP → NHN KCP API](https://2814812280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTv8JEzyM5h4cYcL5StH%2Fuploads%2Frwv170cwTUUI58VROqQz%2Fimage.png?alt=media\&token=5fb7139c-431a-4ee4-a6ad-7724c1ae3537)

![Check auto-generated MID value and then click Save.](https://2814812280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTv8JEzyM5h4cYcL5StH%2Fuploads%2FGzjYNKxHHjSl3Y8Vfx8t%2Fimage.png?alt=media\&token=f29d28eb-b14b-49db-9765-80773729dca7)

### Live environment setup

Enter the **Site Code** and **Site Key** issued by KCP at contract signing as follows:

1. **Payment integration -> Live settings**
2. **NHN KCP -> NHN KCP API -> Add**
3. **Enter Site Code (PG Merchant ID) and Site Key (PG Merchant Secret), and then enter Batch Payment Group ID -> Save**

{% hint style="info" %}
**How to get a Batch Payment Group ID** \
Log in to the KCP merchant admin page with the **site code issued by KCP for recurring payments**, and then enter a desired user name and a password to get a private certificate.\
&#x20; \- To get a certificate: [https://admin8.kcp.co.kr](https://admin8.kcp.co.kr/) > Log in with recurring payment ID > Customer service > Certificate issuance > KCP private certificate > Click Request NHN KCP certificate > Confirm Username (random input)\
&#x20; \- To get a group ID: [https://admin8.kcp.co.kr](https://admin8.kcp.co.kr/) > Log in with recurring payment ID > Payments > **General payment > Credit card** **> Batch payment ID >** Get group ID
{% endhint %}

![Payment integration -> Select Live tab](https://2814812280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTv8JEzyM5h4cYcL5StH%2Fuploads%2FdiHfJALL8JGmmHbje8mG%2Fimage.png?alt=media\&token=0936c183-0307-469b-997e-6ad2cb8e3004)

![NHN KCP -> NHN KCP API -> Add](https://2814812280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTv8JEzyM5h4cYcL5StH%2Fuploads%2FkQFPzTJZvGoIy0j1tzsy%2Fimage.png?alt=media\&token=8e2f8aa4-c09a-4ad1-8f5b-a9a4dac374e4)

![Enter Site Code (PG Merchant ID) and Site Key (PG Merchant Secret), and then enter Batch Payment Group ID -> Save](https://2814812280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTv8JEzyM5h4cYcL5StH%2Fuploads%2FtVhiECJrc5v2zXgj5SpE%2Fimage.png?alt=media\&token=49000310-a426-4ab4-8874-9df0c32639ca)
{% endtab %}
{% endtabs %}

{% hint style="warning" %}
**Since non-authenticated payment has more stringent conditions for service entry than general payment, you must first check service entry possibility with KCP.**
{% endhint %}

{% hint style="info" %}

## Checklist

* In test mode, no money withdrawl occurs for a payment.
* Hub-type Kakao Pay and Naver Pay do not support test mode. (Service is available after contract signing with KCP)
  {% 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-en/ready/2.-pg/payment-gateway-settings/nhn-kcp.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.
