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

# Get Invoice

> Get detailed information about a specific invoice



## OpenAPI

````yaml GET /subscription/invoice/{id}
openapi: 3.1.0
info:
  title: Clink API
  description: >-
    Official API documentation for Clink's payment processing platform. This API
    enables merchants to create and manage payment sessions, handle
    subscriptions, and process transactions.
  version: 1.0.0
servers:
  - url: https://uat-api.clinkbill.com/api/
security:
  - ApiKeyAuth: []
paths:
  /subscription/invoice/{id}:
    get:
      description: Get detailed information about a specific invoice
      operationId: retrieveInvoice
      parameters:
        - $ref: '#/components/parameters/TimestampHeader'
        - name: id
          in: path
          description: Unique identifier of the invoice
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Invoice details retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceGetRes'
            '*/*':
              schema:
                $ref: '#/components/schemas/InvoiceApiResponse'
        '401':
          description: Unauthorized
          content:
            '*/*':
              schema:
                type: string
components:
  parameters:
    TimestampHeader:
      name: X-Timestamp
      in: header
      required: true
      description: >-
        Current timestamp in milliseconds since Unix epoch (required for request
        signing)
      schema:
        type: string
        example: '1783513683000'
  schemas:
    InvoiceGetRes:
      type: object
      properties:
        code:
          type: integer
          description: Response status code, 200 when success
          format: int32
          example: 200
        msg:
          type: string
          example: success
          description: Brief description of what happened, 'success' when happy case
        data:
          $ref: '#/components/schemas/InvoiceApiVo'
    InvoiceApiResponse:
      type: object
      properties:
        code:
          type: integer
          format: int32
        msg:
          type: string
        data:
          $ref: '#/components/schemas/InvoiceApiData'
    InvoiceApiVo:
      type: object
      description: Comprehensive invoice data object with subscription billing details
      properties:
        invoiceId:
          type: string
          description: Unique identifier for the invoice
        subscriptionId:
          type: string
          description: Unique identifier for the associated subscription
        orderId:
          type: string
          description: Unique identifier for the related order
        customerId:
          type: string
          description: Unique identifier for the customer
        merchantId:
          type: string
          description: Unique identifier for the merchant
        status:
          type: string
          description: >-
            Invoice status: 'open' (initialized), 'paid' (payment successful),
            'void' (canceled without successul payment)
          enum:
            - open
            - paid
            - void
        createTime:
          type: integer
          example: 1754819712625
          description: Unix timestamp when the invoice was created
          format: int64
        currentPeriodStart:
          type: integer
          example: 1754819706689
          description: Unix timestamp for the start of the billing period
          format: int64
        currentPeriodEnd:
          type: integer
          example: 1755078906689
          description: Unix timestamp for the end of the billing period
          format: int64
        originalAmount:
          type: number
          example: 9.99
          description: Original total amount of the invoice
        originalCurrency:
          type: string
          example: USD
          description: Currency used for invoice payment
        billing:
          type: string
          enum:
            - charge_automatically
            - send_invoice
          description: 'Billing method: ''charge_automatically'' or ''send_invoice'''
        items:
          type: array
          description: Detailed list of line items in the invoice
          items:
            $ref: '#/components/schemas/InvoiceItem'
    InvoiceApiData:
      type: object
      properties:
        invoiceId:
          type: string
        subscriptionId:
          type: string
        merchantReference:
          type: string
        orderId:
          type: string
        customerId:
          type: string
        merchantId:
          type: string
        status:
          type: string
        createTime:
          type: integer
          format: int64
        currentPeriodStart:
          type: integer
          format: int64
        currentPeriodEnd:
          type: integer
          format: int64
        originalAmount:
          type: number
        paymentAmount:
          type: number
        originalCurrency:
          type: string
        billing:
          type: string
        items:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceItemVo'
        discount:
          $ref: '#/components/schemas/DiscountObjectVo'
        metadata:
          type: object
          additionalProperties:
            type: string
    InvoiceItem:
      type: object
      description: Individual line item within an invoice
      properties:
        invoiceItemId:
          type: string
          description: Unique identifier for the invoice line item
        amount:
          type: number
          example: 9.99
          description: Total amount for this line item
        currency:
          type: string
          description: ISO currency code for this line item
          enum:
            - USD
            - EUR
            - JPY
            - GBP
            - AUD
            - CAD
            - CNY
            - HKD
            - SGD
            - KRW
            - AED
            - THB
            - IDR
            - PHP
            - MYR
            - BRL
            - INR
        description:
          type: string
          description: Human-readable description of the line item
        periodStart:
          type: integer
          example: 1754819706689
          description: Unix timestamp for the start of the period covered by this item
          format: int64
        periodEnd:
          type: integer
          example: 1755078906689
          description: Unix timestamp for the end of the period covered by this item
          format: int64
        proration:
          type: boolean
          description: Whether this item represents a prorated amount
        price:
          $ref: '#/components/schemas/InvoiceItemPrice'
    InvoiceItemVo:
      type: object
      properties:
        invoiceItemId:
          type: string
        amount:
          type: number
        discountAmount:
          type: number
        paymentAmount:
          type: number
        couponTerms:
          type: string
        promotionCode:
          type: string
        currency:
          type: string
          enum:
            - USD
            - EUR
            - JPY
            - GBP
            - AUD
            - CAD
            - CNY
            - HKD
            - SGD
            - KRW
            - AED
            - THB
            - IDR
            - PHP
            - MYR
            - BRL
            - INR
        periodStart:
          type: integer
          format: int64
        periodEnd:
          type: integer
          format: int64
        proration:
          type: boolean
        price:
          $ref: '#/components/schemas/PriceVo'
    DiscountObjectVo:
      type: object
      properties:
        couponId:
          type: string
        couponName:
          type: string
        couponTerms:
          type: string
        promotionCode:
          type: string
        discountAmount:
          type: number
    InvoiceItemPrice:
      type: object
      description: Price information for an invoice line item
      properties:
        productId:
          type: string
          description: Unique identifier for the product
        productName:
          type: string
          description: Display name of the product
        priceId:
          type: string
          description: Unique identifier for the price configuration
        priceSnapshotId:
          type: string
          description: Identifier for the immutable price snapshot at time of invoicing
        unitAmount:
          type: number
          example: 9.99
          description: Per-unit price amount
        quantity:
          type: integer
          example: 1
          description: Number of units included in this line item
          format: int32
        recurring:
          $ref: '#/components/schemas/Recurring'
    PriceVo:
      type: object
      properties:
        productId:
          type: string
        productName:
          type: string
        priceId:
          type: string
        priceSnapshotId:
          type: string
        unitAmount:
          type: number
        quantity:
          type: integer
          format: int32
        recurring:
          $ref: '#/components/schemas/Recurring'
    Recurring:
      required:
        - interval
        - pricingModel
        - tiersMode
      type: object
      properties:
        interval:
          type: string
          enum:
            - week
            - month
            - year
            - day
            - quarter
            - half_year
            - custom
          description: >-
            Frequency of recurring charges. `quarter` bills every 3 months,
            `half_year` bills every 6 months, and `custom` uses interval count
            to define the cycle.
        trialPeriodDays:
          type: integer
          description: Number of days in the trial period
          format: int32
        pricingModel:
          type: string
          enum:
            - flat_rate
            - per_seat
          description: >-
            Billing model (flat_rate, per_seat, with tiered and usage_based
            models coming soon)
        tiersMode:
          type: string
          enum:
            - volume
            - graduated
          description: >-
            Coming soon. Tiered pricing mode, can be volume (quantity-based) or
            graduated (incremental tiers)
        intervalCount:
          type: integer
          description: >-
            Number of interval units per billing cycle. For custom intervals,
            this value represents the number of days.
          format: int32
      description: Recurring billing configuration information
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: >-
        Your secret API key obtained from the Clink dashboard (Developers
        section)

````