Policies vary by airline; there's not a universal rule. For example, British Airways allows customers to cancel a flight booking and claim a full refund without penalty up to 24 hours from when the original booking was made. easyJet does the same but charges an admin fee.