At its simplest, if the mother is not cooperating, you would need the court to issue and order finding that you are not the father of the child and dismissing you from the case. However, depending on the particular facts of your case, there are several things that could complicate the process. First, were you and the mother ever married to each other? Second, did you ever sign an acknowledgement of paternity? What has happened so far in court (if anything). All of these factors may impact what you can do. Also they invoke various time limits that limit how long you have to act. So, if the mother refuses to cooperate, you should contact a family law attorney in your area, to get assistance.
Time is important in this area. Before you get there, though, perhaps you could indicate why you are paying support. Was there a court order? How old is the order? Why was a paternity test given and who, if anyone, ordered it? Was the court order, assuming there is one, a temporary order or a permanent order? You need to be aware of all of these issues before you can find an answer to your question.
If you have waited too long it may be that you are out of luck getting such an order.