Credit cards are widely accepted, especially in upscale or tourist-oriented businesses. Visa is the most widely accepted card, with Master Card a close second and venerable American Express a distant third. Conversion is at the official exchange rate, though merchants may tack on a surcharge of 7% to offset the amount they are charged by credit card companies for each transaction.
When paying with cash you are often given a 5-10% discount off the purchase price. So it pays to carry and pay with cash in Costa Rica.