Overview
The Mark Expense as Paid endpoint allows you to record payment for an unpaid expense. This is a specialized endpoint that specifically handles the payment workflow, updating the expense status and recording payment details.This endpoint is designed for expenses that are currently unpaid. If an expense is already paid, the request will fail with an appropriate error message.
Path Parameters
The CzUid of the expense to mark as paid
Request Body
The date when the payment was made (YYYY-MM-DD format)
The payment method used (1-7):
1
- Cash2
- Bank transfer3
- Card4
- Check5
- Promissory note6
- Other7
- Compensation
Response
The updated expense object reflecting the payment
Success message confirming the payment has been recorded
Business Logic
When an expense is marked as paid:- Status Update: The expense status changes from unpaid/overdue to paid
- Payment Recording: Payment date and method are permanently recorded
- Audit Trail: The payment action is logged for audit purposes
- Notifications: Internal notifications may be triggered (if configured)
Validation Rules
- Expense Exists: The expense must exist and be owned by your firm
- Payment Status: The expense must currently be unpaid (not already paid)
- Date Format: Payment date must be in YYYY-MM-DD format
- Payment Type: Must be a valid payment type ID (1-7)
- Date Logic: Payment date should typically not be in the future
Error Scenarios
Already Paid
If the expense is already marked as paid, you’ll receive a 400 error. Use the Update Expense endpoint if you need to change payment details for an already-paid expense.Invalid Payment Type
Payment types must match the predefined values. Check the payment_type parameter documentation for valid options.Date Validation
Payment dates must be valid dates in the correct format. The system may also validate that payment dates are reasonable (not too far in the past or future).Use Cases
Bulk Payment Processing
When processing multiple payments (e.g., from bank statements), you can use this endpoint to mark individual expenses as paid:JavaScript
Integration with Banking APIs
This endpoint is ideal for integrating with banking APIs that provide transaction data:JavaScript
Manual Payment Entry
For manual payment entry in accounting workflows:JavaScript
Authorizations
Use your API key (sk_live_xxx or sk_test_xxx)
Path Parameters
Expense CzUid
Body
application/json