Reaching out to server to update product at checkout

I want to update the product image for an item at checkout based on customer input. For example, let’s say I have a blank T-shirt and when a customer enters a line of text, I would update the image of the T-shirt to include the customized T-shirt with the text they entered.

I would like to be able to do this by reaching out to a separate server location which will take the input (text) information, perform the necessary functions and output the updated image.

Is this possible, and if so what is the best way to do something like this?

I’m new to Shopify so apologies if this is not the best location or if it’s a simple answer, but any help is appreciated.

Ryan