Please, I am 15 years old, in school and I have stolen. I took someone's card details and bought some items for myself. I went to the person and told him, but I only told him about three items and paid him back while there were four items. I confessed my sins to God and turned a new leaf, but I am still scared that my past would come back to haunt me and get me in trouble. Please help me.
You didn't fully repent since you only partly paid the person back what you stole. Either give the person what you bought with his money or pay him back for the last item as well. "For godly sorrow produces repentance leading to salvation, not to be regretted; but the sorrow of the world produces death. For observe this very thing, that you sorrowed in a godly manner: What diligence it produced in you, what clearing of yourselves, what indignation, what fear, what vehement desire, what zeal, what vindication! In all things you proved yourselves to be clear in this matter" (II Corinthians 7:10-11).
The past can't be changed. Once you finished reducing the damage that you caused, you need to put the past behind you and focus on living righteously. Whether the past comes back to haunt you or not is not in your control, so spending time worry about what might happen isn't worth the time. People will pay more attention to the person you currently are than the person you used to be.
I have spoken to the person about it. What do I do when I have bad thoughts about the past?
Remind yourself that you are no longer the person you used to be.