cancel
Showing results for 
Search instead for 
Did you mean: 

UPS Rates not showing in

UPS Rates not showing in

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"}}]}}',
) [] []
According to the log, we're getting a successful response. However, the frontend shows the following error message:
Screenshot 2025-02-17 at 12.19.08 PM.png
 
The origin in Store > Settings > Config > Shipping Settings is set correctly too.
 
Can you share any advice on why the REST API return is not displayed on the frontend?
 
Thanks,
Max
1 REPLY 1

Re: UPS Rates not showing in

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