Sample cXML Invoice with Payment Terms

Use this sample cXML invoice that contains payment terms to test your Coupa integration.

Discount and Net information must be populated with the values available in Coupa. If the values transmitted by the supplier are not set up in Coupa, the Payment Terms field will be 'None'.

InvoiceDetailPaymentTerm is deprecated in cXML 1.2.011, in favor of PaymentTerm. Starting with Coupa Release 12, suppliers must passPaymentTerm. The 2 ways to pass PaymentTerm are:

Option #1

Pass payment terms by passing in values for the number of days to be paid, discount amount, and discount number of days for payment. 

<PaymentTerm payInNumberOfDays="2">											(Where 2 is days for net payment)
		<Discount>
				<DiscountPercent percent="0"/>										 (Where 0 is Days For Discount Payment)
				<DiscountDueDays>0.000</DiscountDueDays>					 (Where 0.000 is the Discount Rate as a percentage)
		</Discount>
	<NetDueDays>30</NetDueDays>														(where 30 is Days for Net Payment)
</PaymentTerm>

Option #2 (R30 and newer)

Pass the payment terms by directly specifying the payment term as an extrinsic under the InvoiceDetailRequestHeader tag. 

The extrinsic name for passing the payment term code is PaymentTermCode

 

Administering Payment Terms

Go to Setup > Payment Terms to configure these settings.

Note

 

  • If InvoiceDetailPaymentTerm is passed in r12 and greater, the first payment term setup in Coupa will be used. This is the #1 reason why some customers are seeing a different Payment Term than what the supplier passes in the cXML invoice.
  • PaymentTerm must appear before </InvoiceDetailRequestHeader>
  • PaymentTerm values may vary by customer.
  • If payment terms can not be determined by what's passed, Coupa sets the payment term field to None.

Example 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="30">
					<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>