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

# Get Invoice

> Transact Bridge provides full billing management for both one-time and subscription-based invoices.
For the one-time payments, invoices are generated for the paid transactions. For the subscription-based flow, invoices get created on a pre-defined frequency in the DRAFT status. We send a webhook once the invoice is created in DRAFT status and then the partner approves the invoice using Approve Invoice API which converts that invoice to DUE status.

Invoices are created automatically once the payment is successful for prepaid subscriptions and one-time payments. Created invoices can be fetched using this API. Invoices that are in DRAFT status can also be fetched and can be updated before approving the invoice.



## OpenAPI

````yaml /api-reference/invoices/invoice.json post /invoice/v1.0/getInvoice
openapi: 3.0.3
info:
  title: Invoice API
  description: API's to get invoice information.
  version: 1.0.0
servers:
  - url: https://sandbox-api.transactbridge.com
    description: Sandbox Environment
  - url: https://api.transactbridge.com
    description: Production Environment
security:
  - ApiKeyAuth: []
    SignatureAuth: []
paths:
  /invoice/v1.0/getInvoice:
    post:
      tags:
        - Invoice
      summary: Get Invoice
      description: >-
        Transact Bridge provides full billing management for both one-time and
        subscription-based invoices.

        For the one-time payments, invoices are generated for the paid
        transactions. For the subscription-based flow, invoices get created on a
        pre-defined frequency in the DRAFT status. We send a webhook once the
        invoice is created in DRAFT status and then the partner approves the
        invoice using Approve Invoice API which converts that invoice to DUE
        status.


        Invoices are created automatically once the payment is successful for
        prepaid subscriptions and one-time payments. Created invoices can be
        fetched using this API. Invoices that are in DRAFT status can also be
        fetched and can be updated before approving the invoice.
      operationId: getInvoice
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                invoiceId:
                  type: string
                  description: ' invoiceId'
                billingSessionId:
                  type: string
                  description: ' Session ID for which invoice has been completely paid.'
              anyOf:
                - required:
                    - invoiceId
                - required:
                    - billingSessionId
      responses:
        '200':
          description: Payment session details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getInvoice'
components:
  schemas:
    getInvoice:
      type: object
      properties:
        status:
          type: string
          description: The response from the API
        sub_status:
          type: string
          description: Used for internal purposes only
        data:
          type: object
          description: Invoice data
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Merchant API Key
    SignatureAuth:
      type: apiKey
      in: header
      name: x-signature
      description: Generated request signature

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.