> ## Documentation Index
> Fetch the complete documentation index at: https://docs.steppay.kr/llms.txt
> Use this file to discover all available pages before exploring further.

# 복구 시작 API

> 결제 복구 시나리오를 실행합니다.



## OpenAPI

````yaml /steppay_v1.json post /api/v1/cover/recovery
openapi: 3.0.1
info:
  title: STEPPAY
  version: '1.0'
  contact:
    name: Steppay
    url: https://www.steppay.kr
    email: contact@steppay.kr
servers:
  - url: https://api.steppay.kr
    description: Generated server url
security:
  - Secret-Token: []
paths:
  /api/v1/cover/recovery:
    post:
      tags:
        - 커버 API
      summary: 복구 시작 API
      description: 결제 복구 시나리오를 실행합니다.
      operationId: v1_startRecovery
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRecoveryRequest'
        required: true
      responses:
        '201':
          description: 결제 복구 시나리오가 시작됨
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CreateRecoveryResponse'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CoverErrorresponse'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CoverErrorresponse'
components:
  schemas:
    CreateRecoveryRequest:
      title: 복구 시작 데이터
      required:
        - orderId
        - subscriptionId
      type: object
      properties:
        subscriptionId:
          type: integer
          description: 구독 ID
          format: int64
        orderId:
          type: integer
          description: 주문 ID
          format: int64
        errorCode:
          type: string
          description: PG사에서 알아낸 결제 오류 코드
        errorMessage:
          type: string
          description: PG사에서 알아낸 결제 오류 메세지
      description: 복구 시작 데이터
    CreateRecoveryResponse:
      title: 복구 시작 응답
      required:
        - coverId
      type: object
      properties:
        coverId:
          type: integer
          description: 커버 ID - 다른 동작을 위해 사용됩니다.
          format: int64
        retryDate:
          type: string
          description: >-
            다음 결제 시도 시점 - 시나리오에 의해서 계산된 시점입니다. 해당 시점에 다시 결제를 시도해주세요. NULL인 경우,
            종료된 시나리오입니다.
          format: date-time
    CoverErrorresponse:
      required:
        - errorCode
      type: object
      properties:
        traceId:
          type: string
        errorCode:
          type: string
        errorMessage:
          type: string
        details:
          $ref: '#/components/schemas/ReturnError'
    ReturnError:
      type: object
  securitySchemes:
    Secret-Token:
      type: apiKey
      in: header
      name: Secret-Token

````