---
updatedAt: 2026-04-04T18:15:51.000Z
agentTools:
  projectIndex: https://docs.pelcro.com/v2.4/llms.txt
---

# Mark invoice as uncollectible

Mark an invoice as uncollectible.

## Overview

Mark an invoice as uncollectible when you've exhausted collection efforts and determined the payment cannot be recovered. This is typically used for bad debt write-offs.

**Example:** After multiple failed payment attempts and customer contact efforts, mark an invoice as uncollectible for accounting purposes.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "core-api",
    "version": "1.88"
  },
  "servers": [
    {
      "url": "https://www.pelcro.com/api/v1/core"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "x-bearer-format": "bearer"
      },
      "sec1": {
        "type": "apiKey",
        "in": "query",
        "name": "site_id"
      }
    }
  },
  "security": [
    {
      "sec0": [],
      "sec1": []
    }
  ],
  "paths": {
    "/invoices/{id}/uncollectible": {
      "post": {
        "summary": "Mark invoice as uncollectible",
        "description": "Mark an invoice as uncollectible.",
        "operationId": "api-core-mark-as-uncollectible-invoices",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The unique identifier of the invoice.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          },
          {
            "name": "site_id",
            "in": "query",
            "description": "The unique identifier of the site associated with your account.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "Bearer eyJ***"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object"
                    },
                    "status": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Result": {
                    "value": "\t\"data\": {\n\t\t\"id\": 4649,\n\t\t\"amount_due\": 12300,\n\t\t\"amount_paid\": 0,\n\t\t\"amount_remaining\": 12300,\n\t\t\"auto_advance\": false,\n\t\t\"billing\": \"send_invoice\",\n\t\t\"billing_reason\": \"subscription_create\",\n\t\t\"currency\": \"usd\",\n\t\t\"due_date\": 1730411390,\n\t\t\"user_id\": 3315,\n\t\t\"charge_id\": null,\n\t\t\"subscription_id\": 1961,\n\t\t\"plan_name\": null,\n\t\t\"product_name\": null,\n\t\t\"ending_balance\": 0,\n\t\t\"hosted_invoice_url\": \"https:\\/\\/invoice.stripe.com\\/i\\/acct_1JkHv4AKW6NZEGXw\\/test_YWNjdF8xSmtIdjRBS1c2TlpFR1h3LF9ReDhETG92TXZtRll4c1RKUEhNTTdRUHhpWFlDcGlWLDExODM2MDI2Mg0200MP9pkdlV?s=ap\",\n\t\t\"invoice_pdf\": \"https:\\/\\/www.pelcro.com\\/pdf\\/invoice\\/eyJpdiI6ImFweHJEQWhFNWVhTHVHaW5aSEtNbnc9PSIsInZhbHVlIjoiQWEyYXVZTG8vZE1xT3VRZHlDOWRXM3pNd2tCVkpNQXNyVG44V28rbGhQZz0iLCJtYWMiOiI3Yjg1MTAyYzVlYjllZTFlNjI1ZDJjNjc4YzQ2ZTlhMTJiYzllNjUyZmQ4MTZhZTFkYWMyYWFhZTJlYWI2NjQ1IiwidGFnIjoiIn0=\",\n\t\t\"payment_link\": \"\",\n\t\t\"is_imported\": null,\n\t\t\"number\": \"20A3EC79-0020\",\n\t\t\"paid\": false,\n\t\t\"metadata\": null,\n\t\t\"period_start\": 1727819390,\n\t\t\"period_end\": 1727819390,\n\t\t\"post_payment_credit_notes_amount\": 0,\n\t\t\"pre_payment_credit_notes_amount\": 0,\n\t\t\"starting_balance\": 0,\n\t\t\"status\": \"uncollectible\",\n\t\t\"subtotal\": 12300,\n\t\t\"tax\": null,\n\t\t\"total\": 12300,\n\t\t\"customer_address\": null,\n\t\t\"finalized_at\": 1727819391,\n\t\t\"marked_uncollectible_at\": 1727819462,\n\t\t\"paid_at\": null,\n\t\t\"voided_at\": null,\n\t\t\"created_at\": 1727819390,\n\t\t\"updated_at\": 1727819463,\n\t\t\"deleted_at\": null\n\t},\n\t\"status\": \"success\"\n}"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n\t\"error\": {\n\t\t\"status\": 400,\n\t\t\"message\": \"Can only mark an invoice as uncollectible if it is open or past_due, this invoice has status: uncollectible\"\n\t}\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "integer",
                          "example": 400,
                          "default": 0
                        },
                        "message": {
                          "type": "string",
                          "example": "Can only mark an invoice as uncollectible if it is open or past_due, this invoice has status: uncollectible"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "error": "Unauthenticated."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "error": {
                        "status": 404,
                        "message": "Not found."
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "php",
              "code": "use GuzzleHttp\\Client;\n\n$site_id = 0; // (int) your site id here\n$invoice_id = 0; // (int) the invoice id here\n$api_key = '' // (string) your api key here\n  \n$uri = \"invoices/{$invoice_id}/void\";\n\n$config = [\n  'base_uri' => 'https://www.pelcro.com/api/v1/core/'\n];\n\n$client = new Client($config);\n\n$options = [\n\t'json' => [\n\t\t'site_id' => $site_id\n\t],\n\t'headers' => [\n\t\t'Accept' => 'application/json',\n\t\t'Authorization' => 'Bearer ' . $api_key\n\t]\n];\n\n$response = $client->request('POST', $uri, $options);"
            }
          ],
          "samples-languages": [
            "php"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```

# Sibling pages

* [List invoices](https://docs.pelcro.com/v2.4/reference/api-core-list-invoices.md)
* [Get invoice](https://docs.pelcro.com/v2.4/reference/get-invoice.md)
* [Pay invoice (offline)](https://docs.pelcro.com/v2.4/reference/api-core-pay-invoice.md)
* [Void invoice](https://docs.pelcro.com/v2.4/reference/api-core-void-invoice.md)
* [Update invoice ](https://docs.pelcro.com/v2.4/reference/update-invoice.md)
* [Create invoice](https://docs.pelcro.com/v2.4/reference/create-invoice.md)
* [Apply balance to invoice](https://docs.pelcro.com/v2.4/reference/api-core-apply-balance-to-invoice.md)