How do setup a site where clients earn rebates

I would like to setup a website (online Store) where it could calculate how much the registered customer purchase and calculate a % of the purchase as a rebate or points.

Any thought on which plugin if available I could use.

Thanks