How to Add pincode checker without App

Topic summary

A user seeks help implementing a pincode/postal code checker on a Shopify product details page without using a third-party app. They’ve provided a reference website showing the desired functionality and shared existing JavaScript code that isn’t working properly.

Key Requirements:

  • Add pincode checker to product page
  • Step-by-step implementation guidance
  • API integration for delivery verification
  • Solution compatible with their premium theme

Technical Details Shared:
The user posted JavaScript code that:

  • Authenticates with an external API using username/password
  • Retrieves an access token
  • Makes a POST request to check estimated delivery date (EDD) based on source and destination pincodes
  • Uses jQuery AJAX calls

Current Status:
The discussion remains open with no responses yet. The user has indicated willingness to share additional code structure if needed and is specifically looking for code-based solutions rather than app recommendations.

Summarized with AI on October 27. AI used: claude-sonnet-4-5-20250929.

Hello,

I need help to add pincode checker into product details page.

Anyone can share me code how to add pincode checker and any API integration to this functionality.

Please find attached image I want this type of pincode checker.

Please share me step by step code.

Thank You

Hello Daniel,

Thank you for your message.

I have a js code but it is not working.

https://consciouschemist.com/collections/deal-of-the-day/products/pigmentation-corrector-cream-mini?variant=48840871248169

Please check this website pincode check functionality I want this type.

Using same theme

https://consciouschemist.com/collections/deal-of-the-day/products/pigmentation-corrector-cream-mini?..

Please check this website pincode check functionality I want this type.

Using same theme

I have already premium theme.

Please share here code details if you can help.

If you need current code structure I will share here.

const sourePincode = pincode add later;
var accessToken = null;
var getTokenSettings = {
“url”: “https://app.com my url add later”,
“method”: “POST”,
“timeout”: 0,
“headers”: {
“Content-Type”: “application/json”
},
“data”: JSON.stringify({
“username”: “abc@gmail.com”,
“password”: “abc123”
}),
};

$.ajax(getTokenSettings).done(function (response) {
accessToken = response.access_token;
});

function getEDDForPincodes(destPincode) {
var settings = {
“url”: “https://app.com add later”,
“method”: “POST”,
“timeout”: 0,
“headers”: {
“Authorization”: Bearer ${accessToken},
“Content-Type”: “application/json”
},
“data”: JSON.stringify({
“srcPin”: sourePincode,
“destPin”: destPincode
}),
};

$.ajax(settings).done(function(response) {
return response.edd.max;
});
}