I haven't coded a transaction the right way can I redo it?

Xero gives you two options to unreconcile a bank account or credit card transaction: Remove & Redo, and Unreconcile. The option you choose depends on why you're unreconciling the transaction.

For more details, see:help.xero.com/Payments_BankAccounts_Unreconcile

Remove & Redo or Unreconcile a bank transaction in Xero from Xero on Vimeo.