---
title: "Preview hybrid subscribe invoice (no DB write)"
method: POST
path: "/v1/subscriptions/quote"
tags: ["Billing Subscriptions"]
---

# Preview hybrid subscribe invoice (no DB write)

`POST /v1/subscriptions/quote`

## Request

- Base URL: `https://api.xdata.kr` (the document declares no server; this is the origin it was published from)
- URL: `https://api.xdata.kr/v1/subscriptions/quote`
- Auth: one of:
  - HTTP basic
  - OAuth 2 (authorization code, authorization URL `https://api.xdata.kr/oauth/authorize`, token URL `https://api.xdata.kr/oauth/token`)

Validate bundle and return invoice line preview without issuance.

## Query parameters

- `env_scope` 'production' | 'real_test' | 'sandbox', nullable: 환경을 고릅니다. 값은 production · real_test · sandbox 중 하나입니다. 경로 접두(/v1/sandbox/... · /v1/test/... · /v1/production/...) · X-Env-Scope 헤더 · env_scope 쿼리 가운데 한 통로로 반드시 보내야 합니다. 빼면 자동으로 채우지 않고 거절하며, 두 통로에 서로 다른 값을 담아도 거절합니다. 거절은 HTTP 422 이고 오류 코드는 VALIDATION_ENV_SCOPE_MISMATCH 입니다.

## Headers

- `Authorization` string, nullable
- `X-Env-Scope` 'production' | 'real_test' | 'sandbox', nullable: 환경을 고릅니다. 값은 production · real_test · sandbox 중 하나입니다. 경로 접두(/v1/sandbox/... · /v1/test/... · /v1/production/...) · X-Env-Scope 헤더 · env_scope 쿼리 가운데 한 통로로 반드시 보내야 합니다. 빼면 자동으로 채우지 않고 거절하며, 두 통로에 서로 다른 값을 담아도 거절합니다. 거절은 HTTP 422 이고 오류 코드는 VALIDATION_ENV_SCOPE_MISMATCH 입니다.

## Request body

- SubscriptionQuoteRequest: Hybrid subscribe quote preview. No DB write; no Idempotency-Key.
  - `organization_id` integer, required
  - `plan_id` integer, required
  - `addon_product_ids` integer[], nullable

## Response `200`

Successful Response

- SubscriptionQuoteResponse: Quote preview envelope (no invoice/payment ids). New-subscribe ``POST /quote`` leaves mid-life-only fields unset. Mid-life ``POST .../addons/preview`` sets ``subscription_id``, ``full_charge=True``, and ``next_billing_at`` (period unchanged).
  - `organization_id` integer, required
  - `plan_id` integer, required
  - `env_scope` 'sandbox' | 'real_test' | 'production', required
  - `subtotal_amount_minor` integer, required
  - `tax_amount_minor` integer, required
  - `total_amount_minor` integer, required
  - `currency` string, required
  - `line_items` SubscriptionQuoteLineItem[], required
    - `description` string, required
    - `quantity` integer, required
    - `unit_amount_minor` integer, required
    - `amount_minor` integer, required
    - `currency` string, required
    - `item_kind` string, required
    - `plan_id` integer, nullable
    - `product_id` integer, nullable
  - `subscription_id` integer, nullable: Set for mid-life add-on preview only.
  - `full_charge` boolean, nullable: True for mid-life preview: no proration; immediate full charge.
  - `next_billing_at` string, date-time, nullable: Echo of subscription.next_billing_at (unchanged by mid-life charge).

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/xdata/apis/xboss-api.md) · [All operations](https://skmtc.dev/xdata/apis/xboss-api/llms.txt) · [OpenAPI document](https://skmtc.dev/xdata/apis/xboss-api/revisions/816de78950db?raw)
