> ## Documentation Index
> Fetch the complete documentation index at: https://telnesstech-a0a16404.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Mark invoice as paid

> Mark an invoice as paid when you manage your own payment processing.

Use this when you handle payment collection while Telness manages invoice generation and taxation. Only available for invoices in `SENT` or `OVERDUE` status. Triggers subscription renewals and prevents service cancellation.




## OpenAPI

````yaml /api-reference/bundled_openapi.json post /invoices/{invoiceId}/mark-paid
openapi: 3.1.0
info:
  title: Telness Tech Connect
  version: 2.0.0-alpha
  description: >
    Telness Tech Connect API provides all you need to own your user's
    connectivity experience.


    Go back to [Telnesstech.com](https://telnesstech.com)
servers:
  - url: https://apiv2.example.com
    description: Connect API URL for your domain
security:
  - apiKey: []
  - bearerAuth: []
    apiKey: []
tags:
  - name: Auth
    description: Authenticate users and obtain access tokens.
  - name: Users
    description: Manage users.
  - name: Customers
    description: Manage customers.
  - name: Subscriptions
    description: Manage subscriptions and subscription.
  - name: Subscription Addons
    description: Manage subscription addons.
  - name: Subscription Usage
    description: Get subscription usage.
  - name: Subscribers
    description: Manage subscribers.
  - name: Licenses
    description: Manage licenses.
  - name: Product Offerings
    description: Browse product offerings.
  - name: Product Catalogs
    description: Browse product catalogs.
  - name: Product Discounts
    description: Discounts and promotions.
  - name: Orders
    description: Manage orders and line items.
  - name: Payment Intents
    description: >-
      Inspect payment intents, the money collected over card rails for orders
      and renewals.
  - name: Payment Links
    description: Create and manage payment links for orders and invoices.
  - name: Payment Sessions
    description: Create and manage payment sessions for orders.
  - name: Payment Profiles
    description: Manage customer payment profiles and methods.
  - name: Payment Profile Sessions
    description: Create sessions for setting up payment profiles.
  - name: Signing sessions
    description: Handle contract signing sessions for postpaid orders.
  - name: Porting
    description: Manage number porting for subscriptions.
  - name: Taxes
    description: Calculate taxes for products and line items.
  - name: Invoices
    description: Manage invoices and invoice items.
  - name: Tools
    description: >-
      Tools for address validation, number porting, device info, and network
      coverage.
  - name: Inventory
    description: Manage phone number inventory, SIM cards, and reservations.
  - name: Workflows
    description: Dynamic processing of customer journeys and events.
paths:
  /invoices/{invoiceId}/mark-paid:
    post:
      tags:
        - Invoices
      summary: Mark invoice as paid
      description: >
        Mark an invoice as paid when you manage your own payment processing.


        Use this when you handle payment collection while Telness manages
        invoice generation and taxation. Only available for invoices in `SENT`
        or `OVERDUE` status. Triggers subscription renewals and prevents service
        cancellation.
      operationId: markInvoiceAsPaid
      parameters:
        - in: path
          name: invoiceId
          required: true
          schema:
            type: string
          description: The unique identifier of the invoice to mark as paid.
          example: 123e4567-e89b-12d3-a456-426614174000
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MarkInvoiceAsPaidRequest'
      responses:
        '200':
          description: Invoice successfully marked as paid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    IdempotencyKey:
      in: header
      name: X-Idempotency-Key
      required: false
      description: >
        A unique key to ensure idempotency of requests. If a request with the
        same key has already been processed, the same result will be returned.

        The key must be unique for each distinct operation. Keys are expired
        after 24 hours, but we recommend using a new key for each request.


        Modified requests with the same idempotency keys are rejected with a
        `409 Conflict` status code.
      schema:
        type: string
        maxLength: 256
  schemas:
    MarkInvoiceAsPaidRequest:
      type: object
      description: >-
        Request to mark an invoice as paid when you manage your own payment
        processing.
      additionalProperties: false
      properties:
        paidAt:
          type: string
          format: date-time
          description: >-
            When the payment was received. If not provided, uses the current
            timestamp.
          example: '2024-02-10T14:30:00Z'
        metadata:
          $ref: '#/components/schemas/Metadata'
          description: Metadata to attach to the invoice.
    Invoice:
      type: object
      description: >-
        An invoice with detailed line item breakdown that can be sent to
        customers for payment.
      required:
        - invoiceId
        - customerId
        - status
        - lineItems
        - invoiceNumber
        - dueDate
        - createdAt
        - updatedAt
      additionalProperties: false
      properties:
        invoiceId:
          type: string
          description: Unique identifier for the invoice.
          example: 123e4567-e89b-12d3-a456-426614174000
        customerId:
          type: string
          description: The customer this invoice is for.
          example: 456789ab-cdef-0123-4567-89abcdef0123
        invoiceNumber:
          type: string
          description: Human-readable invoice number.
          example: INV-2024-001
        status:
          $ref: '#/components/schemas/InvoiceStatus'
          description: Current status of the invoice.
          example: SENT
        dueDate:
          type: string
          format: date
          x-ogen-type: telnesstech.com/apiv2/apiv2types.Date
          description: When payment is due.
          example: '2024-02-15'
        lineItems:
          type: array
          description: Detailed breakdown of items included in this invoice.
          items:
            $ref: '#/components/schemas/InvoiceLineItem'
        subtotalAmount:
          type: number
          format: decimal
          description: Subtotal amount before taxes and fees.
          example: 29.99
        taxAmount:
          type: number
          format: decimal
          description: Total tax amount for the invoice.
          example: 2.4
        feeAmount:
          type: number
          format: decimal
          description: Total fee amount for the invoice.
          example: 2.5
        discountAmount:
          type: number
          format: decimal
          description: Total discount amount for the invoice.
          example: 5
        totalAmount:
          type: number
          format: decimal
          description: Total amount due for the invoice.
          example: 29.89
        currency:
          type: string
          description: Invoice currency.
          example: USD
        sentAt:
          type: string
          format: date-time
          description: >-
            When the invoice was sent to the customer (if status is sent or
            later).
          example: '2024-01-15T10:00:00Z'
        paidAt:
          type: string
          format: date-time
          description: When the invoice was paid (if status is paid).
          example: '2024-02-10T14:30:00Z'
        voidedAt:
          type: string
          format: date-time
          description: When the invoice was voided (if status is void).
          example: '2024-02-05T09:00:00Z'
        invoiceUrl:
          type: string
          format: uri
          description: Hosted URL where customer can view the invoice.
          example: https://invoices.yourapp.com/inv_123e4567
        createdAt:
          type: string
          format: date-time
          description: When the invoice was created.
          example: '2024-01-15T10:00:00Z'
        updatedAt:
          type: string
          format: date-time
          description: When the invoice was last updated.
          example: '2024-01-15T10:00:00Z'
        metadata:
          $ref: '#/components/schemas/Metadata'
    Metadata:
      type: object
      additionalProperties:
        type: string
      description: >
        A set of key-value pairs that can be attached to an object for storing
        additional information in a semi-structured format.
    InvoiceStatus:
      type: string
      description: Current status of the invoice lifecycle.
      enum:
        - DRAFT
        - SENT
        - PAID
        - VOID
        - OVERDUE
    InvoiceLineItem:
      type: object
      description: >-
        Individual line item within an invoice, showing detailed pricing
        breakdown.
      required:
        - description
        - subtotal
        - total
      additionalProperties: false
      properties:
        description:
          type: string
          description: Description of what this line item represents.
          example: Mobile subscription - Premium Plan
        subscriptionId:
          type: string
          description: >-
            ID of the subscription this line item is associated with, if
            applicable.
          example: b8174435-6378-4be5-a9f5-8b4aaadae5d4
        licenseId:
          type: string
          description: ID of the license this line item is associated with, if applicable.
          example: ffb19d4f-b3b6-4f2b-9365-dd80bdcf0a77
        productOfferingId:
          type: string
          description: >-
            ID of the product offering this line item is associated with, if
            applicable.
          example: mobile-plan-premium
        quantity:
          type: integer
          description: Quantity of items for this line item.
          minimum: 1
          example: 1
        unitPrice:
          type: number
          format: decimal
          description: Price per unit before taxes and fees.
          example: 29.99
        subtotal:
          type: number
          format: decimal
          description: Line item subtotal (quantity x unitPrice).
          example: 29.99
        total:
          type: number
          format: decimal
          description: Line item total after taxes, fees, and discounts.
          example: 39.74
        taxBreakdown:
          type: array
          description: Tax breakdown for this line item.
          items:
            $ref: '#/components/schemas/TaxLineItem'
        taxAmount:
          type: number
          format: decimal
          description: Total taxes for this line item.
          example: 2.4
        taxIncluded:
          type: boolean
          description: Whether taxes are included in the total.
          example: false
        fees:
          type: array
          description: Detailed fee breakdown for this line item.
          items:
            type: object
            required:
              - name
              - amount
            additionalProperties: false
            properties:
              name:
                type: string
                description: Fee name or description.
                example: Late payment fee
              amount:
                type: number
                format: decimal
                description: Fee amount.
                example: 10
        totalFees:
          type: number
          format: decimal
          description: Total fees for this line item.
          example: 10
        discounts:
          type: array
          description: Detailed discount breakdown for this line item.
          items:
            type: object
            required:
              - name
              - amount
            additionalProperties: false
            properties:
              name:
                type: string
                description: Discount name or description.
                example: Volume discount
              amount:
                type: number
                format: decimal
                description: Discount amount (positive value).
                example: 5
        totalDiscounts:
          type: number
          format: decimal
          description: Total discounts for this line item.
          example: 5
    Error:
      type: object
      required:
        - message
        - code
      properties:
        message:
          type: string
          description: A human-readable message providing more details about the error.
        code:
          type: string
          description: A machine-readable code for the error.
        details:
          type: array
          description: Additional details about the error.
          items:
            type: object
            required:
              - message
              - code
            properties:
              message:
                type: string
                description: >-
                  A human-readable message providing more details about the
                  error.
              code:
                type: string
                description: A machine-readable code for the specific detail.
              property:
                type: string
                description: The property or field related to the error.
              suggestion:
                $ref: '#/components/schemas/Any'
                description: >
                  A suggested value for the particular property.


                  For example, this may be set when validating an address with
                  an alias, suggesting the expected value by the operator.
        hint:
          type: string
          description: A hint to help resolve the error.
    TaxLineItem:
      type: object
      title: Product Offering
      description: >-
        Calculate taxes for a product offering with optional quantity and
        customizations.
      required:
        - type
        - productOfferingId
      additionalProperties: false
      properties:
        type:
          type: string
          enum:
            - PRODUCT_OFFERING
          description: Line item type discriminator.
        productOfferingId:
          type: string
          description: The product offering to calculate taxes for.
          example: mobile-plan-premium
    Any:
      oneOf:
        - type: string
        - type: number
        - type: boolean
        - type: object
          additionalProperties: true
        - type: array
  responses:
    BadRequest:
      description: The request was malformed or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Authentication is required to access this resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Access to this resource is forbidden.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Conflict:
      description: Conflict
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: An unexpected error occurred on the server.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >
        An API key that grants access to the Connect API. You can create and
        manage API keys in the portal.
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        Bearer authentication with JWT tokens is used to authenticate users.


        Do note that a valid API keys is also required to access the Connect API
        to prove that requests are made by a trusted party.


        Requests with a JWT token is scoped to the permissions of the user the
        token belongs to, regardless of the API key used.

````

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