# Get billing keys API

### Gets details of multiple billing keys.

## Get details of multiple billing keys.

<mark style="color:blue;">`GET`</mark> `https://api.iamport.kr/subscribe/customers`

Gets details (card info) of billing keys for the specified array of customer\_uid*s.* Each card is mapped to a unique **customer\_uid**.

#### Query Parameters

| Name                                               | Type  | Description                                     |
| -------------------------------------------------- | ----- | ----------------------------------------------- |
| customer\_uid\[]<mark style="color:red;">\*</mark> | Array | <mark style="color:red;">**Billing key**</mark> |

{% tabs %}
{% tab title="200: OK Success" %}
{% tabs %}
{% tab title="CustomerResponse" %}
**`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;">**(CustomerAnnotation, optional)**</mark>
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="CustomerAnnotation" %}
**`code`** <mark style="color:red;">**\***</mark> <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'.

**`customer_uid`** <mark style="color:red;">**\***</mark> <mark style="color:green;">**string**</mark>

**`Customer ID`**<br>

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

**PG code for billing key**

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

**PG merchant ID (MID) for billing key**

**`card_name`** <mark style="color:red;">**\***</mark> <mark style="color:green;">**string**</mark>

**`Credit card name`**

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

**`Credit card code`**

&#x20;

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

**`Masked card number`**

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

**`Credit card type`**

**Not supported in some PGs (returns null)**

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

**`Customer name`**

**`customer_tel`** <mark style="color:red;">**\***</mark> <mark style="color:green;">**string**</mark>

**`Customer phone`**

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

**`Customer email`**

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

**`Customer address`**&#x20;

&#x20;

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

**`Customer zip code`**

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

**`Billing key issued at`** (UNIX timestamp)

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

**`Billing key updated at`** (UNIX timestamp)
{% endtab %}
{% endtabs %}
{% endtab %}

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

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

{% endtab %}

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

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

{% endtab %}
{% endtabs %}

<details>

<summary>Response Model Schema</summary>

```json
{
  "code": 0,
  "message": "string",
  "response": [
    {
      "customer_uid": "string",
      "pg_provider": "string",
      "pg_id": "string",
      "card_name": "string",
      "card_code": "string",
      "card_number": "string",
      "card_type": "null",
      "customer_name": "string",
      "customer_tel": "string",
      "customer_email": "string",
      "customer_addr": "string",
      "customer_postcode": "string",
      "inserted": 0,
      "updated": 0
    }
  ]
}
```

</details>

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

[**https://api.iamport.kr/#!/subscribe.customer/customer\_view\_multiple**](https://api.iamport.kr/#!/subscribe.customer/customer_view_multiple)
{% endhint %}
