Can a Shopify plugin call an external API before completing an order?

Good Afternoon!

Thanks in advance for your help.

I haven’t work with Shopify before and I need to know if it’s possible to create a Shopify plugin that would call an external API just before an order gets completed and base on the response the order would continue or not?

I’m not sure if I clarify my question enough.