jQuery is still popular, but if you want to have no dependencies, see below. Short & clear function to find out if radio button is checked on ES-2015:
function getValueFromRadioButton( name ){_x000D_
return [...document.getElementsByName(name)]_x000D_
.reduce( (rez, btn) => (btn.checked ? btn.value : rez), null)_x000D_
}_x000D_
_x000D_
console.log( getValueFromRadioButton('payment') );
_x000D_
<div> _x000D_
<input type="radio" name="payment" value="offline">_x000D_
<input type="radio" name="payment" value="online">_x000D_
<input type="radio" name="payment" value="part" checked>_x000D_
<input type="radio" name="payment" value="free">_x000D_
</div>
_x000D_