---
search:
  tags:
    - billing
    - POST
seo:
  description: >-
    Reverts a paid invoice back to unpaid status. This… Reference for the POST
    /billing/invoices/{id}/mark-as-unpaid endpoint in the Leadtime Public API
    API.
sidebar:
  badge: POST
  label: Mark invoice as unpaid
title: Mark invoice as unpaid
type: openapi-operation
---
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

<Operation source="api-reference" id="invoicescontroller-markasunpaid" />
