I don't know if you are an enterprise in the bonded area. If it is an enterprise in the bonded area, it does not need to import customs clearance from the bonded area to pay at home and abroad.
And if you are an enterprise outside the bonded area, that is the form of tripartite trade. The regulations in this respect are really hard to find. It is recommended to consult the local safe directly. Theoretically, you should make the situation clear and provide your contract with the head office and your contract with Company A. ..