--- title: "Xero locked document error for Administrators - Payhawk Help Center" slug: "failed-to-export-into-xero-this-document-cannot-be-edited-as-it-has-a-payment-or-credit-note-allocated-to-it" description: "Fix the Xero export error for a bill locked by a payment or credit note: remove the allocation in Xero, export the expense again, and then reallocate it." updated: 2026-03-16T13:58:13Z published: 2026-03-16T13:58:13Z canonical: "payhawk.com/failed-to-export-into-xero-this-document-cannot-be-edited-as-it-has-a-payment-or-credit-note-allocated-to-it" --- > ## Documentation Index > Fetch the complete documentation index at: https://payhawk.com/help/llms.txt > Use this file to discover all available pages before exploring further. # Failed to export into Xero. This document cannot be edited as it has a payment or credit note allocated to it. ## Error message ```plaintext Failed to export into Xero. This document cannot be edited as it has a payment or credit note allocated to it. ``` ## Cause This error occurs when an attempt to export or update an expense from Payhawk fails because the corresponding document in Xero is already marked as paid or has a credit note applied to it. Once a payment or credit is allocated to a document in Xero, it becomes locked and cannot be edited or updated by an external application, which prevents the Payhawk export from completing. ## Solution To resolve this issue: 1. Locate the document in Xero. 1. Log in to your Xero account. 2. Find the specific bill which corresponds to the expense that failed to export. 2. Remove the allocated payment. 1. Open the bill. 2. Scroll down to the section at the bottom showing the payment or credit note that has been applied. 3. Click to open the payment and select the option to remove it. Ensure you are only deleting the payment or credit note allocation, not the entire bill itself. 3. Re-export the expense from Payhawk. 1. Return to your Payhawk account. 2. Initiate the export for the expense again.