Victoria's public transport authority has had to pay back more than $1 million after its ticketing system was hit by an online scam.

Public Transport Victoria (PTV) is urging commuters to buy myki public transport cards from authorised dealers, or risk them being blocked, after an online scam in which money was stolen from foreign credit cards.

If it's too good to be true: Cheap myki cards sold online will be refused by PTV. Credit:Jessica Shapiro

The stolen money was then used to top up myki cards which were onsold to commuters for a reduced price, often on sites such as Gumtree or eBay.

PTV director of customer services Alan Fedda said credit card holders had reported odd transactions to their banks, who in many cases paid the money back.