Update invoice payment status
PUT/company/invoices/paid/:_id
Endpoint to mark an invoice as paid or unpaid. Requires valid JWT authentication.
Important notes:
- Can only update invoices from your own company
- When marking as paid, the current date/time will be recorded
- When marking as unpaid, the payment data will be cleared
Request
Responses
- 200
- 400
- 401
- 404
Payment status updated successfully
Invalid request. Possible causes:
- The 'paid' field is not a boolean
- Required fields are missing
Unauthorized. Invalid or missing JWT token.
Solution: Verify the token is valid and included in the Authorization header.
Invoice not found. Possible causes:
- The ID does not exist
- The invoice belongs to another company
Solution: Verify the ID and ensure you have permission to access this invoice.