I totally agree, again, this has nothing at all to do with him "not being used to perches or being kept in a flat box", as he is a tame, hand-raised bird that knows how to step-up, so he is very familiar with perches and that is not the problem...plus, as you state, "he can grip with the right foot, but it's weak", and that is enough to indicate that something is very wrong. He could have fallen or gotten his foot caught in something and twisted it, either on the way home, or since you put him in his new cage. Any number of things could have happened to it, either way he's obviously in pain, and he needs an x-ray and pain medication from an Avian Vet.
Here's what you need to remember right now, he's a very young bird who just weaned, and he's still got a lot of growing to do. If he has a broken bone, a torn ligament/tendon, a dislocation, etc. in either his foot or his leg, it could very well not only effect his growth and development, but it could become permanent and cause him to be permanently disabled and not be able to perch comfortably or safely for the rest of his life. That's why I mention Bumblefoot as an example of the many developmental issues that young birds can have which cause permanent physical disabilities.
Most importantly, your bird is in pain and needs at least a prescription for Metacam or Toradol, and an x-ray to rule-out a fracture...AT HIS AGE, IF HE HAS A FRACTURE SOMEWHERE, EVEN A HAIRLINE FRACTURE, AND IT'S NOT PROPERLY SET AND STABILIZED, HE COULD BE THIS WAY FOR THE REST OF HIS LIFE, AND A BIRD THAT CAN'T PERCH IS A PROBLEM. IT'S NOT FAIR TO HIM.
I'd also call the breeder and tell them what's going on, tell them that he has an obvious foot or leg injury, that he's had it since you brought him home and that you haven't seen him fall or do anything that would have caused it, and ask them if they are aware of any fall or accident that he had before you picked him up, or maybe a fight with one of his siblings, etc. The breeder should have never, ever let a newly-weaned baby bird go to it's new home with a possible injury, that's an old trick that breeders of all types of animals/pets do to avoid having to pay a vet bill, they send the animal to it's new home and then when the new owner calls them and tells them something is wrong with their new pet, the breeder plays stupid and says that they were fine when they left their care...If he truly came to you that way and you noticed this immediately when you got him home from the breeder's house, then that breeder should be stepping-up and paying the vet bills.
Either way, you need to get him to an Avian Vet or at least an Exotics Vet immediately, as he's in pain and needs medical attention immediately before it gets worse. Again, has nothing at all in any way to do with not being perch-trained or anything of the sort, it's an injury.