- Request rates from your backend, with credentials kept off the storefront.
- Rate the packed shipment, including its destination and delivery requirements.
- Refresh results when shipment details change.
Start with the shipment, not the cart total
A customer sees a cart. A shipping service needs a shipment. Those are different data models. A cart lists products and quantities. A shipment adds an origin, destination, shipping date, packaging and handling requirements. Your integration turns the first into the second before requesting real-time rates, or RTR.
For a custom store, this preparation belongs in your backend. Read the product dimensions and weights, choose a packing plan and resolve the shipping origin. A box containing three products is one packed unit. Its outside measurements and total shipping weight matter more than a simple sum of catalogue dimensions.
Connect the storefront through your backend
Keep the Freightcom token in server-side configuration. Your browser sends checkout details to your own application. The backend validates those details, requests rates and returns the shipping options intended for the customer. This separation also gives you a place to apply pricing rules and store request references.
- Collect the delivery address and validate the cart.
- Create the parcel or pallet packing plan.
- Request eligible rates through your backend.
- Retrieve the results and display the available services.
- Save the selected service alongside the order.
Your application owns the storefront experience. The API supplies shipping information. Keep their responsibilities explicit so a checkout redesign does not require rewriting the shipping integration.
Make the customer’s choice clear
Show a readable service name, the shipping amount, its currency and any available transit estimate. Explain whether taxes or other charges appear separately. A transit estimate is different from a guaranteed arrival date. Present the information returned for the selected service without inventing a promise.
Use an explicit loading state while results arrive. A message such as “Finding shipping options” is more useful than an empty panel. When no eligible service is returned, offer a clear next step, such as reviewing the address or requesting help. Never substitute a zero-dollar price for an error.
Refresh rates when the order changes
A rate belongs to a particular shipment snapshot. Changing a postal code, quantity, box, pallet or access requirement changes the input. Your application should invalidate the earlier selection and request fresh options. The same rule applies when your fulfilment team chooses a different origin.
Avoid unnecessary requests on every keystroke. Wait for a usable address and a stable packing plan. Keep the request associated with a checkout revision so a slower response from an earlier address does not overwrite the latest results. Before booking, compare the final shipment with the details used for the selected rate.
Test the difficult checkout states
Include empty results, slow results, invalid addresses, an edited cart and a customer returning to an older checkout. Test parcels and pallets as separate scenarios. A successful happy-path request does not establish the behaviour of the whole checkout.
Track time to usable options, the share of checkouts receiving no service and how often customers change delivery details. Those measures point to packing-data or user-interface issues without assuming every abandoned order is a shipping problem. Start with a narrow, supported shipment profile, then expand after your team has reviewed the results.
Common questions
Does the API replace my checkout?
No. Your store keeps its checkout. Your backend connects shipment details to Freightcom and returns eligible shipping choices.
Should a changed address trigger new rates?
Yes. Treat a changed destination, packing plan or handling requirement as a new shipment snapshot.
References & next steps
This article provides integration planning guidance. Confirm endpoint fields and behaviour in the official documentation before implementation.

