ShoppingCartModifier is used in B2B context. Not sure, you are in B2B implementation.
If it is B2C, you can refer to the below link for creating the payment groups.
Hope this helps.
Keep posting the updates.
Thanks for reply.
This issue is related to B2C implementation.But I don't think ShoppingCartModifier only used for B2B implementation. I have seen many B2C application their they used ShoppingCartModifier.
My requirement is to feed the credit card details through UI and pass the details to the FormHandler and create creditCardPaymentGroups with all details.So that in next page
We can pass payment method(credit card) to the CartModifierFormHandler.order.paymentGroup and iterate those details.