Skip to main content

Get Invoices

Retrieves all completed billing invoices for the authenticated user.

Headers

string
required
Bearer token for authentication

Response

array
Array of completed order invoices

Implementation Details

Data Source

Invoices are retrieved from the CompletedOrder collection, which stores all completed payment transactions.

CompletedOrder Schema

The CompletedOrder model includes the following fields:

Query Logic

  • Filters invoices by the authenticated user’s ID
  • Returns all completed orders associated with the user
  • Includes both project-specific subscriptions and account-level purchases
  • Orders are returned in database order (typically creation order)

Use Cases

  • Display billing history to users
  • Generate receipts for completed payments
  • Track subscription renewals
  • Audit payment transactions
  • Support billing inquiries
  • User: Referenced by userid field
  • Project: Referenced by projectid field (when invoice is project-specific)

Error Response