Live Shipping Rates API · API2Cart
Live Shipping Rates API for Checkout
Use one live shipping rates API to plug your own real-time rate calculation into a merchant’s checkout — carrier APIs, rate cards, custom logic — on Shopify, WooCommerce, Magento, PrestaShop and more, without building platform-specific shipping integrations.
What Are Live Shipping Rates?
Live shipping rates (also called real-time shipping rates or carrier-calculated shipping) are shipping costs calculated at the moment of checkout from the actual cart: item weight and dimensions, the origin warehouse and the destination address. Instead of a fixed rate table, the shopper sees a real-time carrier rate before paying.
Static shipping tables do not work for every business — freight carriers, regional rate cards and weight-based pricing all need a live calculation at checkout. With the API2Cart live shipping rates API you register a callback service once: when a shopper reaches checkout, the store requests a rate, your callback calculates it, and the result is returned in real time — the same way on every supported platform.
How the Live Shipping Rates API Works
It is a small set of basket methods. Your app registers a rate service for a store, and API2Cart connects it to that store’s checkout.
- basket.live_shipping_service.create — register a rate callback for a store
- Your callback accepts a POST request with basket data and returns live rates
- basket.live_shipping_service.list / delete — manage active services
- order.preestimate_shipping.list — retrieve preestimated shipping methods for an order
Example request
{
"name": "Custom Carrier Rates",
"callback": "https://your-app.com/shipping/rates",
"store_id": "12345"
}
# Your callback receives basket data via POST
# and returns live rates back to checkout.
Real-Time Shipping Rates Integration Without Per-Platform Code
Building a real-time shipping rates integration usually means a separate shipping module for every eCommerce platform: different checkout hooks, authentication and data formats. API2Cart replaces that with one shipping API integration. You connect a store once, register your callback with basket.live_shipping_service.create, and receive the cart in the same format whether the store runs Shopify, WooCommerce or Magento.
This makes it practical to build a multi-carrier shipping API product: your callback can request quotes from several carriers, apply your own markup or rules, and return the best options to checkout. Orders and shipments are available through the same API, so rate shopping and fulfillment can live in one integration.
Use Cases for Live Shipping Rates
Freight & LTL Carriers
Quote real LTL and freight shipping rates for oversized or palletized items at checkout.
Regional Rate Cards
Apply custom zone- or weight-based pricing your carrier API returns.
Multi-Carrier Comparison
Show the shopper live rates from several carriers at once.
Dynamic Promotions
Adjust shipping cost in real time based on cart contents or rules.
Live Shipping Rates by Platform
Shopify Shipping Rates API
On Shopify, API2Cart registers your callback as the store’s carrier-calculated shipping service, so your rates appear in the native Shopify checkout. Shopify allows one live shipping service per store and offers carrier-calculated rates only on eligible plans, so check the merchant’s plan before onboarding. For setup details, see the Shopify shipping rates API guide.
WooCommerce Live Shipping Rates
On WooCommerce, real-time rates work through the API2Cart connector plugin installed in the store. Your callback receives the cart and returns rates to the standard WooCommerce checkout.
Magento Real-Time Shipping Rates
For Magento 2 stores, the same create, list and delete methods add your real-time shipping rates to checkout, so you work with one API instead of a separate Magento shipping integration.
PrestaShop, OpenCart, Lightspeed, Shopline and Zoey
Register the same callback and API2Cart passes your live rates to each platform’s checkout, with one request format across all supported platforms.
Rate services are available on these platforms. See supported API methods for the up-to-date list per platform.
Frequently asked questions
The things people ask before connecting a rate service.
What are live shipping rates?
Shipping costs calculated in real time at checkout from the cart contents, package weight and destination, instead of a fixed rate table. They are also called real-time shipping rates or carrier-calculated shipping.
How does the live shipping rates API work?
You register a callback with basket.live_shipping_service.create. At checkout the store sends the basket data to your callback, your service returns the rate, and the shopper sees it right away.
Can I register more than one rate service?
Yes — basket.live_shipping_service.list shows every active service per store.
What if my callback is slow or fails?
Design your callback to respond quickly — checkout is waiting on it synchronously, so treat it like any real-time API.
Is this available on every platform?
No. It works on platforms whose checkout accepts an external rate service: Shopify, WooCommerce, Magento 2, PrestaShop, OpenCart, Lightspeed, Shopline and Zoey. Other API2Cart methods, such as orders and shipments, cover many more platforms.
Does it work with Shopify?
Yes. API2Cart registers your callback as the store’s carrier-calculated shipping service. Shopify allows one live shipping service per store and offers carrier-calculated rates only on eligible plans.
Do I need a plugin for WooCommerce?
Yes. On WooCommerce, real-time rates work through the API2Cart connector plugin installed in the store.
Does it support Magento?
Yes. Magento real-time shipping rates are supported for Magento 2 through the same basket.live_shipping_service methods.
Simplify Shipping API Integrations with API2Cart
Explore the full API2Cart API reference.
See the dedicated guide: Live Shipping Rates documentation.
New to the topic? Read what live shipping rates are and how they work. Building for Shopify? See the Shopify shipping rates API guide.
What are live shipping rates?
Shipping costs calculated in real time at checkout from the cart contents, package weight and destination, instead of a fixed rate table. They are also called real-time shipping rates or carrier-calculated shipping.
How does the live shipping rates API work?
You register a callback with basket.live_shipping_service.create. At checkout the store sends the basket data to your callback, your service returns the rate, and the shopper sees it right away.
Can I register more than one rate service?
Yes — basket.live_shipping_service.list shows every active service per store.
What if my callback is slow or fails?
Design your callback to respond quickly — checkout is waiting on it synchronously, so treat it like any real-time API.
Is this available on every platform?
No. It works on platforms whose checkout accepts an external rate service: Shopify, WooCommerce, Magento 2, PrestaShop, OpenCart, Lightspeed, Shopline and Zoey. Other API2Cart methods, such as orders and shipments, cover many more platforms.
Does it work with Shopify?
Yes. API2Cart registers your callback as the store’s carrier-calculated shipping service. Shopify allows one live shipping service per store and offers carrier-calculated rates only on eligible plans.
Do I need a plugin for WooCommerce?
Yes. On WooCommerce, real-time rates work through the API2Cart connector plugin installed in the store.
Does it support Magento?
Yes. Magento real-time shipping rates are supported for Magento 2 through the same basket.live_shipping_service methods.