> ## 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.

# Fetch Payment Invoice

> Retrieves details of an existing payment invoice



## OpenAPI

````yaml POST /api/v1/merchants/invoice/fetch
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/fetch:
    post:
      tags:
        - Invoices
      summary: Fetch a payment invoice
      description: Retrieves details of an existing payment invoice
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FetchPaymentInvoiceRequest'
      responses:
        '200':
          description: Payment invoice retrieved 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:
    FetchPaymentInvoiceRequest:
      type: object
      required:
        - invoiceId
      properties:
        invoiceId:
          type: string
          description: ID of the payment invoice to fetch
    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

````