For domestic fares, the 'M' as last character in fare basis code indentifies it as refundable. The equivalent non-refundable variant of this fare has an 'N' as last letter. The 'D' in second to last character identifies it as an Economy fare. The equivalent BE variant of fare will have a 'B' (which are always non-refundable and thus always end in 'BN').
UA refundable fares have following in fare rules.
For non-refundable fares, it will say this