finished purchase and write amount to storage