A sales tax would be highly regressive, and I don't know how it would be administered if there was a credit based on income.
The credit would not be based on income. The simplest form would provide a credit based on the assumption that everyone will spend up to the poverty level on essential items. Multiply this by the tax rate to determine the amount of the credit.
For working people, the credit could be distributed as a credit against social security taxes. For the retired, it could be included in their social security payments. For those on welfare it would be included in their welfare payments. Everyone else would have to file for it.