Shipping options
Shipping options
Shipping configuration answers two questions: where a method can deliver, and what it costs for this cart. Thor exposes zones, methods, and rates so checkout can select eligible options from the buyer’s current address and commerce context.
Zones, methods, and rates
A zone groups the country locations a method serves. A method describes the delivery option and can associate zones, channels, and an eligibility predicate. Rates provide a fixed money amount or a relative amount and can have their own predicates and tax behavior.
For a standard-delivery option with a free-shipping threshold, distinguish the method from the conditions on its rates. Test the exact threshold and currencies you support. Use cart predicates for conditions on cart contents, amounts, or customer context.
Let the cart resolve the choices
Set the required shipping address before reading availableShippingMethods.
Display returned methods and rates rather than maintaining a separate frontend list of country prices.
After the buyer changes an address or cart contents, refresh the options and verify the selected rate is still valid.
A valid method in Admin may be absent from a particular cart because its zone, currency, channel, or predicate does not match. Debug those inputs before changing the display logic.
Custom and external delivery
Use custom shipping lines only when your integration deliberately supplies the shipping amount. For an external shipping integration, verify the supported public contract and handle unavailable-rate responses as part of checkout recovery.
Follow Build a cart and checkout for selection and ShippingMethodRateCreateInput for rate configuration.