Check delivery address before clicking Pay now

i have my own api which takes postal code and product and gives me if that area is deliverable or not .I want to call the deliveryChecking function when user hits Pay Now .if the product and area is deliverable then order will be created else not . how to do this ??