Bringing up this old question from the past, but only so that it does not deceive anyone else who googles in the future: Paul's answer above is NOT CORRECT. These two APIs do not replace each other and cannot be used in the same transactions.
The difference is as follows:
DoVoid cancels (aka releases) the order or authorization that the seller made with the client. Refund cancels (aka returns) the sale that the seller made with the customer. So, if all you have done is to place an order or authorization, but you have not collected the funds, call DoVoid (); any funds held in the buyer's account pending withdrawal will be released, and you will not be able to capture funds against this order or authorization later.
If you have already completed the sale (you raised funds, either through PaymentAction = Sale during verification or by seizing previously authorized funds), you need to call Refund () to return this money to the buyer.
- Glenn from PayPal (yes, I wrote one of these APIs :)
source share