Ecommerce Delivery Based on postcode

I am working on a yet to be published site, it is a delivery business, and I need to be able to give free delivery to local postcodes, and then charge a delivery fee for the surrounding postcodes.

I am a webflow newbie, I have limited the postcodes people can put in using the HTML pattern attribute and regex.

I am capturing the post in a javascript variable (well I am hoping I am) but then I am not sure how to proceed. Is there some way to set the delivery option based on a variable? or activate a PROMO code that would give local postcodes.

Any thoughts would be great.