DocsInvoicesDetails

Get Invoice Details

Get the details of an invoice.

Endpoint

GET ${baseUrl}/invoices/details

Query Parameters

ParameterTypeDescription
invoiceIdstringInvoice ID

Response

interface InvoiceDetailsResponse {
  success: boolean
  data: {
    invoice: {
      invoiceId: string
      amount: number
      discount: number
      fee: number
      status: string
      paymentMethod: string
      transactionId: string
      creditsUsed: number
      refundAmount: number
    }
    files?: {
      id: string
      name: string
      size: number
      type: string
      url: string
    }[]
  }[]
}

Example Request

const response = await fetch('${baseUrl}/invoices/details?invoiceId=123', {
  headers: {
    Authorization: 'Basic YOUR_API_KEY',
  },
})
 
const data = await response.json()

Error Codes

Status CodeDescription
200Success
401Unauthorized
403Forbidden
500Server Error