Personalized checkout and custom promotions with Shopify Scripts
Hello,
I am attempting to create a section to add onto our product pages which will allow our customers to calculate their delivery cost before adding the product to their cart.
I have got the code working how I want it to, however I need the delivery API so that I can get it to show the correct delivery rates that we offer on our store.
Can you tell me what the best way to do this is or is there an app already out there that we can use to do this for us?
Hi @Kreeveyates
I am from Mageplaza - Shopify solution expert.
You're on the right track—Shopify doesn’t provide a public "Delivery API" per se, but there are ways to access shipping rates dynamically, either via Shopify’s CarrierService API or third-party apps. Below is a breakdown of the best options:
Best Options for Adding Delivery Rate Estimator to Product Pages
1. Use Shopify's CarrierService API (Custom App)
This is the most native and customizable solution if you're building it yourself.
Overview:
How It Works:
Requirements:
2. Use a Third-Party App (No Code Needed)
If you want a simpler route, here are the top apps that let customers estimate shipping on product pages:
Shipping Rates Calculator Plus by Code Black Belt
Estimated Shipping Cost by Websyms
Notes if You're Building It Yourself
If you're pulling rates before the checkout, there's no official Storefront API support to get shipping rates (Shopify restricts this to prevent misuse). So you either:
Recommendation:
Please let me know if it works as expected!
Best regards!
Mageplaza | Top-Rated Shopify Agency | Trusted by 230,000+ worldwide merchants
If our suggestion works for you, please give it a Like or mark it as a Solution!
Should you have any questions or concerns, feel free to contact us via consultant@mageplaza.com
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025