Generating a credit note without misaligning it from the original invoice
Symptom
A refund generates a credit note XML that doesn’t match what was refunded, or the document is rejected/not generated correctly.
Cause
The most common causes:
- The credit note was generated before the original invoice was actually sent — a credit note only makes sense if it’s linked to an invoice that has already been issued/sent: it must carry the reference (number and date) of the linked invoice.
- The refund was recorded only as an amount, without restocking/reversing the quantities — if you only enter the refunded amount without cancelling the quantities of the products involved, the document doesn’t correctly reflect what was returned/cancelled.
Fix
- Check that the original invoice was actually sent before proceeding with the refund: if it wasn’t, consider correcting/sending the original invoice first.
- When recording the refund in WooCommerce, reverse the quantities of the affected products (don’t just enter a free-form refund amount): that’s what allows the document to correctly reflect the cancelled lines.
- After the refund, POP automatically generates the credit note XML linked to the order (see invoice-numbering-and-order-status for the exact trigger). Download it from the Invoices tab.
- If you use a transmission channel/add-on connected to an external accounting system, sending the credit note to that system may require a manual upload, separate from the document generation itself: check the specific behavior of the active channel.
Related configuration
For the exact credit note payload requirements (connected_invoice_data.id/date) on the API side, see
api/sdi; to understand when the order actually generates the XML see
invoice-numbering-and-order-status.