Shipping
Shipping rates are fetched in real time from FedEx and UPS during checkout.
Where to configure
Admin: tenant configuration (Edit Source) — enter carrier credentials:
| Field | Purpose |
|---|---|
fedex_account | FedEx account number |
fedex_api_key | FedEx API key (encrypted) |
ups_account | UPS account number |
ups_api_key | UPS API key (encrypted) |
ship_from_* | Origin address (name, address1, city, state, zip, country) |
free_shipping_threshold | Cart total above which shipping is free |
API keys are encrypted at rest via CredentialEncryption.
Rate fetching
At checkout, after the customer enters their shipping address:
- Frontend calls
POST /checkout/shipping-rateswith cart ID and address - Backend:
- Loads cart to calculate total weight (sum of variant weights × quantities)
- Instantiates FedExProvider and UPSProvider if credentials exist
- Calls both in parallel, merges the results
- Sorts by price (cheapest first)
- Returns rates — customer picks one
Supported services
FedEx:
- Ground / Home Delivery
- Express Saver
- 2-Day
- Standard Overnight
- Priority Overnight
UPS:
- Ground
- 3-Day Select
- 2nd Day Air
- Next Day Air Saver
- Next Day Air
- Next Day Air Early
Rate response
Each rate returns:
carrier("FedEx" or "UPS")service(human-readable name)service_code(provider-specific code)pricein dollarsestimated_deliverydatetransit_days
Free shipping
If free_shipping_threshold is set and cart subtotal ≥ threshold, the checkout displays "Free shipping applied" and shipping cost is $0.
USPS + automated tracking (planned)
See the shipping integration planning notes for upcoming support for USPS rates, automated label generation, and real-time tracking webhooks.