Raising a child is difficult enough, but not knowing if that child is yours is a serious concern to bare. Eventually, you may decide that you need a DNA test, even though you love your child. At that point, you'll either be proved to be the biological father or be told you aren't related to the child.
If you find out you aren't related and have been paying child support, you're in a difficult situation. Once you've taken on the role of a parent, it's not as easy as using a DNA test to prove you aren't and to stop paying support.
You have two choices at this point. You can decide to take the other parent to court over the child support payments you paid but didn't owe, or you can attempt to claim legal guardianship of the child.
Becoming a legal guardian
The first thing you can do is become a legal guardian. You'll need to be at least 18 and have the time to care for your child. You'll need to be capable of supporting the child and prove that you are a positive role model.
You'll have to submit a petition. The mother and true biological father may be interviewed along with you to determine what the best path to take is in this case. If the biological father and mother do not offer consent for you to become the legal guardian, that doesn't necessarily mean you can't. It simply becomes more difficult.
Going to court for compensation
Generally speaking, it's difficult to obtain compensation for child support you paid to a child who is not yours, especially if you have acknowledged your paternity in the past. If you have DNA evidence and a strong case, you may be able to have the child support order voided.
Proving paternity is relatively easy, but the legal challenges of maintaining or leaving your relationship with a child can be complicated. Without court approval, you will stay responsible for your child's needs.