결제 이력 목록 조회
GET/crm-core/v1/plans/me/billing-logs
계정의 결제·환불 이력을 최신 순으로 조회한다. 사용자에게는 실제 결제·환불이 발생한 건만 노출되며(status: 'COMPLETED'이고 totalCharge > 0 또는 chargeAmount > 0 또는 refundAmount > 0), 예약만 기록된 로그(DOWNGRADE_SCHEDULED 등)나 실패 로그(PAYMENT_FAILED)는 제외된다. 최근 12개월 이내의 이력만 조회 가능하며, 그 이상은 관리자에게 문의해야 한다.
Query Params
| Name | Type | Required | Description |
|---|---|---|---|
| limit | number | 페이지당 항목 수. 기본 20, 최대 200 | |
| offset | number | 시작 오프셋. 기본 0 | |
| action | string | 특정 액션으로 필터 (UPGRADE / RENEWAL / ADMIN_REFUND / SEAT_DELTA_CHARGE / ENTERPRISE_MANUAL_CHARGE) |
Response
| Name | Type | Required | Description |
|---|---|---|---|
| items | Array | 결제 이력 항목 배열 | |
| items[].subscriptionBillingLogId | string | 로그 ID | |
| items[].action | string | 액션 유형 | |
| items[].fromTier | string | 변경 전 티어 | |
| items[].toTier | string | 변경 후 티어 | |
| items[].actionDate | date | 결제 실행 시각 | |
| items[].seatCount | number | 결제 대상 좌석 수 | |
| items[].unitPrice | number | 1인 단가 (KRW, VAT 포함) | |
| items[].subtotal | number | 공급가액 | |
| items[].taxAmount | number | 부가세 | |
| items[].totalCharge | number | 실제 결제 금액 | |
| items[].refundAmount | number | 환불 금액 (해당 시) | |
| items[].transactionId | string | PG 거래 식별자 | |
| items[].paymentMethodBrand | string | 카드 브랜드 스냅샷 | |
| items[].paymentMethodLast4 | string | 카드 끝 4자리 스냅샷 | |
| items[].status | string | COMPLETED | |
| items[].description | string | 영수증용 요약 | |
| total | number | 전체 건수 (필터 반영) | |
| limit | number | 적용된 limit | |
| offset | number | * | 적용된 offset |
Structure
코드 예제
const params = new URLSearchParams({ limit: '20', offset: '0' });
const response = await fetch(
https://api.solapi.com/crm-core/v1/plans/me/billing-logs?${params},
{ headers: { 'Authorization': 'Bearer ' + TOKEN } }
);
const { items, total } = await response.json();
import requests
response = requests.get(
'https://api.solapi.com/crm-core/v1/plans/me/billing-logs',
params={'limit': 50, 'action': 'RENEWAL'},
headers={'Authorization': f'Bearer {TOKEN}'}
)
data = response.json()
curl -X GET 'https://api.solapi.com/crm-core/v1/plans/me/billing-logs?limit=20' \
-H 'Authorization: Bearer YOUR_TOKEN'
**12개월 제한**은 서버에서 강제되므로 `actionDate >= now - 12months` 조건이 자동 적용된다. 세금 신고 등으로 그 이상의 이력이 필요하면 `GET /plans/me/billing-history/export`로 CSV 내보내기를 사용하거나 관리자에게 문의할 것.
사용자에게 **보이지 않는 로그 종류**: `DOWNGRADE_SCHEDULED`, `CANCEL_SCHEDULED`(금액 0원), `PAYMENT_FAILED`(실패 로그), `ADMIN_SEAT_ADJUST`(관리자 수동 조정), `GRANT_TRIAL` 등. 관리자는 `GET /crm-core/v1/admin/plans/billing-logs`에서 전체 이력을 조회할 수 있다.
`limit`은 1~200 사이의 정수여야 하며 범위를 벗어나면 `400 BadRequest`가 반환된다. `offset`은 0 이상. 페이지네이션은 `total` 필드로 끝까지 페이지했는지 판단할 수 있다.