Mandatory vaccination, including for COVID-19, can be ethically justified if the threat to public health is grave, the confidence in safety and effectiveness is high, the expected utility of mandatory vaccination is greater than the alternatives, and the penalties or costs for non-compliance are proportionate. I describe an algorithm for justified mandatory vaccination. Penalties or costs could include withholding of benefits, imposition of fines, provision of community service or loss of freedoms. I argue that under conditions of risk or perceived risk of a novel vaccination, a system of payment for risk in vaccination may be superior. I defend a payment model against various objections, including that it constitutes coercion and undermines solidarity. I argue that payment can be in cash or in kind, and opportunity for altruistic vaccinations can be preserved by offering people who have been vaccinated the opportunity to donate any cash payment back to the health service.