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

# Create Payment Invoice

> Creates a new payment invoice for the authenticated merchant



## OpenAPI

````yaml POST /api/v1/merchants/invoice/create
openapi: 3.0.1
info:
  title: OpenAPI Payvra
  description: Payvra API
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://payvra.com
security:
  - BearerAuth: []
paths:
  /api/v1/merchants/invoice/create:
    post:
      tags:
        - Invoices
      summary: Create a payment invoice
      description: Creates a new payment invoice for the authenticated merchant
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePaymentInvoiceRequest'
      responses:
        '200':
          description: Payment invoice created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentInvoiceResponse'
        '400':
          description: Bad request - validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized - invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - BearerAuth: []
components:
  schemas:
    CreatePaymentInvoiceRequest:
      type: object
      required:
        - amount
      properties:
        amount:
          type: number
          description: Payment amount
          minimum: 0
        amountCurrency:
          type: string
          description: Currency for the amount
          default: USD
        acceptedCoins:
          type: array
          items:
            type: string
          description: List of accepted cryptocurrency symbols
        underPaidCover:
          type: number
          minimum: 0
          maximum: 50
          multipleOf: 0.1
          description: Percentage of underpayment to accept
        feePaidByPayer:
          type: boolean
          description: Whether the fee is paid by the payer
        lifeTime:
          type: number
          minimum: 1
          maximum: 1440
          default: 1440
          description: Invoice lifetime in minutes
        returnUrl:
          type: string
          format: uri
          description: URL to return to after payment
    PaymentInvoiceResponse:
      type: object
      properties:
        id:
          type: string
        merchantId:
          type: string
        paymentUrl:
          type: string
          format: uri
        status:
          type: string
          enum:
            - PENDING
            - CONFIRMING
            - UNDER_PAID
            - PAID
            - FAILED
            - EXPIRED
        address:
          type: string
        txHash:
          type: string
        amount:
          type: number
        amountCurrency:
          type: string
        rate:
          type: number
        payAmount:
          type: number
        cryptoCurrency:
          type: object
          properties:
            symbol:
              type: string
        network:
          type: object
          properties:
            network:
              type: string
        feePaidByPayer:
          type: boolean
        underPaidCover:
          type: number
        isWhiteLabel:
          type: boolean
        returnUrl:
          type: string
          format: uri
        expiresAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````