/** Retrieve the transfer type used for the payment */
 private TransferType validateTransferType(
     final MobileActionContext context, final AccountOwner to) {
   final TransferTypeQuery query = new TransferTypeQuery();
   query.setUniqueResult();
   query.setFromAccountType(context.getCurrentAccountType());
   query.setChannel(context.getChannel());
   query.setContext(TransactionContext.PAYMENT);
   query.setFromOwner(context.getAccountOwner());
   query.setToOwner(to);
   query.setUsePriority(true);
   final List<TransferType> types = transferTypeService.search(query);
   if (types == null || types.isEmpty()) {
     throw new MobileException("mobile.payment.error.noTransferType");
   }
   return types.get(0);
 }