The SDI invoice gets rejected: common causes and fixes

Troubleshootingwordpresssdi-via-pop2026-07-01

Symptom

The call to create-xml (or the linked SdI submission) returns a JSON error instead of the expected XML/outcome, or the document is rejected before it’s sent.

Causes

Fix

  1. Check the tax_regime configured on the account (POP panel) and align it with the one sent in the payload, or omit the field from the payload if it’s not necessary.
  2. If you’re generating a credit note, check the active plan and the presence of connected_invoice_data.id/date.
  3. Check that the payload contains sdi_code or recipient_pec for the recipient.
  4. Re-read the JSON error response: the message indicates which validation failed — no need to guess, the response body is the primary source.
  5. Try again in sandbox first (see use-sandbox-environment) to isolate the problem without touching production data.

For the canonical payload field names and documented error codes, see api/sdi.