Kindly keep the cash ready to pay the courier agent at the time of delivery. The courier delivery person will typically not wait for you to go and withdraw cash from the nearby ATM. However, if he has some other delivery planned in the area, he might want to come back in some time to deliver the parcel again. In such case you will need to directly co-ordinate with him.