Until when can a transaction be refunded?

This depends on your acquirer, see this table:
Acquirer
Refund
AMEX
Please contact your account manager
Concardis
until 23:59 of the same day
Credorax
always
ICP
Please contact your account manager
Elavon
Please contact your account manager
Mercantile
Mastercard and Visa: until 90 days after the transaction
Maestro and Visa Electron: until 19:00 of the same day
Privatbank
Please contact your account manager
SIX
the most recent transaction of the same day
In case you need to refund an older transaction, contact [email protected]with the transaction details (transaction identifier, amount, timestamp of original transaction).