Welcome to Flyertalk!
Many airport locations accept credit cards, or will take local currency, USD, Euros, etc. You mention PEK, but your title mentions Indonesia. Some serious airport ripoffs at the money exchange in Bali.
ATM withdrawals can be ok. In Indonesia it's quite important to have bills that are in new condition. 2003 or newer bills, no tears, marks, etc.