Zum Inhalt springen
Leadtime
Deutsch
Esc
↑↓navigieren↵öffnen⌘Jvorschau

Mark invoice as unpaid

Reverts a paid invoice back to unpaid status. This changes the invoice status from “Paid” back to “New” or “Sent” (depending on whether it was sent before), allowing you to correct payment records.

What happens when you mark an invoice as unpaid:

  1. Invoice status changes from “Paid” back to “New” or “Sent”
    • If the invoice was sent before, it returns to “Sent” status
    • If the invoice was never sent, it returns to “New” status
  2. Payment date and runtime are cleared
  3. Status change timestamp and user are recorded
  4. The invoice moves from the “Paid” tab back to the appropriate tab

Important restrictions:

  • Only invoices with status “Paid” can be marked as unpaid
  • Invoices that are “Cancelled” cannot be marked as unpaid
  • This operation is useful for correcting payment recording errors

Use cases:

  • Correct payment recording errors
  • Revert accidental payment marking
  • Handle payment reversals or refunds

What is returned:

  • Success response confirming the invoice was marked as unpaid
POST/billing/invoices/{id}/mark-as-unpaid
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Path parameters
idstring<uuid>required

Invoice ID (UUID)

Responses
200

Invoice marked as unpaid successfully

successbooleanrequired

Operation success flag

400

Invoice cannot be marked as unpaid (only invoices with status "Paid" can be marked as unpaid)

401

Unauthorized - Invalid or missing authentication token

403

Forbidden - Insufficient API scopes or permissions

404

Invoice not found

Try it
Server
Authorization
Parameters
Request
curl -X POST "https://leadtime.app/api/public/billing/invoices/497f6eca-6276-4993-bfeb-53cbbbba6f08/mark-as-unpaid" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response
{
  "success": true
}