A rebate differs from a discount in timing and in conditionality. A discount reduces the price now; a rebate returns money later, if conditions are met. That gap is what makes rebates commercially useful — they reward behaviour over a period rather than a single order — and it is also what makes them hard to account for.
Between the transaction and the settlement sits an accrual: an estimate of what will eventually be owed. Everything difficult about rebate management lives in that estimate, and in whether the transactions that should have earned it were correctly matched to the agreement in the first place.
Rebates are either buy-side (vendor rebates you earn from suppliers) or sell-side (customer rebates you fund for your own customers). Most distributors run both, usually in different systems, which is why the true net margin on a line is so often unknown.