---
title: "Mid-life Path B add-on charge (ACTIVE subscription)"
method: POST
path: "/v1/subscriptions/{subscription_id}/addons"
tags: ["Billing Subscriptions"]
---

# Mid-life Path B add-on charge (ACTIVE subscription)

`POST /v1/subscriptions/{subscription_id}/addons`

## 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/{subscription_id}/addons`
- 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`)

Charge add-on-only invoice on ACTIVE subscription; items after SUCCEEDED.

## Path parameters

- `subscription_id` integer, required

## 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

- `Idempotency-Key` string, required
- `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

- SubscriptionAddonAddRequest: Mid-life Path B add-on purchase on an ACTIVE subscription. Does not create a subscription. Charges add-on + tax only (no plan re-bill). Path B ``subscription_items`` are inserted only after payment SUCCEEDED.
  - `organization_id` integer, required: 구독 소유 조직 PK. 주체 조직과 일치 강제.
  - `addon_product_ids` integer[], required: Purchasable add-on api_products.id list. Must match ACTIVE plan_addon_offers for the subscription plan + env_scope.
  - `metadata` object, nullable: Optional ops metadata. Reserved keys xdata_purpose / xdata_midlife_addons are owned by the service.

## Response `202`

Successful Response

- SubscriptionAddonAddResponse: 202 Accepted mid-life add-on charge snapshot (invoice + payment INITIATED).
  - `subscription_id` integer, required
  - `organization_id` integer, required
  - `plan_id` integer, required
  - `payment_method_id` integer, nullable: NULL = 결제창 인증 경로.
  - `status` 'PENDING' | 'ACTIVE' | 'PAUSED' | 'CANCELED' | 'EXPIRED' | 'PAYMENT_FAILED', required: Subscription remains ACTIVE; add-on items appear after SUCCEEDED.
  - `env_scope` 'sandbox' | 'real_test' | 'production', required
  - `invoice_id` integer, required
  - `payment_id` integer, required
  - `addon_product_ids` integer[], required

## 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)
