# Confirm identity verification API

### Confirms the identity verification based on the submitted verification ID and OTP number.

## Confirms the identity verification based on the submitted verification ID and OTP number.&#x20;

<mark style="color:green;">`POST`</mark> `https://api.iamport.kr/certifications/otp/confirm/{imp_uid}`

If verification is successful, this return a response with the user's name, phone number, carrier, gender, foreigner status, date of birth, CI, and DI values.<br>

#### Path Parameters

| Name                                       | Type   | Description                                                 |
| ------------------------------------------ | ------ | ----------------------------------------------------------- |
| imp\_uid<mark style="color:red;">\*</mark> | String | <mark style="color:red;">**i'mport verification ID**</mark> |

#### Request Body

| Name                                  | Type   | Description                                                     |
| ------------------------------------- | ------ | --------------------------------------------------------------- |
| otp<mark style="color:red;">\*</mark> | String | <mark style="color:red;">**OTP number received via SMS**</mark> |

{% tabs %}
{% tab title="200: OK Success" %}
{% tabs %}
{% tab title="CertificationResponse" %}
**`code`** <mark style="color:red;">**\***</mark>**&#x20;**<mark style="color:purple;">**integer**</mark>

**Response code**

0: success, Not 0: check the message

**`message`** <mark style="color:red;">**\***</mark>**&#x20;**<mark style="color:green;">**string**</mark>

**Response message**

A non-zero code includes a message like 'Invalid payment info'.

**response** <mark style="color:red;">**(CertificationAnnotation, optional)**</mark>
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="CertificationAnnotation" %}
**`imp_uid`**  <mark style="color:red;">\*</mark> <mark style="color:green;">**string**</mark>&#x20;

**`verification ID`**

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

**`Order ID`**

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

**`PG verification ID`**&#x20;

**`pg_provider`** <mark style="color:red;">**\***</mark>**&#x20;&#x20;**<mark style="color:green;">**string**</mark>&#x20;

**`PG provider`**

**`name`**   <mark style="color:green;">**string**</mark>&#x20;

**`Name`**&#x20;

&#x20;

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

**`Gender`**&#x20;

* male
* female

**`birthday`  &#x20;**<mark style="color:green;">**string**</mark>

**`DOB`**&#x20;

ISO8601 date in string format. <mark style="color:red;">YYYY-MM-DD (10-digit)</mark>

**`foreigner`**  <mark style="color:red;">**\***</mark>  <mark style="color:orange;">**boolean**</mark>

**`Foreigner status`**

<mark style="color:red;">When signing a Danal identity verification service contract</mark>, you must request to use foreigner identification service.

* true : foreigner
* false : not foreigner

&#x20;**`phone`**  <mark style="color:green;">**string**</mark>

**`Mobile phone number`**&#x20;

Returns mobile phone number with only numbers without special symbols. This attribute is omitted unless pre-approved by the carrier. For pre-approval from the carrier, send a request with your Danal CPID to **<cs@iamport.kr>**.

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

**`Mobile carrier`**&#x20;

Requires pre-approval from the carrier (send a request with your Danal CPID to **<cs@iamport.kr>**).&#x20;

* SKT
* KT
* LGT
* SKT\_MVNO
* KT\_MVNO
* LGT\_MVNO

**`certified`**   <mark style="color:red;">**\***</mark>  <mark style="color:orange;">**boolean**</mark>

**`Whether verification is successful`**

&#x20;

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

**`Verified at`** (UNIX timestamp)&#x20;

**`unique_key` &#x20;**<mark style="color:green;">**string**</mark>

**`Personal Identification Key (CI)`**

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

**`Merchant Personal Identification Key (DI)`**

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

**URL of the web page where the identity verification process is processed**

**`foreigner_v2`**   <mark style="color:orange;">**boolean**</mark>

**`Foreigner status (nullable)`**

* true : foreigner
* false : not foreigner

Requires a separate request to use Danal identity verification service
{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="400: Bad Request Missing or invalid parameter error" %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="401: Unauthorized Missing or invalid access token" %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="404: Not Found Result not found" %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="500: Internal Server Error Danal server error" %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

<details>

<summary>Response Model Schema</summary>

```json
{
  "code": 0,
  "message": "string",
  "response": {
    "imp_uid": "string",
    "merchant_uid": "string",
    "pg_tid": "string",
    "pg_provider": "string",
    "name": "string",
    "gender": "string",
    "birth": 0,
    "birthday": "string",
    "foreigner": true,
    "phone": "string",
    "carrier": "SKT",
    "certified": true,
    "certified_at": 0,
    "unique_key": "string",
    "unique_in_site": "string",
    "origin": "string",
    "foreigner_v2": true
  }
}
```

</details>

{% hint style="success" %}
**Swagger Test Link**

[**https://api.iamport.kr/#!/certifications/confirmOTP**](https://api.iamport.kr/#!/certifications/confirmOTP)
{% 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/api/identity-verification-api/confirm-identity-verification-api.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.
