# 빌링키 결제예약 조회 API

{% hint style="warning" %}
**Deprecated**

이 문서는 더 이상 관리되지 않습니다.

[PortOne 개발자센터](https://developers.portone.io/)를 이용해주세요.
{% endhint %}

### 빌링키별 결제예약목록을 조회할 수 있습니다.

## 빌링키 결제예약 조회

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

결제예약정보가 (페이징된)목록으로 전달되며 최대 3개월 단위로 조회가 가능합니다.

#### Path Parameters

| Name                                            | Type   | Description                             |
| ----------------------------------------------- | ------ | --------------------------------------- |
| customer\_uid<mark style="color:red;">\*</mark> | String | <mark style="color:red;">**빌링키**</mark> |

#### Query Parameters

| Name                                   | Type    | Description                                                                                                                                                               |
| -------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| page                                   | integer | <p><strong>조회목록 페이징</strong></p><p>1부터 시작하며 기본값은 1입니다.</p>                                                                                                                |
| from<mark style="color:red;">\*</mark> | integer | <p><mark style="color:red;"><strong>조회 시작시각</strong></mark></p><p>unix timestamp</p>                                                                                      |
| to<mark style="color:red;">\*</mark>   | integer | <p><mark style="color:red;"><strong>조회 종료시각</strong></mark></p><p>unix timestamp</p>                                                                                      |
| schedule-status                        | String  | <p><strong>예약상태</strong></p><p>누락되면 모든 상태의 예약내역 조회</p><p><code>scheduled</code>: 예약됨(실행되기 전)</p><p><code>executed</code>: 예약된 결제실행완료</p><p><code>revoked</code>: 예약철회</p> |

{% tabs %}
{% tab title="200: OK 성공" %}
{% tabs %}
{% tab title="CustomerResponse" %}
**`code`** <mark style="color:red;">**\***</mark> <mark style="color:purple;">**integer**</mark>

**응답코드**

0이면 정상적인 조회, 0 이 아닌 값이면 message를 확인해봐야 합니다

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

**응답메세지**

code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같은 오류 메세지를 포함합니다

**`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>

**`응답코드`**

0이면 정상적인 조회, 0 이 아닌 값이면 message를 확인해봐야 합니다

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

**`응답메세지`**

code값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같은 오류 메세지를 포함합니다

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

**`고객 고유번호`**\\

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

**빌링키가 등록된 PG사 코드**

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

**빌링키가 등록된 PG사 상점아이디(MID)**

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

**`카드사명`**

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

**`카드사 코드`**

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

**`마스킹 카드번호`**

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

**`카드유형`**

**(주의)해당 정보를 제공하지 않는 일부 PG사의 경우 null 로 응답됨**

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

**`고객성함`**

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

**`고객 전화번호`**

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

**`고객 Email`**

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

**`고객 주소`**

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

**`고객 우편번호`**

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

**`빌키가 등록된 시각`** UNIX timestamp

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

**`빌키가 업데이트된 시각`** UNIX timestamp
{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="400: Bad Request 검색 파라미터가 유효하지 않은 경우" %}

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

{% endtab %}

{% tab title="401: Unauthorized 인증 Token이 전달되지 않았거나 유효하지 않은 경우" %}

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

{% endtab %}
{% endtabs %}

<details>

<summary>Response Model Schema</summary>

```json
{
  "code": 0,
  "message": "string",
  "response": [
    {
      "customer_uid": "string",
      "merchant_uid": "string",
      "imp_uid": "string",
      "schedule_at": "0",
      "executed_at": "0",
      "revoked_at": "0",
      "amount": 0,
      "name": "string",
      "buyer_name": "string",
      "buyer_email": "string",
      "buyer_tel": "string",
      "buyer_addr": "string",
      "buyer_postcode": "string",
      "custom_data": "string",
      "schedule_status": "scheduled",
      "payment_status": "paid",
      "fail_reason": "string"
    }
  ]
}
```

</details>

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

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