# Get payment amount API

### Gets the amount saved via [**save payment amount API**](https://portone.gitbook.io/docs-en/api/payment-api/save-payment-amount-api).

## Gets the pre-saved amount.

<mark style="color:blue;">`GET`</mark> `https://api.iamport.kr/payments/prepare/{merchant_uid}`

#### Request Body

| Name                                            | Type   | Description                                           |
| ----------------------------------------------- | ------ | ----------------------------------------------------- |
| merchant\_uid<mark style="color:red;">\*</mark> | String | <mark style="color:red;">**Merchant order ID**</mark> |

{% tabs %}
{% tab title="200: OK Success" %}
{% tabs %}
{% tab title="PaymentPrepareResponse" %}
**`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'.

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

{% tabs %}
{% tab title="PaymentPrepareAnnotation" %}
**`merchant_uid`` `**<mark style="color:red;">**`*`**</mark>**` `**<mark style="color:green;">**`string`**</mark>

**`Merchant order ID`**

**`amount`**<mark style="color:red;">**`*`**</mark><mark style="color:orange;">**`number`**</mark>&#x20;

**`Payment amount`**
{% endtab %}
{% endtabs %}
{% endtab %}

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

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

{% endtab %}
{% endtabs %}

<details>

<summary>Response Model Schema</summary>

```
{
  "code": 0,
  "message": "string",
  "response": {
    "merchant_uid": "string",
    "amount": 0
  }
}
```

</details>

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

[**https://api.iamport.kr/#!/payments.validation/getPaymentPrepareByMerchantUid**](https://api.iamport.kr/#!/payments.validation/getPaymentPrepareByMerchantUid)
{% endhint %}
