The Bantams are locked in a fight for League One survival and were desperate to keep the pair.
O’Brien always seemed likely to stay but there were fears Payne may be recalled amid interest from Sunderland and then sold to the Wearsiders.
However, agreement has now been reached to keep both Payne and O’Brien at Bradford until the end of the campaign.
Hopkin said: “I am delighted Jack and Lewis have committed to the club, as this has been a major focus for us.
“A lot of our efforts during the early stages of the transfer window have been spent on ensuring these two players stay with us.
“I would like to take this opportunity to thank Huddersfield Town for their co-operation on this.
“Jack and Lewis will be able to further enhance their careers, while helping us continue with our efforts to remain in League One.
“Hopefully our supporters will be pleased with this news as we continue to build the squad towards the end of the season.”