Steam refunds explained: Check the purchase date and playtime first
For a game or software purchase on Steam, Valve's usual refund window is within 14 days of purchase and under two hours of playtime. Those are two separate checks. Briefly opening a game doesn't by itself make a purchase months ago eligible under the standard window, and a recent purchase doesn't make the playtime limit disappear. Valve also says you can submit a request outside the standard rules for review, but that isn't a promise it will be approved.
To request a refund, open Steam Support, sign into the account that made the purchase, and find the purchase you're asking about. Follow the refund option if Steam shows it and check the purchase details before submitting. The reason and the option Steam offers for returning the money can differ by purchase. Valve says approved refunds generally go back to the original payment method where available, or to your Steam Wallet when the original method isn't supported. Check what the request actually says before expecting funds in a particular place.
Not everything sold through Steam follows the ordinary game rule. DLC, bundles, pre-purchases, gifts, and in-game purchases can have their own conditions. Valve also does not refund purchases made outside Steam through its ordinary refund process. If you used a third-party store or activated a code you bought elsewhere, check that seller's policy rather than assuming that the game appearing in Steam proves Valve sold it to you.
A refund request is not complete when you select a reason. Keep the confirmation and check the actual status. If you're testing whether a game runs or whether its controls work for you, an early test gives you more room to decide than leaving the game open for hours and trying to reconstruct the playtime afterward. Valve's policy page is the place to verify the rule for the exact item you bought.
Source: Valve’s official Steam Refunds policy.
Updated