Discounts
Abacus Tax Engine supports two levels of discount. Both reduce the taxable base before tax is calculated - the difference is in scope and how they are distributed.
Two Types of Discount
Item-level discount (items[].discount)
Applied directly to a single line item. The item's taxable base is unit_price × quantity − discount.
{
"name": "Laptop",
"unit_price": "1000.00",
"quantity": "1",
"tax_code": "ELECTRONICS",
"discount": "50.00"
}
Tax is calculated on $950.00, not $1,000.00.
Transaction-level discount (transaction_level_discount)
A single discount applied to the whole transaction, distributed pro-rata across all line items based on each item's share of the total.
{
"transaction_level_discount": "10.00",
"items": [
{ "name": "Item A", "unit_price": "70.00", "quantity": "1", "tax_code": "ELECTRONICS" },
{ "name": "Item B", "unit_price": "30.00", "quantity": "1", "tax_code": "ELECTRONICS" }
]
}
With a $10 transaction-level discount on a $100 order:
| Item A (70%) | Item B (30%) | |
|---|---|---|
| Gross value | $70.00 | $30.00 |
| Allocated discount | $7.00 | $3.00 |
Taxable base (total_price_after_discount) |
$63.00 | $27.00 |
Tax is calculated independently on each item's total_price_after_discount. The per-item allocation is returned as relative_transaction_discount.
Using Both Together
Item-level discounts are applied first. The transaction-level discount then distributes across the post-item-discount values. You can mix both on the same transaction.
Key Response Fields
| Field | Where | Description |
|---|---|---|
items[].discount |
Per item | Item-level discount as submitted |
items[].relative_transaction_discount |
Per item | This item's share of the transaction-level discount |
items[].total_price_after_discount |
Per item | Final taxable base - gross minus both discount types |
amounts.total_discount |
Transaction | Sum of all item-level discounts |
amounts.transaction_level_discount |
Transaction | The transaction-level discount as submitted |
amounts.final_transaction_amount |
Transaction | Total after all discounts |
Tax is always calculated on total_price_after_discount, not unit_price × quantity. Discounts reduce the tax base before rates are applied.
See the Transactions API Reference for the full request and response schema.
Discounts and Tax-Inclusive Pricing
When is_tax_inclusive: true, discounts are deducted before the tax extraction runs. See the Tax-Inclusive Pricing guide for details.