# Confirm Process

### This service allows the merchant to confirm its intention to process a payment request before making the request.

![](https://2814812280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTv8JEzyM5h4cYcL5StH%2Fuploads%2Fs0IWMuUkxgJLDYjoThTF%2Fconfirm_service.png?alt=media\&token=709708fd-727f-4c69-aaa1-c331f6813398)

![Confirm Process](https://2814812280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTv8JEzyM5h4cYcL5StH%2Fuploads%2FJXeZR1k8JwQT5ah3lp9x%2Fconfirm_process_flow.png?alt=media\&token=cb62942d-5fda-46da-b033-3faed70c245c)

{% hint style="info" %}
**A merchant must use this service:**

* When there is a small quantity of the product in stock
* When payment is processed first-come-first-served
* When there is business logic that the merchant wants to execute just before making the payment request
  {% endhint %}

![Confirm Process](https://2814812280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTv8JEzyM5h4cYcL5StH%2Fuploads%2F5cTrdYBtWgdCrl4D2Bea%2Fconfirm_process_need.png?alt=media\&token=0d6205ad-75cd-4033-93b5-e0dd2579f6af)

### When there is a small quantity of the product in stock

If a merchant's product is a luxury or very popular item and there are concurrent requests competing to submit a payment, the merchant server can process the payment request after doing a final check on the inventory. If the confirm process is not configured, the purchased order may not ship as scheduled due to lack of inventory or may be cancelled leading to poor customer satisfaction and experience.

![](https://2814812280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTv8JEzyM5h4cYcL5StH%2Fuploads%2Fcj5IVDPK7Ar5PoxJOOJW%2Flack_of_inventory.png?alt=media\&token=8b8a1987-489b-4289-85f1-4cb7952a1a7f)

### When payment is processed first-come-first-served

If a merchant uses a payment method that launches at a scheduled time, such as application for marathon, ticketing for popular concerts, and special discount events such as OO Day, there will be a rush of concurrent payment requests at the scheduled time. In such a case, the merchant needs to perform a final inventory check on the server just before making the payment request.

![](https://2814812280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTv8JEzyM5h4cYcL5StH%2Fuploads%2FAOV3VxVq1bDnyvbq48gh%2Ffcfs.png?alt=media\&token=538d31cb-e76a-43d0-a07b-c3d0c1ca613c)

### When there is business logic that the merchant wants to execute just before making the payment request

The service can also be used when the merchant needs to process some business logic just before payment for reasons, such as checking the health of the merchant server.

![](https://2814812280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTv8JEzyM5h4cYcL5StH%2Fuploads%2Fm2OHJ5ElZuHthKw457Of%2Fserver_health_check.png?alt=media\&token=4d808859-d5a9-4dae-9342-e96d50477947)

{% hint style="info" %}
**How to request for Confirm Process**

Send a technical support request email (<support@iamport.kr>) with your <mark style="color:red;">**Merchant ID**</mark>.
{% endhint %}

![Checking your Merchant ID](https://2814812280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTv8JEzyM5h4cYcL5StH%2Fuploads%2F5wEGjL37KYhFwTDh4NmA%2Fimage.png?alt=media\&token=9b54dbba-e130-466b-973f-91e812672664)

### **How to use Confirm Process**

To use Confirm Process, you must define the **confirm\_url** parameter and set it to the merchant endpoint URL when calling the request\_pay() function.

{% code title="JavaScript SDK" %}

```jsx
... 
confirm_url : ‘Merchant EndPoint URL’,
...
```

{% endcode %}

If the confirm URL is set, the final confirm page before payment request is loaded via **HTTP** with the same webhook data in the HTTP body.

> `imp_uid`: payment ID
>
> `merchant_uid`: order ID
>
> `status`: payment result

The payment request is processed when the merchant responds to the above request with HTTP Status **200.**

<mark style="color:red;">**Payment is not processed for a non-200 response**</mark>. (**`Failed`**)
