> ## Documentation Index
> Fetch the complete documentation index at: https://docs.layerfi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Write-off object

A Write-off represents an amount of an invoice that a business has decided to forgive or cancel. Write-offs are used to adjust the outstanding balance of an invoice when the business does not expect to collect the full amount.

### Attributes

**id** `string` *required*

Unique identifier for the write-off.

**invoice\_id** `string` *required*

Unique identifier for the invoice the write-off is applied to.

**external\_id** `string`

Unique ID of the write-off in your system for linking and idempotency.

**amount** `integer` *required*

The amount written off in cents. This amount counts towards the invoice total and decreases the outstanding balance of the invoice. If not specified when creating a write-off, it defaults to the entire outstanding balance of the invoice. The amount must be a positive value and cannot exceed the current outstanding balance of the invoice.

**memo** `string`

User-specified memo indicating the reason for the write-off.

**destination\_ledger\_account** `AccountIdentifier object` *required*

Expense or contra-revenue account where write-off amount is recorded. Defaults to the bad debt expense account if not specified when creating a write-off. If the write-off is for a different reason, such as a charitable donation, a different ledger expense account can be specified.

**write\_off\_at** `ISO8601 timestamp` *required*

Timestamp when the write-off should be recognized in the general ledger.
This may be the same time as the invoice was created if it is an intentional charitable contribution or it could be months after the invoice is issued when that invoice is deemed uncollectible.

**transaction\_tags** `Array of Tags`

Tags associated with the write-off.

**Tag properties**

**key** `string` *required*

The tag's key

**value** `string` *required*

The tag's value

**created\_at** `ISO8601 timestamp` *required*

When the tag was created

**updated\_at** `ISO8601 timestamp` *required*

When the tag was last updated

**deleted\_at** `ISO8601 timestamp`

When the tag was deleted

```json Response theme={null}
{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "external_id": "write-off-123",
    "amount": 123,
    "memo": "Customer unable to pay due to bankruptcy",
    "destination_ledger_account": {
      "type": "AccountId",
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    },
    "write_off_at": "2023-11-07T05:31:56Z",
    "transaction_tags": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "key": "WriteOffReason",
        "value": "Bankruptcy",
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z",
        "deleted_at": null
      },
      {
        "id": "4d01d4dd-1e55-5c61-9999-9ee36847163b",
        "key": "Department",
        "value": "Finance",
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z",
        "deleted_at": null
      }
    ]
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.