Skip to main content

 

 

Coupa Success Portal

Sample cXML Invoice with Payment Terms

Payment terms must be unique, specifically there should be only one code with "5% NET 30", Net Payment of "30", and so on. This becomes important when cXML invoicing suppliers pass the values in the cXML files. If the values transmitted by the supplier do not match the setup in Coupa, the Payment Term field is "None".  The two ways to pass PaymentTerm are:

Option 1

<PaymentTerm payInNumberOfDays="30” />

where 30 is "Days For Net Payment".

Option 2

<PaymentTerm payInNumberOfDays="2">                      
    <Discount>
        <DiscountPercent percent="0"/>                         
        <DiscountDueDays>5.000</DiscountDueDays>   
    </Discount>
  <NetDueDays>30</NetDueDays>                                   
</PaymentTerm>

where:

  • 2 is "Code".
  • 0 is "Days for Discount Payment"
  • 5.000 is "Discount Rate (%)".
  • 30 is "Days for Network Payment"
  • InvoiceDetailPaymentTerm is deprecated in cXML 1.2.011, in favor of PaymentTerm
  • Starting with Coupa Release 12, suppliers must pass PaymentTerm
  • If InvoiceDetailPaymentTerm is passed in Coupa 12 and above, the first payment term set up in Coupa is used. This is the main reason why some customers can see a different Payment Term than what the supplier passes in the cXML file.
  • PaymentTerm must appear before </InvoiceDetailRequestHeader>
  • PaymentTerm values may vary by customer.
  • If there’s a value mismatch in Option 2, the Payment Term field is "None".
  • Invoice Payment Term is not defaulted to the payment term on the PO or in the supplier’s profile.
  • InvoiceDetailPaymentTerm is fine with Coupa 11 and above.

Sample cXML Invoice with Terms

This example uses the payment terms of 1%10/Net 30.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2/InvoiceDetail.dtd">
<cXML version="1.0" payloadID="xxx.xxxx@example.coupahost.com" timestamp="2014-03-04T12:00:00-00:00">
  <Header>
    <From>
      <Credential domain="DUNS">
        <Identity>xxxxxxxx</Identity>
      </Credential>
    </From>
    <To>
      <Credential domain="NetworkID">
        <Identity>yyyyyyyy</Identity>
      </Credential>
    </To>
    <Sender>
      <Credential domain="DUNS">
        <Identity>xxxxxxxxx</Identity>
        <SharedSecret>xxxxxxxxx</SharedSecret>
      </Credential>
      <UserAgent>Coupa Procurement 1.0</UserAgent>
    </Sender>
  </Header>
  <Request deploymentMode="production">
    <InvoiceDetailRequest>
      <InvoiceDetailRequestHeader invoiceID="900522Mar0314" purpose="standard" 
            operation="new" invoiceDate="2014-03-03T12:00:00-00:00">
        <InvoiceDetailHeaderIndicator/>
        <InvoiceDetailLineIndicator isAccountingInLine="yes"/>
        <InvoicePartner>
          <Contact role="soldTo">
            <Name xml:lang="en-US">COUPA</Name>
            <PostalAddress>
              <Street>                          </Street>
              <Street>123 Main St</Street>
              <City>San Mateo</City>
              <State>CA</State>
              <PostalCode>94402</PostalCode>
              <Country isoCountryCode="US">United States</Country>
            </PostalAddress>
          </Contact>
        </InvoicePartner>
        <InvoicePartner>
          <Contact role="billTo" addressID="1057  ">
            <Name xml:lang="en-US">COUPA</Name>
            <PostalAddress>
              <Street>123 Main St</Street></Street>
              <City>San Mateo</City>
              <State>CA</State>
              <PostalCode>94402</PostalCode>
              <Country isoCountryCode="US">United States</Country>
            </PostalAddress>
          </Contact>
        </InvoicePartner>
        <PaymentTerm payInNumberofDays="2%/20 Net30">
          <Discount>
            <DiscountPercent percent="2" />
            <DiscountDueDays>20</DiscountDueDays>
          </Discount>
          <NetDueDays>30</NetDueDays>
        </PaymentTerm>
      </InvoiceDetailRequestHeader>
      <InvoiceDetailOrder>
        <InvoiceDetailOrderInfo>
          <OrderReference>
            <DocumentReference payloadID="1352"/>
          </OrderReference>
        </InvoiceDetailOrderInfo>
        <InvoiceDetailItem invoiceLineNumber="1" quantity="1">
          <UnitOfMeasure>EA</UnitOfMeasure>
          <UnitPrice>
            <Money currency="USD">12.42</Money>
          </UnitPrice>
          <InvoiceDetailItemReference lineNumber="1">
            <ItemID>
              <SupplierPartID>N189465</SupplierPartID>
            </ItemID>
            <Description xml:lang="en-US">Paper Mate - Profile Retractable Ballpoint Pens - Black, Bold, 12/Pack</Description>
            <ManufacturerPartID>MF4770N     </ManufacturerPartID>
            <ManufacturerName xml:lang="en-US">CANON </ManufacturerName>
          </InvoiceDetailItemReference>
          <SubtotalAmount>
            <Money currency="USD">12.42</Money>
          </SubtotalAmount>
          <GrossAmount>
            <Money currency="USD">12.42</Money>
          </GrossAmount>
          <NetAmount>
            <Money currency="USD">12.42</Money>
          </NetAmount>
        </InvoiceDetailItem>
      </InvoiceDetailOrder>
      <InvoiceDetailSummary>
        <SubtotalAmount>
          <Money currency="USD">12.42</Money>
        </SubtotalAmount>
        <Tax>
          <Money currency="USD"></Money>
          <Description xml:lang="en-US"/>
          <TaxDetail purpose="tax" category="sales" percentageRate="0">
            <TaxableAmount>
              <Money currency="USD">12.42</Money>
            </TaxableAmount>
            <TaxAmount>
              <Money currency="USD"></Money>
            </TaxAmount>
            <TaxLocation xml:lang="en-US">usa</TaxLocation>
          </TaxDetail>
        </Tax>
        <ShippingAmount>
          <Money currency="USD">.00</Money>
        </ShippingAmount>
        <GrossAmount>
          <Money currency="USD">12.42</Money>
        </GrossAmount>
        <NetAmount>
          <Money currency="USD">12.42</Money>
        </NetAmount>
        <DueAmount>
          <Money currency="USD">12.42</Money>
        </DueAmount>
      </InvoiceDetailSummary>
    </InvoiceDetailRequest>
  </Request>
</cXML>
  • Was this article helpful?