Vladimir Putin has signed a decree stating buyers "must open rouble accounts in Russian banks" from Friday.
"Nobody sells us anything for free, and we are not going to do charity either - that is, existing contracts will be stopped," the Russian president said.
Mr Putin's demand is being seen as an attempt to boost the rouble, which has been hit by Western sanctions.
His decree means foreign buyers of Russian gas would have to open an account at Russia's Gazprombank and transfer euros or US dollars into it.
Gazprombank would then convert this into roubles which will then be used to make the payment for gas.
Though the order comes into effect for gas exported from Friday onwards, the payments for that gas will not be paid by European buyers until mid-May, Dr Jack Sharples, a research fellow at the Oxford Institute for Energy Studies told the BBC.
That suggests there may not be an immediate threat to supplies.
Mr Putin said the switch to roubles was meant to strengthen Russia's sovereignty, and it would stick to its obligations on all contracts, if Western nations obliged.
Germany said the change announced by Mr Putin amounted to "blackmail".
Since Russia invaded Ukraine, Western nations have issued economic and trading sanctions on Russia, but the European Union has not placed bans on oil or gas, unlike the US and Canada, as its member nations rely heavily on it.
The EU gets about 40% of its gas and 30% of its oil from Russia, and has no easy substitutes if supplies are disrupted. Meanwhile, Russia currently gets €400m (£340m) per day from gas sales to the bloc and it has no way of rerouting this supply to other markets.