GET /merchants/{id}/invoices

List merchant invoices

Merchants

Description

Retrieve a paginated list of invoices for a specific merchant.

Authentication Required: User must be authenticated and have the 'merchant' feature flag.

Authorization: Merchant users can only view invoices for their own merchant account.

Parameters

id integer path required
Merchant ID
page integer query
Page number for pagination (defaults to 1)
status string query
Filter invoices by status

Responses

200 Successful response with paginated invoices
application/json
statusstring
Example: success
dataarray
current_pageinteger
Current page number
Example: 1
total_resultsinteger
Total number of invoices
Example: 25
total_pagesinteger
Total number of pages
Example: 1
Example:
{
  "status": "success",
  "data": [
    {
      "id": 1,
      "amount": "150.50",
      "due_date": "2024-11-30",
      "payment_method": null,
      "payment_date": null,
      "status": "waiting_payment",
      "invoice_url": "https://storage.revclic.dev/invoices/1/invoice-2024-11-a1b2c3d4e5f6.pdf",
      "payment_receipt_url": null,
      "created_at": "2024-12-01T10:00:00Z",
      "updated_at": "2024-12-01T10:00:00Z"
    },
    {
      "id": 2,
      "amount": "320.75",
      "due_date": "2024-10-31",
      "payment_method": "bank_transfer",
      "payment_date": "2024-11-05",
      "status": "paid",
      "invoice_url": "https://storage.revclic.dev/invoices/1/invoice-2024-10-b2c3d4e5f6a7.pdf",
      "payment_receipt_url": "https://storage.revclic.dev/invoices/1/payment-receipt-2024-10-b2c3d4e5f6a7.pdf",
      "created_at": "2024-11-01T09:30:00Z",
      "updated_at": "2024-11-05T14:20:00Z"
    }
  ],
  "current_page": 1,
  "total_results": 25,
  "total_pages": 1
}
401 Authentication required
application/json
Example:
{
  "status": "error",
  "message": "Not authenticated or insufficient permissions"
}
404 Merchant not found or page not found
application/json
Example:
{
  "status": "error",
  "message": "Merchant not found"
}