Hi all,
I'm currently trying to set up a connection to our UPS account in our Magento 2.4.7 store. I've set all the settings and UPS API credentials - according to UPS - correctly but am still not seeing any rates on the frontend of our store. The var/log/shipping.log Log gives me the following output (I've replaced our account number with <account> for security purposes):
[2025-02-17T01:05:13.538915+00:00] main.DEBUG: array ( 'request' => '{ "RateRequest": { "Request": { "TransactionReference": { "CustomerContext": "Rating and Service" } }, "Shipment": { "Shipper": { "Name": "UPS", "ShipperNumber": "<account>", "Address": { "AddressLine": [ "01" ], "City": "Stans", "StateProvinceCode": "NW", "PostalCode": "6370", "CountryCode": "CH" } }, "ShipTo": { "Address": { "AddressLine": [ "01" ], "StateProvinceCode": "NSW", "PostalCode": "2060", "CountryCode": "AU", "ResidentialAddressIndicator": "01" } }, "ShipFrom": { "Address": { "AddressLine": [], "StateProvinceCode": "NW", "PostalCode": "6370", "CountryCode": "CH" } }, "ShipmentRatingOptions": { "TPFCNegotiatedRatesIndicator": "Y", "NegotiatedRatesIndicator": "Y" }, "Package": [ { "PackagingType": { "Code": "00", "Description": "Packaging" }, "Dimensions": { "UnitOfMeasurement": { "Code": "CM", "Description": "Centimeter" }, "Length": "0", "Width": "0", "Height": "0" }, "PackageWeight": { "UnitOfMeasurement": { "Code": "KGS" }, "We ight": "0.1" } } ] } } }', 'result' => '{"RateResponse":{"Response":{"ResponseStatus":{"Code":"1", "Description":"Success"}, "Alert":[{"Code":"110971", "Description":"Your invoice may vary from the displayed reference rates"}, {"Code":"111685", "Description":"TPFCNegotiatedRatesIndicator is applicable only for Third party/Freight Collect shipments."}], "TransactionReference":{"CustomerContext":"Rating and Service"}}, "RatedShipment":[{"Service":{"Code":"07", "Description":""}, "RatedShipmentAlert":{"Code":"110971", "Description":"Your invoice may vary from the displayed reference rates"}, "BillingWeight":{"UnitOfMeasurement":{"Code":"KGS", "Description":"Kilograms"}, "We ight":"0.5"}, "TransportationCharges":{"CurrencyCode":"CHF", "MonetaryValue":"391.15"}, "ServiceOptionsCharges":{"CurrencyCode":"CHF", "MonetaryValue":"0.00"}, "TotalCharges":{"CurrencyCode":"CHF", "MonetaryValue":"391.15"}, "NegotiatedRateCharges":{"TotalCharge":{"CurrencyCode":"CHF", "MonetaryValue":"387.24"}}, "RatedPackage":{"We ight":"0.1"}}, {"Service":{"Code":"08", "Description":""}, "RatedShipmentAlert":{"Code":"110971", "Description":"Your invoice may vary from the displayed reference rates"}, "BillingWeight":{"UnitOfMeasurement":{"Code":"KGS", "Description":"Kilograms"}, "We ight":"0.5"}, "TransportationCharges":{"CurrencyCode":"CHF", "MonetaryValue":"417.40"}, "ServiceOptionsCharges":{"CurrencyCode":"CHF", "MonetaryValue":"0.00"}, "TotalCharges":{"CurrencyCode":"CHF", "MonetaryValue":"417.40"}, "NegotiatedRateCharges":{"TotalCharge":{"CurrencyCode":"CHF", "MonetaryValue":"413.23"}}, "RatedPackage":{"We ight":"0.1"}}, {"Service":{"Code":"54", "Description":""}, "RatedShipmentAlert":{"Code":"110971", "Description":"Your invoice may vary from the displayed reference rates"}, "BillingWeight":{"UnitOfMeasurement":{"Code":"KGS", "Description":"Kilograms"}, "We ight":"0.5"}, "TransportationCharges":{"CurrencyCode":"CHF", "MonetaryValue":"543.05"}, "ServiceOptionsCharges":{"CurrencyCode":"CHF", "MonetaryValue":"0.00"}, "TotalCharges":{"CurrencyCode":"CHF", "MonetaryValue":"543.05"}, "NegotiatedRateCharges":{"TotalCharge":{"CurrencyCode":"CHF", "MonetaryValue":"537.62"}}, "RatedPackage":{"We ight":"0.1"}}, {"Service":{"Code":"65", "Description":""}, "RatedShipmentAlert":{"Code":"110971", "Description":"Your invoice may vary from the displayed reference rates"}, "BillingWeight":{"UnitOfMeasurement":{"Code":"KGS", "Description":"Kilograms"}, "We ight":"0.5"}, "TransportationCharges":{"CurrencyCode":"CHF", "MonetaryValue":"365.85"}, "ServiceOptionsCharges":{"CurrencyCode":"CHF", "MonetaryValue":"0.00"}, "TotalCharges":{"CurrencyCode":"CHF", "MonetaryValue":"365.85"}, "NegotiatedRateCharges":{"TotalCharge":{"CurrencyCode":"CHF", "MonetaryValue":"362.19"}}, "RatedPackage":{"We ight":"0.1"}}]}}', ) [] []
Hello @maxmosimann_1,
If UPS rates from the UPS Rates REST API are not being displayed on the frontend in Magento 2, there are several potential reasons for this issue.
Check for API Connection Issues:
Sometimes, issues may occur due to network problems or issues connecting to the UPS API. You can test whether the API connection is working by using the UPS API test tools or checking the server logs for any issues related to API calls.
You can check var/log/system.log or var/log/exception.log in Magento to see if there are any error messages related to UPS API connectivity.
Incorrect Shipping Configuration for Product:
Ensure that the products in your store are set up correctly with the appropriate heft and dimensions since UPS requires these parameters to calculate rates. Products without proper heft or dimension values may not trigger the UPS rate API properly.
Hope it helps !
If you find our reply helpful, please give us kudos.
A Leading Magento Development Agency That Delivers Powerful Results, Innovation, and Secure Digital Transformation.
WebDesk Solution Support Team
Get a Free Quote | | Adobe Commerce Partner | Hire Us | Call Us 877.536.3789
Thank You,
WebDesk Solution Support Team
Get a Free Quote | Email | Adobe Commerce Partner | Hire Us | Call Us 877.536.3789
Location: 150 King St. W. Toronto, ON M5H 1J9
Thank you @johnwebdes40a5 for your assistance! In my initial request, I did copy in the results from my var/log/shipping.log file. As you can see, the API connection is successful and returns a successful response too. However, this is not being rendered to the front-end correctly. The API response lists all the correct rates, but it seems Magento doesn't parse this response correctly.
I did some further reading and found a comment from someone on Stackoverflow (I can't find the post anymore) mentioning that the Magento standard UPS shipping method does not support any other UPS accounts besides UPS USA accounts. This isn't very encouraging but I guess just the way it is. Or can you confirm this is wrong and that using a non-USA UPS account works?