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
8 REPLIES 8

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

Re: UPS Rates not showing in

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?

Re: UPS Rates not showing in

Hello @maxmosimann_1,

 

Go to Stores > Configuration > Sales > Shipping Methods > UPS.

 

Ensure "Enabled for Checkout" is set to Yes.

 

Make sure the "UPS Type" matches your account (e.g., "United Parcel Service XML" for negotiated rates).

 

Verify that your credentials (Access Key, User ID, Password, and Shipper Number) are correct.

Your API response contains service codes (07, 08, 54, 65), but the frontend may not be configured to display them.

 

In Stores > Configuration > Sales > Shipping Methods > UPS, ensure that these services are enabled in the Allowed Methods list.

 

The API response returns currency in CHF (Swiss Francs), but your store might use a different currency.

 

Go to Stores > Configuration > General > Currency Setup and confirm that your currency settings allow CHF or properly convert to your store's currency.

 

Check Debug Logs for Errors

var/log/system.log

var/log/exception.log

Open the browser Developer Console (F12 > Console) and look for any JavaScript errors related to shipping rates.

 

Try switching to the Luma theme temporarily to see if it's a theme issue.

Also Enable UPS debug mode:

 

\Stores > Configuration > Sales > Shipping Methods > UPS > Debug > Yes

 

If the issue will be resolved, Click Kudos & Accept as a Solution.

Re: UPS Rates not showing in

Hi @Milople ,

 

Thanks for your help.

 

I have followed all of these steps and ensured debugging is enabled. The API response gets output to the debug file:

var/log/shipping.log

and contains the following:

[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"}}]}}',
) [] []

This API response lets us assume that...

  • the connection details are correct since...
  • the API request is successful as...
  • the response contains the correct shipping rates.

 

However, Magento (2.4.7) doesn't output all these rates to the frontend. I'm using the standard luma theme.

 

Looks like a Magento bug to me

Re: UPS Rates not showing in

Hello.  I am having the same issue.  I verified my settings were correct with UPS but I still get no shipping methods available on the frontend of the store   I am using Magento 2.4.7.

 

Re: UPS Rates not showing in

Looks like an issue in that case. I just wanted to report this to the Magento 2 repo but see someone has already reported this issue #39408 

Re: UPS Rates not showing in

Hello.  My issue is different as I am getting no rates at all using UPS REST.   I am not sure what to do to fix this issue.  Below is my shipping.log

[2025-03-20T13:46:14.376688+00:00] main.DEBUG: array (
'request' => '{
"RateRequest": {
"Request": {
"TransactionReference": {
"CustomerContext": "Rating and Service"
}
},
"Shipment": {
"Shipper": {
"Name": "UPS",
"ShipperNumber": "",
"Address": {
"AddressLine": [
"01"
],
"City": "Rock Hill",
"StateProvinceCode": "SC",
"PostalCode": "29730",
"CountryCode": "US"
}
},
"ShipTo": {
"Address": {
"AddressLine": [
"01"
],
"StateProvinceCode": "SC",
"PostalCode": "29730",
"CountryCode": "US",
"ResidentialAddressIndicator": "01"
}
},
"ShipFrom": {
"Address": {
"AddressLine": [],
"StateProvinceCode": "SC",
"PostalCode": "29730",
"CountryCode": "US"
}
},
"Package": [
{
"PackagingType": {
"Code": "00",
"Description": "Packaging"
},
"Dimensions": {
"UnitOfMeasurement": {
"Code": "IN",
"Description": "Inches"
},
"Length": "5",
"Width": "5",
"Height": "5"
},
"PackageWieght": {
"UnitOfMeasurement": {
"Code": "LBS"
},
"Wieght": "85"
}
}
]
}
}
}',
'result' => '',
) [] []

Re: UPS Rates not showing in

Hi again, it looks like the Shipper Number is missing (typically a 6 character number). This is a required field according to the UPS API documentation. Please post this in a separate post as this post is about rates being received but not properly rendered to the checkout.