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

# Update an invoice



## OpenAPI

````yaml /swagger.yml put /api/v0/invoices/{id}
openapi: 3.0.0
info:
  title: Devdraft AI Payment & Business Management API
  description: >-

    A comprehensive payment processing and business management API that enables
    seamless integration of cryptocurrency and traditional payment methods.
        
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.devdraft.ai
    description: Production Server
security: []
tags: []
paths:
  /api/v0/invoices/{id}:
    put:
      tags:
        - Invoices
      summary: Update an invoice
      operationId: InvoiceController_update
      parameters:
        - name: id
          required: true
          in: path
          description: Invoice ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateInvoiceDto'
      responses:
        '200':
          description: The invoice has been successfully updated.
        '404':
          description: Invoice not found.
      security:
        - x-client-secret: []
        - x-client-key: []
components:
  schemas:
    CreateInvoiceDto:
      type: object
      properties:
        name:
          type: string
          description: Name of the invoice
        email:
          type: string
          description: Email address
        customer_id:
          type: string
          description: Customer ID
        currency:
          type: string
          description: Currency for the invoice
          enum:
            - usdc
            - eurc
        items:
          type: object
        due_date:
          format: date-time
          type: string
          description: Due date of the invoice
          example: '2025-05-20'
        delivery:
          type: string
          description: Delivery method
          enum:
            - EMAIL
            - MANUALLY
        payment_link:
          type: boolean
          description: Whether to generate a payment link
        payment_methods:
          type: array
          description: Array of accepted payment methods
          items:
            type: string
            enum:
              - ACH
              - BANK_TRANSFER
              - CREDIT_CARD
              - CASH
              - MOBILE_MONEY
              - CRYPTO
        status:
          type: string
          description: Invoice status
          enum:
            - DRAFT
            - OPEN
            - PASTDUE
            - PAID
            - PARTIALLYPAID
        address:
          type: string
          description: Address
        phone_number:
          type: string
          description: Phone number
        send_date:
          format: date-time
          type: string
          description: Send date
          example: '2025-05-20'
        logo:
          type: string
          description: Logo URL
        partial_payment:
          type: boolean
          description: Allow partial payments
        taxId:
          type: string
          description: Tax ID
      required:
        - name
        - email
        - customer_id
        - currency
        - items
        - due_date
        - delivery
        - payment_link
        - payment_methods
        - status
        - partial_payment
  securitySchemes:
    x-client-secret:
      type: apiKey
      in: header
      name: x-client-secret
      description: >-
        Your secret API key. Keep this secure and never expose it in client-side
        code.
    x-client-key:
      type: apiKey
      in: header
      name: x-client-key
      description: Your unique client API key. Obtain this from your Devdraft AI dashboard.

````