---
title: "Preview paying a PAYMENT_FAILED subscription again with its attached card (no DB write)"
method: GET
path: "/v1/subscriptions/{subscription_id}/payment-retry"
tags: ["Billing Subscriptions"]
---

# Preview paying a PAYMENT_FAILED subscription again with its attached card (no DB write)

`GET /v1/subscriptions/{subscription_id}/payment-retry`

## 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}/payment-retry`
- 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`)

「다시 결제」 단추를 그릴지 · 청구 금액 · 붙은 카드. 구독 조회와 같은 권한이다(자기 조직의 구독만 - 다른 조직은 404).

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

- `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 입니다.

## Response `200`

Successful Response

- SubscriptionPaymentRetryPreviewResponse: 읽기 응답 - 「다시 결제」 단추를 그릴지와 그 화면에 보일 값.
  - `subscription_id` integer, required
  - `organization_id` integer, required
  - `available` boolean, required: 지금 POST 를 보내면 열리는가. 붙은 카드가 청구할 수 있는 카드일 때까지 포함한다.
  - `reason` 'NOT_PAYMENT_FAILED' | 'NO_OPEN_INVOICE' | 'MULTIPLE_OPEN_INVOICES' | 'PAYMENT_IN_PROGRESS' | 'NO_PAYMENT_METHOD' | 'PAYMENT_METHOD_NOT_CHARGEABLE', nullable: available 이 false 일 때만. 구조 사유(앞 넷)가 카드 사유(뒤 둘)보다 먼저 판정된다 - NO_PAYMENT_METHOD · PAYMENT_METHOD_NOT_CHARGEABLE 만 카드를 붙이면 풀린다.
  - `invoice` PaymentRetryInvoice: 다시 결제로 청구될 미결제 청구서.
    - `invoice_id` integer, required
    - `amount_minor` integer, required: 청구 금액. KRW 는 원 단위 정수다.
    - `currency` 'KRW', required: 통화. v1 은 KRW 하나.
  - `payment_method` PaymentRetryPaymentMethod: 구독에 지금 붙은 결제수단 - 화면에 보일 것만 싣는다(제공자 이름 · 빌키 등 내부 값은 싣지 않는다).
    - `payment_method_id` integer, required
    - `label` string, nullable: 사용자 표시 라벨.
    - `last4` string, nullable: 마스킹 마지막 자리.
    - `issuer_name` string, nullable: 발급사 명칭.

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