skills/fulfillment-shipping/shipping-rate-calculator/SKILL.md
Show real-time shipping rates from UPS, FedEx, USPS, and DHL at checkout by integrating directly with each carrier's rate API
npx skillsauth add finsilabs/awesome-ecommerce-skills shipping-rate-calculatorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Showing real-time shipping rates at checkout — from UPS, FedEx, USPS, DHL — lets customers choose their preferred service and prevents you from under- or overcharging for shipping. Every major platform supports carrier-calculated rates natively or through apps, and a multi-carrier rate shopping tool can save you 15–40% on shipping costs by automatically selecting the cheapest option.
| Platform | Recommended Tool | Why | |----------|-----------------|-----| | Shopify | Shopify Shipping (built-in) or Easyship / ShipStation for rate shopping | Shopify Shipping gives discounted USPS, UPS, DHL rates; Easyship adds 250+ carrier options and rate shopping | | WooCommerce | WooCommerce Shipping (USPS/DHL) + Table Rate Shipping for custom rules | WooCommerce Shipping handles basic carrier rates; Table Rate Shipping adds weight/zone-based rule tables | | BigCommerce | ShipperHQ or Easyship | ShipperHQ is the most powerful rate management tool for BigCommerce with dimensional rate calculation | | Custom / Headless | EasyPost or Shippo as a carrier meta-API | Both aggregate UPS, FedEx, USPS, DHL into a single API call — far simpler than integrating each carrier directly |
Shopify Shipping (built-in, free, recommended starting point):
For more carrier options (FedEx, regional carriers, international):
For flat-rate and free-shipping rules:
WooCommerce Shipping (USPS + DHL, free):
WooCommerce Table Rate Shipping (for complex rules, e.g., weight tiers, custom zones):
ShipStation for WooCommerce (multi-carrier rate shopping):
ShipperHQ (most powerful option for BigCommerce):
BigCommerce built-in real-time rates:
Use EasyPost or Shippo as a meta-API to get rates from all carriers in one call — far simpler than integrating UPS, FedEx, USPS, and DHL separately:
import EasyPost from '@easypost/api';
const easypost = new EasyPost(process.env.EASYPOST_API_KEY);
// Get multi-carrier rates for a shipment
async function getShippingRates(params: {
originZip: string;
destinationZip: string;
destinationCountry: string;
weightOz: number;
lengthIn: number;
widthIn: number;
heightIn: number;
}): Promise<{ carrier: string; service: string; rateCents: number; estimatedDays: number }[]> {
const shipment = await easypost.Shipment.create({
from_address: {
zip: params.originZip,
country: 'US',
},
to_address: {
zip: params.destinationZip,
country: params.destinationCountry,
},
parcel: {
length: params.lengthIn,
width: params.widthIn,
height: params.heightIn,
weight: params.weightOz, // EasyPost uses oz
},
});
return shipment.rates.map(rate => ({
carrier: rate.carrier,
service: `${rate.carrier} ${rate.service}`,
rateCents: Math.round(parseFloat(rate.rate) * 100),
estimatedDays: rate.est_delivery_days ?? 5,
})).sort((a, b) => a.rateCents - b.rateCents);
}
// Apply store-level rules on top of carrier rates
function applyShippingRules(params: {
carrierRates: { carrier: string; service: string; rateCents: number; estimatedDays: number }[];
cartSubtotalCents: number;
freeShippingThresholdCents: number;
}): { label: string; rateCents: number; estimatedDays: number }[] {
const rates = [...params.carrierRates];
// Add free shipping option if eligible
if (params.cartSubtotalCents >= params.freeShippingThresholdCents) {
rates.unshift({ carrier: 'store', service: 'Free Shipping', rateCents: 0, estimatedDays: 7 });
}
// Show max 3 options to avoid choice paralysis:
// 1. Free (if available)
// 2. Cheapest paid option
// 3. Fastest guaranteed option
const freeOption = rates.find(r => r.rateCents === 0);
const cheapestPaid = rates.filter(r => r.rateCents > 0).sort((a, b) => a.rateCents - b.rateCents)[0];
const fastest = rates.filter(r => r.estimatedDays <= 2).sort((a, b) => a.estimatedDays - b.estimatedDays)[0];
return [freeOption, cheapestPaid, fastest]
.filter(Boolean)
.filter((r, i, arr) => arr.findIndex(x => x?.service === r?.service) === i) // deduplicate
.map(r => ({ label: r!.service, rateCents: r!.rateCents, estimatedDays: r!.estimatedDays }));
}
Carriers charge based on the greater of actual weight vs. dimensional weight. Always configure this.
Shopify:
WooCommerce:
ShipperHQ:
Manual check for dimensional weight:
Too many shipping options cause checkout abandonment. Best practice:
Remove everything in between (3-day, 5-day, etc.) — customers don't need 6 options.
In ShipperHQ: use "Rate Filters" to show only specific service levels. In Easyship: configure "Checkout Rules" to limit displayed options.
| Problem | Solution | |---------|----------| | Carrier API returns no rates for a valid address | Check if the address is a PO Box (UPS/FedEx don't deliver to PO Boxes); fall back to USPS for PO Boxes | | Checkout shows lower shipping cost than order total charged | Recalculate the final shipping rate in your order confirmation logic, not just at cart; rates can change between cart and checkout | | Large light items get expensive rates | Enable dimensional weight calculation; most carriers use DIM weight for large boxes — ShipperHQ handles this automatically | | Rate requests make checkout slow (3+ seconds) | Use a carrier aggregator (EasyPost/Shippo) instead of individual carrier APIs; aggregate has better response times |
tools
Let shoppers save products to a wishlist, share it with friends, and get notified when saved items come back in stock or drop in price
development
Build a themeable storefront with design tokens and CSS custom properties that supports white-labeling, multi-brand variants, and dark mode
development
Speed up product discovery with instant search suggestions, fuzzy typo matching, and category-aware results powered by Algolia or Elasticsearch
development
Build a mobile-first storefront with thumb-friendly navigation, sticky add-to-cart buttons, and touch-optimized components for high mobile conversion