# Get scheduled payments API

### Gets scheduled payments by billing key.

## Gets scheduled payments by billing key.

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

Returns scheduled payments using pagination (up to 3 months period).

#### Path Parameters

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

#### Query Parameters

| Name                                   | Type    | Description                                                                                                                                                                 |
| -------------------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| page                                   | integer | <p><strong>Search result paging</strong></p><p>Starts at 1 (default: 1)</p>                                                                                                 |
| from<mark style="color:red;">\*</mark> | integer | <p><mark style="color:red;"><strong>Search start time</strong></mark> </p><p>UNIX timestamp</p>                                                                             |
| to<mark style="color:red;">\*</mark>   | integer | <p><mark style="color:red;"><strong>Search end time</strong></mark></p><p>UNIX timestamp</p>                                                                                |
| schedule-status                        | String  | <p><strong>Schedule status</strong> </p><p>If not specified, returns for all status</p><p><code>scheduled</code></p><p><code>executed</code></p><p><code>revoked</code></p> |

{% tabs %}
{% tab title="400: Bad Request Invalid parameter value" %}

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

{% endtab %}

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

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

{% endtab %}

{% 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 %}
{% 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 %}
