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

# Get Invoice

> Get Invoice



## OpenAPI

````yaml openapi/v1-en.yaml GET /api/v1/invoices/{invoice_id}
openapi: 3.0.3
info:
  title: Subotiz API
  description: Subotiz OpenAPI
  version: 1.0.0
servers:
  - url: https://{api}.subotiz.com
    variables:
      api:
        default: api
security:
  - sec0: []
tags:
  - name: Subscription
    description: Subscription
  - name: Price
    description: Price
  - name: Trade
    description: Trade
  - name: Payment
    description: Payment
  - name: Checkout Session
    description: Checkout Session
  - name: Customer
    description: Customer
  - name: Customer Portal
    description: Customer Portal
paths:
  /api/v1/invoices/{invoice_id}:
    get:
      tags:
        - Invoice
      summary: Get Invoice
      description: Get Invoice
      operationId: v1-invoice-get-invoice
      parameters:
        - name: invoice_id
          in: path
          description: Invoice ID
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/HeaderRequestID'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetInvoiceResponse'
components:
  parameters:
    HeaderRequestID:
      name: Request-Id
      in: header
      description: The unique identifier of the request
      required: true
      schema:
        type: string
        default: 008e3967-a1b5-48bb-be14-d5bff5092e61
  schemas:
    GetInvoiceResponse:
      type: object
      properties:
        code:
          type: string
          description: error code
        message:
          type: string
          description: error message
        data:
          $ref: '#/components/schemas/GetInvoiceResponse_Data'
    GetInvoiceResponse_Data:
      type: object
      properties:
        invoice_id:
          type: string
          description: Invoice ID
        merchant_id:
          type: string
          description: Merchant ID
        trade_id:
          type: string
          description: Trade ID
        subscription_id:
          type: string
          description: Subscription ID
        price_id:
          type: string
          description: Pricing plan ID
        customer_id:
          type: string
          description: Subotiz platform `customer_id`
        order_id:
          type: string
          description: Third-party order number
        original_invoice_id:
          type: string
          description: >-
            Original invoice ID, used for refund invoices to reference the
            original invoice
        refund_order_id:
          type: string
          description: Associated refund order ID
        amount:
          type: string
          description: Payment amount, truncated to two decimal places
        currency:
          type: string
          description: Currency
        biz_status:
          type: string
          description: |-
            Invoice status:
            - open: Initialized
            - pending: Processing
            - retrying: Retrying
            - success: Payment succeeded
            - failed: Payment failed
            - refunded: Fully refunded
            - partially_refunded: Partially refunded
        invoice_type:
          type: string
          description: |-
            Invoice type:
            - initial: Initial payment
            - trial: Trial period
            - renewal: Subscription renewal
            - refund: Refund
        paid_at:
          type: string
          description: Payment success time
        cycle_index:
          type: integer
          description: Current cycle index of the subscription
          format: int32
        created_at:
          type: string
          description: Creation time
        metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            A set of key-value pairs that can be attached to an object, allowing
            you to store additional information in a structured format.
        Discounts:
          allOf:
            - $ref: '#/components/schemas/Discounts'
          description: >-
            Discounts applied to the invoice, including all discount information
            for this invoice
        price_version_id:
          type: string
          description: Pricing plan version ID
        tax_amount:
          type: string
          description: Tax amount
    Discounts:
      type: object
      properties:
        current_period:
          type: array
          items:
            $ref: '#/components/schemas/CurrentPeriodDiscount'
          description: The current period's discount details
      description: Trade order discount information
    CurrentPeriodDiscount:
      type: object
      properties:
        discount_id:
          type: string
          description: The unique identifier for the discount
        discount_amount:
          type: string
          description: The amount discounted
        discount_code:
          type: string
          description: The discount code used
      description: Details for a discount applied in the current period
  securitySchemes:
    sec0:
      type: http
      description: >-
        Bearer API Key authentication. Format: Authorization: Bearer
        {your_api_key}
      scheme: bearer

````