cXML reference

cXML InvoiceDetailRequest: invoice example and element reference

The InvoiceDetailRequest is the cXML invoice. It refers back to a purchase order, lists what you are billing for, and carries the tax and totals the buyer’s accounts payable system checks before paying.

Where it fits

  1. You have received an OrderRequest and delivered against it, possibly with a ShipNoticeRequest.
  2. You send an InvoiceDetailRequest by HTTP POST to the buyer’s or network’s cXML endpoint, with your Sender credential and shared secret.
  3. Each InvoiceDetailOrder names the order it bills through InvoiceDetailOrderInfo, and each InvoiceDetailItem names the order line through InvoiceDetailItemReference/@lineNumber.
  4. The receiver answers with a cXML Response and Status. Business validation — price, quantity, tax, duplicates — often happens after that, and a rejection comes back later as a status update or in the network’s portal.

Nordwind Supplies invoices order PO-4500012345 with 19% VAT (cXML 1.2.061, InvoiceDetail.dtd).

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.061/InvoiceDetail.dtd">
<cXML payloadID="1794302400.1190@punchout.example.com" timestamp="2026-11-10T09:00:00+01:00" xml:lang="en-US">
  <Header>
    <From>
      <Credential domain="DUNS">
        <Identity>000000000</Identity>
      </Credential>
    </From>
    <To>
      <Credential domain="NetworkID">
        <Identity>AN00000000001</Identity>
      </Credential>
    </To>
    <Sender>
      <Credential domain="DUNS">
        <Identity>000000000</Identity>
        <SharedSecret>change-me</SharedSecret>
      </Credential>
      <UserAgent>Nordwind Supplies ERP</UserAgent>
    </Sender>
  </Header>
  <Request deploymentMode="production">
    <InvoiceDetailRequest>
      <InvoiceDetailRequestHeader invoiceID="NW-INV-2026-00871" purpose="standard" operation="new" invoiceDate="2026-11-10T09:00:00+01:00">
        <InvoiceDetailHeaderIndicator/>
        <InvoiceDetailLineIndicator/>
        <InvoicePartner>
          <Contact role="remitTo">
            <Name xml:lang="en">Nordwind Supplies Ltd</Name>
            <PostalAddress>
              <Street>Lagerweg 7</Street>
              <City>Bremen</City>
              <PostalCode>28195</PostalCode>
              <Country isoCountryCode="DE">Germany</Country>
            </PostalAddress>
          </Contact>
        </InvoicePartner>
        <InvoicePartner>
          <Contact role="billTo">
            <Name xml:lang="en">Example Buyer GmbH, Accounts Payable</Name>
            <PostalAddress>
              <Street>Musterstrasse 1</Street>
              <City>Hamburg</City>
              <PostalCode>20095</PostalCode>
              <Country isoCountryCode="DE">Germany</Country>
            </PostalAddress>
          </Contact>
        </InvoicePartner>
        <PaymentTerm payInNumberOfDays="30"/>
      </InvoiceDetailRequestHeader>
      <InvoiceDetailOrder>
        <InvoiceDetailOrderInfo>
          <OrderReference orderID="PO-4500012345" orderDate="2026-11-05T08:58:12+01:00">
            <DocumentReference payloadID="1793870400.2207@buyer.example"/>
          </OrderReference>
        </InvoiceDetailOrderInfo>
        <InvoiceDetailItem invoiceLineNumber="1" quantity="10">
          <UnitOfMeasure>BX</UnitOfMeasure>
          <UnitPrice>
            <Money currency="EUR">8.90</Money>
          </UnitPrice>
          <InvoiceDetailItemReference lineNumber="1">
            <ItemID>
              <SupplierPartID>NW-GLV-NIT-L</SupplierPartID>
            </ItemID>
            <Description xml:lang="en">Nitrile gloves, size L - Powder-free, box of 100</Description>
          </InvoiceDetailItemReference>
          <SubtotalAmount>
            <Money currency="EUR">89.00</Money>
          </SubtotalAmount>
        </InvoiceDetailItem>
        <InvoiceDetailItem invoiceLineNumber="2" quantity="4">
          <UnitOfMeasure>C62</UnitOfMeasure>
          <UnitPrice>
            <Money currency="EUR">18.10</Money>
          </UnitPrice>
          <InvoiceDetailItemReference lineNumber="2">
            <ItemID>
              <SupplierPartID>NW-TAPE-50</SupplierPartID>
            </ItemID>
            <Description xml:lang="en">Packing tape, 50 mm x 66 m</Description>
          </InvoiceDetailItemReference>
          <SubtotalAmount>
            <Money currency="EUR">72.40</Money>
          </SubtotalAmount>
        </InvoiceDetailItem>
      </InvoiceDetailOrder>
      <InvoiceDetailSummary>
        <SubtotalAmount>
          <Money currency="EUR">161.40</Money>
        </SubtotalAmount>
        <Tax>
          <Money currency="EUR">30.67</Money>
          <Description xml:lang="en">VAT 19%</Description>
          <TaxDetail purpose="tax" category="vat" percentageRate="19">
            <TaxableAmount>
              <Money currency="EUR">161.40</Money>
            </TaxableAmount>
            <TaxAmount>
              <Money currency="EUR">30.67</Money>
            </TaxAmount>
          </TaxDetail>
        </Tax>
        <GrossAmount>
          <Money currency="EUR">192.07</Money>
        </GrossAmount>
        <NetAmount>
          <Money currency="EUR">192.07</Money>
        </NetAmount>
        <DueAmount>
          <Money currency="EUR">192.07</Money>
        </DueAmount>
      </InvoiceDetailSummary>
    </InvoiceDetailRequest>
  </Request>
