You must have a good credit rating (see below) and cannot apply for a Help to Buy mortgage if you have overdue amounts equivalent to three months’ payments on a mortgage or other loan in the past two years, one or more county court judgments, with a total value greater than £500, within three years of the completion date or an individual voluntary arrangement or bankruptcy order which was in force at any time in the past three years.
Frankly speaking a bad credit history shuts off most of the places where you can get a credit i.e.jobs, banks etc. So for a mortgage you need to have a good credit. The banks are going to do a full credit check before they give you a mortgage. Did you check with a mortgage adviser at a bank ? He/she would have been able to give you a clean answer. So would if you call the mortgage helpline of a bank.
A good credit history, but spending beyond your means will also raise red flags for the bank. They ask for your spending habits to decide if you will be able to keep up with your mortgage payments. If they see you are a habitual spender they might refuse you. That is where the credit check helps them. They see your credit card bills and payments or to check how much you are on overdraft.