Skip to main content



Coupa Success Portal

Sample cXML Invoice Backed by Contract

Coupa allows to post non-PO backed invoices against contract via cXML. The only difference in the spec from a PO-backed invoice is that Document Reference payloadID in the InvoiceDetailOrderInfo tag includes contract number instead of PO number under Master Agreement Reference.

<?xml version="1.0" encoding="UTF-8"?>
<cXML version="1.0" payloadID="" timestamp="2009-05-01T01:24:51-07:00">
         <Credential domain="DUNS">
         <Credential domain="DUNS">
         <Credential domain="DUNS">
         <UserAgent>Your Very Own Agent 1.23</UserAgent>
   <Request deploymentMode="production">
         <InvoiceDetailRequestHeader invoiceID="735675n3" purpose="standard" operation="new" invoiceDate="2009-05-01T11:45:51-07:00">
            <InvoiceDetailHeaderIndicator />
            <InvoiceDetailLineIndicator isAccountingInLine="yes" />
            <PaymentTerm payInNumberOfDays="30" />
                  <!-- payloadID is the Contract number -->
                  <DocumentReference payloadID="2257" />
            <!-- First invoice quantity line. -->
            <InvoiceDetailItem invoiceLineNumber="1" quantity="1">
                  <Money currency="USD">365</Money>
               <!-- The lineNumber here is the backing PO line number, i.e. in this case, line 2 of PO #10 -->
               <InvoiceDetailItemReference lineNumber="1">
                  <!-- The Description will show up on the invoice's line description. Although it can be anything, 
                       Coupa recommends that you make this the same as the backing PO line's description. -->
                  <Description xml:lang="en">NEW 1 NINTENDO WII GAME CONSOLE + WII FIT BUNDLE +GAMES</Description>
               <!-- Shows up as "Total" on the invoice line -->
                  <Money currency="USD">365</Money>
            <!-- Should add-up and be consistent with the subtotals on the invoice lines -->
               <Money currency="USD">365</Money>
               <Money currency="USD">8</Money>
               <Description xml:lang="en">total tax</Description>
               <TaxDetail purpose="tax" category="VAT" percentageRate="1" taxPointDate="2009-04-24T11:45:51-07:00">
                     <Money currency="USD">365</Money>
                     <Money currency="USD">8</Money>
                  <TaxLocation xml:lang="en">CA</TaxLocation>
               <Money currency="USD">5</Money>
            <!-- Shipping costs -->
               <Money currency="USD">30</Money>
               <Money currency="USD" />
  • Was this article helpful?