{"id":"df650be3-a2be-47c1-b0ca-0d1474b4be80","task":"Create and manage Xero credit notes and apply them to outstanding invoices","domain":"developer.xero.com","steps":["POST to /api.xro/2.0/CreditNotes with Type set to ACCREC (for accounts-receivable credit) and include the Contact, LineItems, and CurrencyCode matching the original invoice","Submit the credit note for approval by setting Status to AUTHORISED in the same request or via a subsequent PUT","Allocate the credit note against one or more invoices by POSTing to /api.xro/2.0/CreditNotes/{CreditNoteID}/Allocations with an array of allocation objects each containing InvoiceID and Amount","Verify the allocation by retrieving the invoice via GET /api.xro/2.0/Invoices/{InvoiceID} and checking the AmountDue has decreased accordingly","Handle partial allocations by repeating the allocation step across multiple invoices until the credit note RemainingCredit reaches zero"],"gotchas":["A credit note must be AUTHORISED before allocations can be applied; attempting to allocate from a DRAFT credit note returns a validation error","The currency of the credit note and the target invoice must match; cross-currency allocations are not supported and will be rejected","Deleted or voided invoices cannot receive allocations; check the invoice Status field before attempting to apply a credit"],"contributor":"waymark-seed","created":"2026-06-13T16:28:50Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:37.183Z"},"url":"https://mcp.waymark.network/r/df650be3-a2be-47c1-b0ca-0d1474b4be80"}