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

# Create and send an invoice

> Creates an invoice via CoincircuitMCP and saves it to the database. Returns the invoice including a payment URL to share with your customer.



## OpenAPI

````yaml /openapi.json post /api/v1/invoices
openapi: 3.0.0
info:
  title: Dexxify API
  description: >-
    Crypto Infrastructure API for Africa (Wallets, Payouts, Offramp, Onramp,
    KYC, KYB)
  version: '1.0'
  contact:
    name: Dexxify
    url: https://www.dexxify.com
    email: dexxifyhq@gmail.com
servers: []
security: []
tags: []
paths:
  /api/v1/invoices:
    post:
      tags:
        - Invoices
      summary: Create and send an invoice
      description: >-
        Creates an invoice via CoincircuitMCP and saves it to the database.
        Returns the invoice including a payment URL to share with your customer.
      operationId: InvoicesController_create
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateInvoiceDto'
      responses:
        '201':
          description: Invoice created successfully.
        '400':
          description: Validation failed or the request body/params were malformed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '401':
          description: Missing, invalid, or expired authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
      security:
        - api-key: []
components:
  schemas:
    CreateInvoiceDto:
      type: object
      properties:
        customer:
          $ref: '#/components/schemas/CreateInvoiceCustomerDto'
        currency:
          type: string
          description: ISO currency code
          example: USD
        line_items:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceLineItemDto'
        tax_rate:
          type: number
          description: Tax rate as a percentage (e.g. 7.5)
          example: 7.5
        discount_amount:
          type: number
          description: Flat discount amount
          example: 50
        due_date:
          type: string
          description: Due date (ISO 8601)
          example: '2026-07-01T00:00:00Z'
        notes:
          type: string
          example: Thank you for your business.
        metadata:
          type: object
          example:
            order_ref: ord_123
      required:
        - customer
        - line_items
    ErrorResponseDto:
      type: object
      properties:
        success:
          type: boolean
          example: false
        status:
          type: number
          example: 400
        message:
          type: string
          example: Validation failed.
        errors:
          type: object
          example:
            - amount must not be less than 0
        timestamp:
          type: string
          example: '2026-09-17T12:00:00.000Z'
      required:
        - success
        - status
        - message
        - timestamp
    CreateInvoiceCustomerDto:
      type: object
      properties:
        email:
          type: string
          example: john@example.com
        first_name:
          type: string
          example: John
        last_name:
          type: string
          example: Doe
        phone:
          type: string
          example: '08012345678'
      required:
        - email
        - first_name
        - last_name
    InvoiceLineItemDto:
      type: object
      properties:
        description:
          type: string
          example: Consulting services
        quantity:
          type: number
          example: 2
        unit_price:
          type: number
          example: 500
      required:
        - description
        - quantity
        - unit_price
  securitySchemes:
    api-key:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: API key for /api/v1/* endpoints

````