---
title: 주문 단건 조회
description: GET /v1/invoices/{id} 로 주문 하나의 상세 정보를 조회해요.
sidebar:
  order: 3
  badge: GET
---

```http
GET /v1/invoices/{id}
```

주문 ID로 주문 하나를 조회해요. 결제 여부는 `paid`로 확인해요. 결제 완료를 바로 알아야 한다면 폴링보다 [`invoice.paid`](/api-reference/webhooks/invoice-paid) 웹훅을 쓰세요.

## 경로 파라미터

| 파라미터 | 타입 | 설명 |
| --- | --- | --- |
| `id` | string | 조회할 주문 ID예요. `ivc_`로 시작해요. |

## 요청 예시

```bash cURL
curl https://api.paysync.kr/v1/invoices/ivc_a1b2c3d4e5f6g7h8i9j0k1l2 \
  -H "Authorization: Bearer $PAYSYNC_API_KEY"
```

```js Node.js
const res = await fetch(`https://api.paysync.kr/v1/invoices/${invoiceId}`, {
  headers: { Authorization: `Bearer ${process.env.PAYSYNC_API_KEY}` },
});
const { code, data } = await res.json();
```

```python Python
import os
import requests

res = requests.get(
    f"https://api.paysync.kr/v1/invoices/{invoice_id}",
    headers={"Authorization": f"Bearer {os.environ['PAYSYNC_API_KEY']}"},
)
print(res.json())
```

## 응답

```json 200 OK
{
  "code": "OK",
  "data": {
    "id": "ivc_a1b2c3d4e5f6g7h8i9j0k1l2",
    "issuerId": "acc_x9y8z7w6v5u4t3s2r1q0p9o8",
    "bankAccountIds": [],
    "customer": {
      "name": "홍길동",
      "email": "hong@example.com",
      "phoneNumber": "01012345678"
    },
    "cashReceipt": null,
    "amount": 50000,
    "paid": true,
    "metadata": { "orderId": "ORDER-2026-0001" },
    "issuedAt": "2026-04-28T03:14:15.926Z",
    "expiresAt": "2026-04-29T03:14:15.926Z",
    "deletedAt": null
  }
}
```

### 주문 객체

| 필드 | 타입 | 설명 |
| --- | --- | --- |
| `id` | string | 주문 ID예요. `ivc_`로 시작해요. |
| `issuerId` | string | 주문을 만든 페이싱크 계정 ID예요. |
| `bankAccountIds` | string[] | 입금받을 계좌 ID 목록이에요. 빈 배열이면 모든 계좌로 받아요. |
| `customer.name` | string | 입금자명이에요. |
| `customer.email` | string \| null | 구매자 이메일이에요. |
| `customer.phoneNumber` | string \| null | 구매자 전화번호예요. |
| `cashReceipt` | object \| null | 결제 완료 때 발급할 현금영수증 정보예요. `type`과 `identifier`를 담아요. |
| `amount` | integer | 금액(원)이에요. |
| `paid` | boolean | 결제 완료 여부예요. |
| `metadata` | object \| null | 주문을 만들 때 넣은 키와 값이에요. |
| `issuedAt` | string | 주문을 만든 시각이에요. |
| `expiresAt` | string \| null | 만료 시각이에요. 만료 기간 없이 만들었으면 `null`이에요. |
| `deletedAt` | null | 조회할 수 있는 주문에서는 `null`이에요. |

만료된 주문도 `paid: false`로 조회돼요. 만료 여부는 `expiresAt`과 현재 시각을 비교해서 판단하세요.

## 오류

| HTTP | `code` | 발생 조건 |
| --- | --- | --- |
| 401 | `NOT_AUTHORIZED` | API 키가 없거나 올바르지 않아요. |
| 403 | `INSUFFICIENT_PERMISSIONS` | 다른 계정의 주문이거나, [API 키의 접근 가능한 계좌](/api-reference#api-키-계좌-제한) 밖의 주문이에요. |
| 404 | `INVOICE_NOT_FOUND` | 주문이 없거나 삭제됐어요. |
