Update invoice payment details
PUT/company/invoices/payment/:_id
Endpoint to update the full payment details of an invoice. Requires valid JWT authentication.
Important notes:
- Can only update invoices from your own company
- If marked as paid, payment method and date must be provided
- The date must be in UTC format
- The payment method must be one of the supported types (transfer, card, cash)
Request
Responses
- 200
- 400
- 401
- 404
Payment details updated successfully
Invalid request. Possible causes:
- Missing required fields when paid=true
- Incorrect date format
- Unsupported payment method
Unauthorized. Invalid or missing JWT token.
Solution: Verify that 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.