# Get balance API (for split payment transaction)

### Gets the balance of a transaction paid for using multiple payment methods.

## Gets the balance of a transaction paid for using multiple payment methods.

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

This is currently supported only by PAYCO.

#### Path Parameters

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

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

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

{% tabs %}
{% tab title="PaymentBalanceResponseAnnotation" %}
**`amount`` `**<mark style="color:purple;">**`Integer`**</mark>

**`Total amount`**

&#x20;

**`cash_receipt`` `**<mark style="color:red;">**`(PaymentBalanceAnnotation):`**</mark>&#x20;

**`Cash receipt amount`**

**`primary`` `**<mark style="color:red;">**`(PaymentBalanceAnnotation):`**</mark>&#x20;

**`Payment method 1`**(credit card, account transfer, virtual account, mobile micropayment) amount

**`secondary`` `**<mark style="color:red;">**`(PaymentBalanceAnnotation):`**</mark>&#x20;

**`Payment method 2`** PG/credit card points amount

**`discount`` `**<mark style="color:red;">**`(PaymentBalanceAnnotation):`**</mark>&#x20;

**`PG/credit card discount amount`**

**`histories`` `**<mark style="color:red;">**`(Array[PaymentBalanceBaseAnnotation], optional)`**</mark>&#x20;

**`PaymentBalance history`**&#x20;
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="PaymentBalanceAnnotation" %}
**`tax_free`` `**<mark style="color:purple;">**`Integer`**</mark>

**`Tax free amount`** (excludes any refunded amount)

**`supply`` `**<mark style="color:purple;">**`Integer`**</mark>

**`Taxed amount`** (excludes any refunded amount)

**`vat`** <mark style="color:purple;">**`Integer`**</mark>

**`Tax`** (excludes any refunded amount)

**`service`` `**<mark style="color:purple;">**`Integer`**</mark>

**`Fee`** (excludes any refunded amount)
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="PaymentBalanceBaseAnnotation" %}
**`cash_receipt`` `**<mark style="color:red;">**`(PaymentBalanceAnnotation):`**</mark>&#x20;

**`Cash receipt amount`**

**`primary`` `**<mark style="color:red;">**`(PaymentBalanceAnnotation):`**</mark>&#x20;

**`Payment method 1`**(credit card, account transfer, virtual account, mobile micropayment) amount

**`secondary`` `**<mark style="color:red;">**`(PaymentBalanceAnnotation):`**</mark>&#x20;

**`Payment method 2`** PG/credit card points amount

**`discount`` `**<mark style="color:red;">**`(PaymentBalanceAnnotation):`**</mark>&#x20;

**`PG/credit card discount amount`**

**`created  *`` `**<mark style="color:purple;">**`integer`**</mark>&#x20;

**`Balance created at (UNIX timestamp)`**
{% endtab %}
{% endtabs %}
{% endtab %}

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

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

{% endtab %}

{% tab title="404: Not Found Invalid imp\_uid" %}

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

{% endtab %}
{% endtabs %}

<details>

<summary>Response Model Schema</summary>

```json
{
  "code": 0,
  "message": "string",
  "response": {
    "amount": 0,
    "cash_receipt": {
      "tax_free": 0,
      "supply": 0,
      "vat": 0,
      "service": 0
    },
    "primary": {
      "tax_free": 0,
      "supply": 0,
      "vat": 0,
      "service": 0
    },
    "secondary": {
      "tax_free": 0,
      "supply": 0,
      "vat": 0,
      "service": 0
    },
    "discount": {
      "tax_free": 0,
      "supply": 0,
      "vat": 0,
      "service": 0
    },
    "histories": [
      {
        "cash_receipt": {
          "tax_free": 0,
          "supply": 0,
          "vat": 0,
          "service": 0
        },
        "primary": {
          "tax_free": 0,
          "supply": 0,
          "vat": 0,
          "service": 0
        },
        "secondary": {
          "tax_free": 0,
          "supply": 0,
          "vat": 0,
          "service": 0
        },
        "discount": {
          "tax_free": 0,
          "supply": 0,
          "vat": 0,
          "service": 0
        },
        "created": 0
      }
    ]
  }
}
```

</details>

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

[**https://api.iamport.kr/#!/payments/balanceByImpUid**](https://api.iamport.kr/#!/payments/balanceByImpUid)
{% 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/payment-api/get-balance-api-for-split-payment-transaction.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.
