--- title: "Overview" slug: "write-off-allocations-overview" updated: 2023-11-14T13:04:07Z published: 2023-11-14T13:04:07Z canonical: "docs.blackthorn.io/write-off-allocations-overview" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.blackthorn.io/llms.txt > Use this file to discover all available pages before exploring further. # Overview When an Allocation with **Type** = “Write Off” is created, then the related Invoice’s **Write Off Amount** field will include - “the sum of all the amounts in the Invoice’s related Line Item’s **Amount Written Off** fields.” The Invoice’s **Balance Due** should be reduced by the Invoice’s **Write Off Amount**. (Invoice **Balance Due** = Invoice **Total Amount** - (Invoice **Balance Paid** + Invoice **Write Off Amount**)) If a Transaction with **Transaction Type** = “Write Off” is created, then an Allocation with **Type** = “Write Off” will be created. When a Transaction with **Transaction Type** = “Write Off” and an **Amount** less than the Invoice’s **Balance Due** is created, then a related Allocation record with **Type** = “Write Off” will be created. If a Transaction with **Transaction Type** = “Write Off” or **Transaction Type** = “Charge” is created and the Transaction **Amount** = Invoice’s **Balance Due**, then an Allocation with **Type** = “Write Off” will be created and the Transaction with **Transaction Type** = “Charge” will have Transaction’s **Payment Status** = “Captured”. When the Invoice’s **Balance Due** = ”0”, then the Invoice **Status** = “Completed” and the Transaction’s **Payment Status** = “Paid”. ## Create a Write-off Allocation 1. Go to Custom Setting > Blackthorn Pay – Trigger Settings. 2. Set **Automatically Create Allocation** = “True” (checked). 3. Create an Invoice with one or more Line Items that have a **Balance Due**. 4. Create a Transaction with **Transaction Type** = “Write Off”. 5. Verify a related Allocation record was created. 6. Create a new Transaction with **Record Type** = “Charge” a. Enter an **Amount**. b. Change the **Transaction Type** to “Write Off”. c. Change **Transaction Status** to “Complete”. 7. The Invoice’s **Write Off Amount** = “the sum of all the amounts in the Invoice’s related Line Item’s **Amount Written Off** fields.” 8. Invoice’s **Balance Due** = Invoice **Total Amount** - Invoice **Write Off Amount** 9. TheInvoice’s **Status** should change to “Completed” when the **Balance Due** = “0”. 10. The **Payment Status** will update to “Partially Paid` once the **Balance Due** is less than the **Total Amount**. The **Payment Status** will update to “Paid” once the **Balance Due** = “0”. ### Rollup Allocation Amounts and the Invoice Payment Status When an Invoice is manually charged through a Transaction with **Transaction Type** = “Write Off”, the following is true. - The Invoice **Write Off Amount** value is the same as the Allocation’s **Amount** field. - An Allocation record with **Type** = “Write Off” is created. - The Line Item **Amount Written Off** value is the same as the Allocation’s **Amount** field. When an Invoice is manually captured, the following in true. - The Line Item **Balance Paid** is the same as the Allocation (**Type** = “Payment”)’s **Amount** field. When an Invoice with the **Payment Status** set to “Paid” or “Partially Paid” is refunded, the following is true. - The Line Item **Amount Refunded** is the same as the Allocation (**Type** = “Payment”)’s **Amount** field.