Discount at Header Level
A Discount can be applied to the invoice at the header level.
This requires new elements in the InvoiceDetailRequestHeader element, the InvoiceDetailSummary element and some changes to the calculations in the Tax and GrossAmount elements in the InvoiceDetailSummary.
Sample Discount Format
<InvoiceDetailDiscount percentageRate="10.00">
<Money currency="USD">22.50</Money>
</InvoiceDetailDiscount>
Net Amount & Due Amount
The NetAmount &DueAmount elements both contain the Money element.
This should be calculated based on Subtotal + ShippingAmount + Tax = GrossAmount - Discount = Net Amount/Amount Due
In this example it would be: 200.00 + 10.00 + 15.00 = 225.00 - 22.50 = 202.50
<NetAmount>
<Money currency="USD">202.5</Money>
</NetAmount>
<DueAmount>
<Money currency="USD">202.5</Money>
</DueAmount>
InvoiceDetailSummary
Below is the example InvoiceDetailSummary section including discount.
<InvoiceDetailSummary>
<SubtotalAmount>
<Money currency="USD">200.00</Money>
</SubtotalAmount>
<Tax>
<Money currency="USD">15.00</Money>
<Description xml:lang="en-US">Cost of tax, including shipping tax</Description>
<TaxDetail category="sales" percentageRate="7.5" purpose="tax">
<TaxableAmount>
<Money currency="USD">200.00</Money>
</TaxableAmount>
<TaxAmount>
<Money currency="USD">15.00</Money>
</TaxAmount>
</TaxDetail>
</Tax>
<SpecialHandlingAmount>
<Money currency="USD">0.00</Money>
<Description xml:lang="en-US">Other Charges</Description>
</SpecialHandlingAmount>
<ShippingAmount>
<Money currency="USD">10.00</Money>
</ShippingAmount>
<GrossAmount>
<Money currency="USD">225.00</Money>
</GrossAmount>
<InvoiceDetailDiscount percentageRate="10.00">
<Money currency="USD">22.50</Money>
</InvoiceDetailDiscount>
<NetAmount>
<Money currency="USD">202.5</Money>
</NetAmount>
<DueAmount>
<Money currency="USD">202.5</Money>
</DueAmount>
</InvoiceDetailSummary>
See the articles below for additional information on Invoice Integration:
Invoice Integration - Overview
Invoice Integration - cXML Request
Invoice Integration - cXML Header (Credentials)
Invoice Integration - InvoiceDetailSummary
Invoice Integration - InvoiceDetailOrder
Invoice Integration - Shipping at Header Level
Invoice Integration - Shipping at Line Level
Invoice Integration - Shipping & Special Handling at Header Level
Invoice Integration - Shipping & Special Handling at Line Level