Mark invoice as paid
Marks an invoice as paid, indicating that payment has been received from the customer. This changes the invoice status from “New” or “Sent” to “Paid” and records the payment date and runtime.
What happens when you mark an invoice as paid:
- Invoice status changes to “Paid”
- Payment date (
paidAt) is recorded as the current date - Payment runtime (
paidRuntime) is calculated as the number of days between invoice creation and payment - Status change timestamp and user are recorded
- The invoice moves from the “New” or “Overdue” tab to the “Paid” tab
Important restrictions:
- Only invoices with status “New” or “Sent” can be marked as paid
- Invoices that are already “Paid” or “Cancelled” cannot be marked as paid
- To revert a paid invoice, use the mark as unpaid endpoint
Use cases:
- Record payment received from customer
- Update invoice status after manual payment confirmation
- Track payment timing for financial reporting
What is returned:
- Success response confirming the invoice was marked as paid
POST
/billing/invoices/{id}/mark-as-paidAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
idstring<uuid>requiredInvoice ID (UUID)
Responses
200Invoice marked as paid successfully
successbooleanrequiredOperation success flag
400Invoice cannot be marked as paid (only invoices with status "New" or "Sent" can be marked as paid)
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
404Invoice not found
Request
curl -X POST "https://leadtime.app/api/public/billing/invoices/%3Cuuid%3E/mark-as-paid" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"const response = await fetch("https://leadtime.app/api/public/billing/invoices/%3Cuuid%3E/mark-as-paid", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
});import requests
response = requests.post(
"https://leadtime.app/api/public/billing/invoices/%3Cuuid%3E/mark-as-paid",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
},
)Response
{
"success": true
}Invoice cannot be marked as paid (only invoices with status "New" or "Sent" can be marked as paid)
Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions
Invoice not found