How tax engines should handle credit memos and returns
A credit should reverse the tax that was charged, not recalculate it from scratch. When the ERP sends a credit without a link to the original invoice, the engine uses today’s rates, today’s addresses and today’s exemptions, and the credit no longer matches what the customer paid.
By Herb Park, Clarent Technologies
Why credits go wrong
An invoice is calculated once, on its own date, with the customer’s address, exemption status and the rates in force that day. Weeks later a credit comes through. If the engine treats the credit as a new negative sale, it calculates again with whatever is true now. Usually the result is the same. When something has changed in between, the credit returns a different amount of tax than the invoice charged, and the customer, the ledger and the return disagree.
| What changed | Effect on a recalculated credit |
|---|---|
| Rate change in the jurisdiction | Credit uses the new rate; tax credited differs from tax charged |
| Customer provided an exemption certificate | Credit returns no tax, although tax was charged on the invoice |
| Ship-to address corrected | Credit lands in a different jurisdiction from the invoice |
| Product mapping or rule changed | Credit gets a different taxability or ERP tax code |
- Field: Document date; Invoice 90001234: 2026-03-12; Credit 90005678: 2026-07-08
- Field: Date used for rates; Invoice 90001234: 2026-03-12; Credit 90005678: 2026-07-08
- Field: Ship-to jurisdiction; Invoice 90001234: Same city and county; Credit 90005678: Same city and county
- Field: Net amount; Invoice 90001234: 1,000.00; Credit 90005678: -1,000.00
- Field: Combined rate; Invoice 90001234: 7.00%; Credit 90005678: 7.25%
- Field: Tax; Invoice 90001234: 70.00; Credit 90005678: -72.50
- Tax credited differs from tax charged by 2.50
- (1) The credit arrived with no link to the invoice, so the engine used the credit's own date for rates.
- (2) The rate in the jurisdiction changed between the two documents.
- (3) The customer paid 70.00 and is credited 72.50. The ledger and the return now carry the 2.50.
What good looks like
- The credit carries a reference to the original invoice number and the original invoice date.
- The engine is configured to use the original date for rates (most engines have a separate tax date or point-of-sale date field for this).
- For a full reversal, the ERP copies the original tax result rather than calling the engine again, or the engine looks up the original transaction in its audit data.
- Partial credits pro-rate the original tax by line, rather than recalculating each line.
- Sent as a new negative sale: <Invoice number="90005678"> <Type>CREDIT</Type> <InvoiceDate>2026-07-08</InvoiceDate> <OrigInvoice/> <OrigDate/> <TaxDate/> <Line id="10"> <Amount>-1000.00</Amount> </Line> </Invoice>
- Linked to its invoice: <Invoice number="90005678"> <Type>CREDIT</Type> <InvoiceDate>2026-07-08</InvoiceDate> <OrigInvoice>90001234</OrigInvoice> <OrigDate>2026-03-12</OrigDate> <TaxDate>2026-03-12</TaxDate> <Line id="10"> <Amount>-1000.00</Amount> </Line> </Invoice>
- (1) Empty reference and date fields leave the engine with today's rates, addresses and exemptions.
- (2) The original invoice number and date let the engine find the transaction it is reversing.
- (3) A separate tax date tells the engine which day's rates to use.
Not all credits are the same
| Credit type | What it represents | What to check |
|---|---|---|
| Return of goods | The sale is partly or fully undone | Original date and addresses; quantity matches the return |
| Price adjustment | The price was too high; goods were not returned | Tax credited is proportional to the price reduction |
| Rebate or discount after the sale | A later reduction, sometimes not tied to one invoice | Whether the jurisdiction allows tax to be reduced at all |
| Cancel and rebill | An invoice reversed and reissued | The reversal mirrors the original exactly; the rebill is a fresh calculation |
Some ERP document types send the credit as a positive amount with a credit flag, others as a negative amount. Both work if the connector is consistent. Mixing them can produce a "credit" that adds tax.
Troubleshooting a credit that does not match
- Pull both calls. Get the request and response for the original invoice and for the credit.
- Compare dates. Is the credit using the invoice date or today’s date for rates? Is the original invoice reference populated?
- Compare parties and addresses. Look for a changed ship-to, a new exemption, or a different customer number on the credit.
- Compare signs and types. Check that the transaction type and the sign of the amounts are what the engine expects for a credit.
- Fix the call, not the result. Correct the mapping so future credits carry the original reference and date, then reissue the affected credits.
- Credit tax differs
- Pull both calls: Request and response, invoice and credit
- Original ref and date sent?
- Same parties and addresses?
- Sign and type as expected?
- Rates use today's date: No link back to the invoice
- Data changed since invoice: Ship-to, exemption or customer number
- Credit adds tax: Credit flag and negative amounts mixed
- Fix the mapping, reissue: Correct the call for future credits
What to put in the regression pack
- A full credit and a partial credit of an invoice issued before a rate change, credited after it.
- A credit for a customer who became exempt after the invoice.
- A price-only credit with no goods returned.
- A cancel and rebill.
- A credit on each ERP document type that can create one, including manual and uploaded postings.