Advance Half payment Cash on delivery

To all my Indian brothers, Congrats on successful landing on the moon, and also I need help as you know Cash on delivery is most important mode of payment but it is mostly unreliable and risky as sometimes customers doesn’t pay for it, So it is possible to setup third party local payment in such a way that some amount must be paid in advance if you opt for the COD. Wordpress has some apps for this purpose, Is there any way we can setup this in shopify? half advance payment COD and remaining on delivery.