</cXML>

The elements that matter

NameNeeded?Meaning
InvoiceDetailRequestHeader/@invoiceIDRequiredYour invoice number. Buyers reject a second invoice with the same number.
InvoiceDetailRequestHeader/@invoiceDateRequiredInvoice date, in ISO 8601 with a time-zone offset.
InvoiceDetailRequestHeader/@purposeOptionalstandard (the default), creditMemo, debitMemo, lineLevelCreditMemo or lineLevelDebitMemo.
InvoiceDetailRequestHeader/@operationOptionalnew (the default) or delete to cancel an earlier invoice with the same invoiceID.
InvoiceDetailHeaderIndicatorRequiredEmpty element whose attributes describe the invoice as a whole; with none set, it is a line-item invoice against an order.
InvoiceDetailLineIndicatorRequiredEmpty element whose attributes say what appears at line level, for example isTaxInLine="yes" when each line carries its own Tax.
InvoicePartner/Contact/@roleOptionalParties on the invoice: remitTo, billTo, soldTo, from and others. Many buyers require remitTo and their own billTo.
PaymentTerm/@payInNumberOfDaysOptionalPayment term in days. Should match the term on the order or contract.
InvoiceDetailOrderInfo/OrderReferenceConditionalThe purchase order being billed, with orderID and the order’s payloadID. Other forms such as OrderIDInfo are allowed when you do not have the original document.
InvoiceDetailItem/@invoiceLineNumberRequiredLine number within this invoice.
InvoiceDetailItem/@quantityRequiredQuantity billed on this line.
InvoiceDetailItem/UnitOfMeasure, UnitPriceRequiredUnit and price, matching the order line.
InvoiceDetailItemReference/@lineNumberRequiredThe order line being billed, from ItemOut/@lineNumber.
InvoiceDetailSummary/SubtotalAmountRequiredSum of the line amounts before tax and charges.
InvoiceDetailSummary/TaxRequiredTotal tax with a Description, and usually a TaxDetail per rate. Required even when the amount is zero.
InvoiceDetailSummary/NetAmountRequiredAmount after discounts and adjustments. GrossAmount and DueAmount are optional in the DTD but expected by most buyers.

Mistakes that get it rejected

Totals that do not reconcileBuyers recompute line quantity × unit price, the subtotal and the tax. A difference of a cent from rounding per line instead of on the total is enough for an automatic rejection.
Reusing an invoice numberDuplicate invoiceID detection is standard. A corrected invoice needs either a new number or a delete of the original first, according to the buyer’s rules.
Missing tax detailTax regimes such as EU VAT usually require a TaxDetail with category, rate and taxable amount, and buyers in those countries often require your and their VAT IDs as well. A bare total tax amount is not enough.
Invoicing more than ordered or receivedIf the buyer runs a two- or three-way match, invoicing a quantity above the order, or above what was received, puts the invoice on hold or rejects it.

Have a InvoiceDetailRequest that a buyer rejected? Paste it into the free cXML and OCI tester; it checks structure in your browser.

InvoiceDetailRequest questions

How is a credit note sent in cXML?

As an InvoiceDetailRequest with purpose="creditMemo" (or lineLevelCreditMemo for line-level credits), with amounts as negative values. Check the buyer’s guide, as their rules for referencing the original invoice vary.

Which DOCTYPE does an invoice use?

InvoiceDetail.dtd from the same cXML version, for example http://xml.cxml.org/schemas/cXML/1.2.061/InvoiceDetail.dtd.

Does a 200 response mean the invoice is approved?

No. It means the document was received and accepted for processing. Price, tax and matching checks often happen afterwards and can still reject it.

Rather we handled InvoiceDetailRequest for you?

Purchase orders, ship notices and invoices over cXML are part of our Order Loop tier: we receive or send the InvoiceDetailRequest documents, map them to your systems and handle the buyer’s test cycle. You pay nothing until it is live.

Send us the requirement See Order Loop pricing