Yes, in most cases you can start a cancellation through the API, though how much of it completes automatically depends on the airline and the fare your customer bought. The API gives you a cancel request you can send against an existing booking, and for many airlines that is all that is needed. For others the request is accepted and then has to be worked through by hand with the airline before the money side is settled, so you should treat the API call as the start of the process rather than the end of it in every case.
The cleanest situation is a ticket cancelled very soon after it was issued, while the airline still allows it to be voided. In that window the ticket is usually cancelled in full with no penalty. Once that window has passed you are into refund territory instead, and the fare rules decide what comes back. Some fares give a useful refund, some give very little, and some give nothing beyond the taxes that the airline is obliged to return. Low cost carriers often work differently again and may hold the value as a credit rather than refunding it at all.
Refunds are also slower than cancellations. The airline has to assess the request and then return the money through the same chain it came in on, so there is normally a wait before you see it, and we cannot speed up an airline that is being slow. What we can do is show you the status of the request against the booking so you are not left guessing and can tell your customer where things stand.
Before you promise anything to a customer, check the fare rules shown at the time of booking and confirm with us which of your connected airlines support straight through cancellation on your plan.