How to set up UPS COD?

How do I setup UPS C.O.D. in CS-Cart? COD is both a shipping method, as a payment method. COD costs are different per shipping method and not all shipping methods have a COD option.

In the shipping methods there is no function to select this.

IN the payment methods I see a C.O.D. method, but that is offline only. It does not allow you to select UPS as the payment processor.

I could just add the C.O.D. payment method and allow customers to select this as a payment method.

But what if the selected shipment method or the customer location does not allow for COD?

And how do I get this added to my UPS account? How will UPS know this is not a normal shipment, but a COD shipment?

Unfortunately the knowledge base does not cover COD.