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

# Update invoice by UUID

> Update invoice by uuid. Permissions ["admin"]



## OpenAPI

````yaml https://api.paylora.org/api-doc-json patch /api/v1/invoice/{uuid}
openapi: 3.0.0
info:
  title: PAYLORA API
  description: Paylora Backend API
  version: '1.0'
  contact: {}
servers:
  - url: https://api.paylora.org
security: []
tags: []
paths:
  /api/v1/invoice/{uuid}:
    patch:
      tags:
        - Invoice
      summary: Update invoice by UUID
      description: Update invoice by uuid. Permissions ["admin"]
      operationId: InvoiceController_updateInvoice_v1
      parameters:
        - name: uuid
          required: true
          in: path
          description: The UUID of the invoice
          schema:
            example: a1b2c3d4-e5f6-7890-1234-567890abcdef
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateInvoiceDto'
      responses:
        '200':
          description: Resource model
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ResourceDto'
                  - properties:
                      data:
                        $ref: '#/components/schemas/Invoice'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                example:
                  statusCode: 400
                  message:
                    - '[value] is not valid'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                example:
                  statusCode: 401
                  message: Invalid signature | jwt must be provided
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                example:
                  statusCode: 403
                  message: Only [admin, customer] has access
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                type: object
                example:
                  statusCode: 404
                  message: Resource Not Found
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                example:
                  statusCode: 409
                  message: Resource with unique value (email, name etc) already exist
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                type: object
                example:
                  statusCode: 429
                  message: Too Many Requests
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                example:
                  statusCode: 500
                  message: Sever error message
      security:
        - JWT: []
components:
  schemas:
    UpdateInvoiceDto:
      type: object
      properties:
        status:
          type: string
          enum:
            - created
            - paid
            - expired
          example: paid
          description: The status of the invoice
      required:
        - status
    ResourceDto:
      type: object
      properties:
        success:
          type: boolean
          example: true
          description: Indicates if the request was successful
        data:
          type: object
          description: The data returned by the API
      required:
        - success
        - data
    Invoice:
      type: object
      properties:
        uuid:
          type: string
          example: a1b2c3d4-e5f6-7890-1234-567890abcdef
          description: The UUID of the invoice
        user_uuid:
          type: string
          example: a1b2c3d4-e5f6-7890-1234-567890abcdef
          description: The UUID of the user associated with the invoice
        status:
          type: string
          enum:
            - created
            - paid
            - expired
          example: created
          description: The status of the invoice
        amount:
          type: number
          example: 100
          description: The amount of the invoice
        fee_amount:
          type: number
          example: 5
          description: The fee amount for the invoice
        token_address:
          type: string
          example: 0xAbC123...
          description: The token address for the invoice
        contract_address:
          type: string
          example: 0xDeF456...
          description: The contract address for the invoice
        network:
          type: string
          example: ethereum
          description: The network of the transaction
        client:
          type: string
          example: 0xDeF456...
          description: The client wallet address
        hash:
          type: string
          example: 0xHash123...
          description: The transaction hash
          nullable: true
        signature:
          type: string
          example: 0xHash123...
          description: Transaction Signature
          nullable: true
        message_id:
          type: string
          example: '12345'
          description: The message ID associated with the invoice
          nullable: true
        channel_uuid:
          type: string
          example: '12345'
          description: The chat ID associated with the invoice
          nullable: true
        customer_id:
          type: string
          example: '123456789'
          description: The customer ID associated with the invoice
          nullable: true
        chain_id:
          type: object
          example: 11155111
          description: The chain ID of the blockchain network
          nullable: true
        url:
          type: string
          example: app.paylora.org/checkout=token
          description: Url of checkout page
        fee_bps:
          type: number
          example: 0xDeF456...
          description: User fee BPS
      required:
        - uuid
        - user_uuid
        - status
        - amount
        - fee_amount
        - token_address
        - contract_address
        - network
        - client
        - hash
        - signature
        - message_id
        - channel_uuid
        - customer_id
        - chain_id
        - url
        - fee_bps
  securitySchemes:
    JWT:
      scheme: bearer
      bearerFormat: JWT
      type: http

````