The Magento-2, the place order is done by the function
savePaymentInformationAndPlaceOrder() and it is defined in two model files.
For guest user , it is invoked from the model
\Magento\Checkout\Model\GuestPaymentInformationManagement and it takes 4 arguments.
1) Quote Id
3) Instance of the \Magento\Quote\Api\Data\PaymentInterface in to which the Payment Method parameters should be set.
The parameters that should be set for the payment method interface should be the following,
If you are custom setting these parameters, you can set this parameters by using the
setData() method of the
\Magento\Quote\Api\Data\PaymentInterface interface instance.
In your case, since the payment method is Cash On Delivery, you should send the payment method parameters in the following way,
4) The fourth and last parameter for the savePaymentInformationAndPlaceOrder() function for guest place order, is the billing address which should be set with the \Magento\Quote\Api\Data\AddressInterface interface instance.
For Logged-In customer, the place order is happening through the
savePaymentInformationAndPlaceOrder() function from the model
\Magento\Checkout\Model\PaymentInformationManagement and it takes 3 parameters.
1) Quote Id
2) Payment method parameters set to the instance of the
3) Billing address parameters set to the instance of
As per my view, your stated error may be fixed if you send the payment method details in the following format,