Support » Plugin: WooCommerce UPS Shipping – Live Rates and Access Points » Incorrect international rates & service codes in API requests

  • I am getting very different shipping rates when in my UPS account versus the plugin for international shipments. I think there is a bug in service codes being requested by the plugin.

    (Order has 2 items with a weight of 9.3oz ea.)
    UPS rate: ~$45
    Plugin Rate: ~$130

    In the Debug I see it is pulling $130.06 for service Code 07 which is “UPS Worldwide Express”, but you can see in the screenshot I’ve asked for “UPS Worldwide Expedited” (Which is service code 08). I believe its wrong for all of them.

    My question is:

    • How is there such a huge discrepency?
    • Is the plugin pulling rates for the wrong shipping service?

    UPS API Service Codes:

    Description Shipping Rating Service Codes:
    UPS Standard: 11
    UPS Worldwide Express: 07
    UPS Worldwide Expedited: 08
    UPS Worldwide Express Plus: 54
    UPS Worldwide Saver: 65

    ScreenShots
    UPS Live rate from their website: https://drive.google.com/file/d/1lUwWEV-w8TSgCrOLaldAEPuKQpzGTOBC/view?usp=sharing

    Plugin Calculation: https://drive.google.com/file/d/1mVrPFbPSdPqT3WPk__Lxf5E3C19Zj672/view?usp=sharing

    API Request sent to UPS

    <?xml version="1.0"?>
    <RatingServiceSelectionRequest xml:lang="en-US">
      <Request>
        <TransactionReference/>
        <RequestAction>Rate</RequestAction>
        <RequestOption>Shop</RequestOption>
      </Request>
      <PickupType>
        <Code>03</Code>
        <Description/>
      </PickupType>
      <Shipment>
        <Service>
          <Code>03</Code>
          <Description/>
        </Service>
        <Shipper>
          <ShipperNumber>HIDDEN</ShipperNumber>
          <Address>
            <AddressLine1>HIDDEN</AddressLine1>
            <City>Rochester Hills</City>
            <StateProvinceCode>MI</StateProvinceCode>
            <PostalCode>48309</PostalCode>
            <CountryCode>US</CountryCode>
          </Address>
        </Shipper>
        <ShipFrom>
          <Address>
            <AddressLine1>HIDDEN</AddressLine1>
            <City>Rochester Hills</City>
            <StateProvinceCode>MI</StateProvinceCode>
            <PostalCode>48309</PostalCode>
            <CountryCode>US</CountryCode>
          </Address>
        </ShipFrom>
        <ShipTo>
          <Name/>
          <CompanyName/>
          <AttentionName/>
          <Address>
            <City>Alkmaar</City>
            <CountryCode>NL</CountryCode>
          </Address>
        </ShipTo>
        <RateInformation>
          <NegotiatedRatesIndicator/>
        </RateInformation>
        <Package>
          <PackagingType>
            <Code>02</Code>
            <Description/>
          </PackagingType>
          <PackageWeight>
            <Weight>1.16</Weight>
            <UnitOfMeasurement>
              <Code>LBS</Code>
              <Description/>
            </UnitOfMeasurement>
          </PackageWeight>
          <PackageServiceOptions/>
        </Package>
        <ShipmentServiceOptions/>
      </Shipment>
    </RatingServiceSelectionRequest>

    API Response from UPS:

    <?xml version="1.0"?>
    <RatingServiceSelectionResponse>
      <Response>
        <ResponseStatusCode>1</ResponseStatusCode>
        <ResponseStatusDescription>Success</ResponseStatusDescription>
      </Response>
      <RatedShipment>
        <Service>
          <Code>54</Code>
        </Service>
        <RatedShipmentWarning>The selected service may not guarantee early AM arrival to the requested location.</RatedShipmentWarning>
        <RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning>
        <BillingWeight>
          <UnitOfMeasurement>
            <Code>LBS</Code>
          </UnitOfMeasurement>
          <Weight>2.0</Weight>
        </BillingWeight>
        <TransportationCharges>
          <CurrencyCode>USD</CurrencyCode>
          <MonetaryValue>187.47</MonetaryValue>
        </TransportationCharges>
        <ServiceOptionsCharges>
          <CurrencyCode>USD</CurrencyCode>
          <MonetaryValue>0.00</MonetaryValue>
        </ServiceOptionsCharges>
        <TotalCharges>
          <CurrencyCode>USD</CurrencyCode>
          <MonetaryValue>187.47</MonetaryValue>
        </TotalCharges>
        <GuaranteedDaysToDelivery/>
        <ScheduledDeliveryTime/>
        <RatedPackage>
          <TransportationCharges>
            <CurrencyCode>USD</CurrencyCode>
            <MonetaryValue>0.00</MonetaryValue>
          </TransportationCharges>
          <ServiceOptionsCharges>
            <CurrencyCode>USD</CurrencyCode>
            <MonetaryValue>0.00</MonetaryValue>
          </ServiceOptionsCharges>
          <TotalCharges>
            <CurrencyCode>USD</CurrencyCode>
            <MonetaryValue>0.00</MonetaryValue>
          </TotalCharges>
          <Weight>1.2</Weight>
          <BillingWeight>
            <UnitOfMeasurement>
              <Code>LBS</Code>
            </UnitOfMeasurement>
            <Weight>2.0</Weight>
          </BillingWeight>
        </RatedPackage>
      </RatedShipment>
      <RatedShipment>
        <Service>
          <Code>65</Code>
        </Service>
        <RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning>
        <BillingWeight>
          <UnitOfMeasurement>
            <Code>LBS</Code>
          </UnitOfMeasurement>
          <Weight>2.0</Weight>
        </BillingWeight>
        <TransportationCharges>
          <CurrencyCode>USD</CurrencyCode>
          <MonetaryValue>141.10</MonetaryValue>
        </TransportationCharges>
        <ServiceOptionsCharges>
          <CurrencyCode>USD</CurrencyCode>
          <MonetaryValue>0.00</MonetaryValue>
        </ServiceOptionsCharges>
        <TotalCharges>
          <CurrencyCode>USD</CurrencyCode>
          <MonetaryValue>141.10</MonetaryValue>
        </TotalCharges>
        <GuaranteedDaysToDelivery/>
        <ScheduledDeliveryTime/>
        <RatedPackage>
          <TransportationCharges>
            <CurrencyCode>USD</CurrencyCode>
            <MonetaryValue>0.00</MonetaryValue>
          </TransportationCharges>
          <ServiceOptionsCharges>
            <CurrencyCode>USD</CurrencyCode>
            <MonetaryValue>0.00</MonetaryValue>
          </ServiceOptionsCharges>
          <TotalCharges>
            <CurrencyCode>USD</CurrencyCode>
            <MonetaryValue>0.00</MonetaryValue>
          </TotalCharges>
          <Weight>1.2</Weight>
          <BillingWeight>
            <UnitOfMeasurement>
              <Code>LBS</Code>
            </UnitOfMeasurement>
            <Weight>2.0</Weight>
          </BillingWeight>
        </RatedPackage>
      </RatedShipment>
      <RatedShipment>
        <Service>
          <Code>07</Code>
        </Service>
        <RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning>
        <BillingWeight>
          <UnitOfMeasurement>
            <Code>LBS</Code>
          </UnitOfMeasurement>
          <Weight>2.0</Weight>
        </BillingWeight>
        <TransportationCharges>
          <CurrencyCode>USD</CurrencyCode>
          <MonetaryValue>142.97</MonetaryValue>
        </TransportationCharges>
        <ServiceOptionsCharges>
          <CurrencyCode>USD</CurrencyCode>
          <MonetaryValue>0.00</MonetaryValue>
        </ServiceOptionsCharges>
        <TotalCharges>
          <CurrencyCode>USD</CurrencyCode>
          <MonetaryValue>142.97</MonetaryValue>
        </TotalCharges>
        <GuaranteedDaysToDelivery/>
        <ScheduledDeliveryTime/>
        <RatedPackage>
          <TransportationCharges>
            <CurrencyCode>USD</CurrencyCode>
            <MonetaryValue>0.00</MonetaryValue>
          </TransportationCharges>
          <ServiceOptionsCharges>
            <CurrencyCode>USD</CurrencyCode>
            <MonetaryValue>0.00</MonetaryValue>
          </ServiceOptionsCharges>
          <TotalCharges>
            <CurrencyCode>USD</CurrencyCode>
            <MonetaryValue>0.00</MonetaryValue>
          </TotalCharges>
          <Weight>1.2</Weight>
          <BillingWeight>
            <UnitOfMeasurement>
              <Code>LBS</Code>
            </UnitOfMeasurement>
            <Weight>2.0</Weight>
          </BillingWeight>
        </RatedPackage>
      </RatedShipment>
      <RatedShipment>
        <Service>
          <Code>08</Code>
        </Service>
        <RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning>
        <BillingWeight>
          <UnitOfMeasurement>
            <Code>LBS</Code>
          </UnitOfMeasurement>
          <Weight>2.0</Weight>
        </BillingWeight>
        <TransportationCharges>
          <CurrencyCode>USD</CurrencyCode>
          <MonetaryValue>130.06</MonetaryValue>
        </TransportationCharges>
        <ServiceOptionsCharges>
          <CurrencyCode>USD</CurrencyCode>
          <MonetaryValue>0.00</MonetaryValue>
        </ServiceOptionsCharges>
        <TotalCharges>
          <CurrencyCode>USD</CurrencyCode>
          <MonetaryValue>130.06</MonetaryValue>
        </TotalCharges>
        <GuaranteedDaysToDelivery/>
        <ScheduledDeliveryTime/>
        <RatedPackage>
          <TransportationCharges>
            <CurrencyCode>USD</CurrencyCode>
            <MonetaryValue>0.00</MonetaryValue>
          </TransportationCharges>
          <ServiceOptionsCharges>
            <CurrencyCode>USD</CurrencyCode>
            <MonetaryValue>0.00</MonetaryValue>
          </ServiceOptionsCharges>
          <TotalCharges>
            <CurrencyCode>USD</CurrencyCode>
            <MonetaryValue>0.00</MonetaryValue>
          </TotalCharges>
          <Weight>1.2</Weight>
          <BillingWeight>
            <UnitOfMeasurement>
              <Code>LBS</Code>
            </UnitOfMeasurement>
            <Weight>2.0</Weight>
          </BillingWeight>
        </RatedPackage>
      </RatedShipment>
    </RatingServiceSelectionResponse>
    • This topic was modified 2 years, 5 months ago by Daniel Proczko. Reason: Added links to screenshots & Debug Output
    • This topic was modified 2 years, 5 months ago by Daniel Proczko.
    • This topic was modified 2 years, 5 months ago by Daniel Proczko.
    • This topic was modified 2 years, 5 months ago by Daniel Proczko.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor grola

    (@grola)

    Hi,

    please read this article: https://flexibleshipping.com/what-affects-the-ups-rates-in-ups-woocommerce-plugin/
    Pay particular attention to the Pickup Type setting. I think setting this value appropriately should fix the problem.

    Best regards
    Grzegorz

    Thread Starter Daniel Proczko

    (@diggler)

    I truly feel my comment was entirely ignored. This may not be a case of incorrect pricing, but instead a technical flaw in the plugin pulling the wrong shipping codes.

    We have read your documentation and have the Pickup Type setting set properly.

    The API response codes specifically show the WRONG codes being pulled for the labels and shipping types asked for.

    Can you please respond to that? ANd if the pickup type impacts the shipping codes, then you need to supply more accurate documentation on how it impacts them as the codes #’s are completely misaligned.

    The plugin uses the correct service codes.

    PickupType has no effect on the service codes. PickupType affects the prices.

    Please check API response for service 08 – UPS Worldwide Expedited:

    <RatedShipment>
        <Service>
          <Code>08</Code>
        </Service>
        <RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning>
        <BillingWeight>
          <UnitOfMeasurement>
            <Code>LBS</Code>
          </UnitOfMeasurement>
          <Weight>2.0</Weight>
        </BillingWeight>
        <TransportationCharges>
          <CurrencyCode>USD</CurrencyCode>
          <MonetaryValue>130.06</MonetaryValue>
        </TransportationCharges>
        <ServiceOptionsCharges>
          <CurrencyCode>USD</CurrencyCode>
          <MonetaryValue>0.00</MonetaryValue>
        </ServiceOptionsCharges>
        <TotalCharges>
          <CurrencyCode>USD</CurrencyCode>
          <MonetaryValue>130.06</MonetaryValue>
        </TotalCharges>
        <GuaranteedDaysToDelivery/>
        <ScheduledDeliveryTime/>
        <RatedPackage>
          <TransportationCharges>
            <CurrencyCode>USD</CurrencyCode>
            <MonetaryValue>0.00</MonetaryValue>
          </TransportationCharges>
          <ServiceOptionsCharges>
            <CurrencyCode>USD</CurrencyCode>
            <MonetaryValue>0.00</MonetaryValue>
          </ServiceOptionsCharges>
          <TotalCharges>
            <CurrencyCode>USD</CurrencyCode>
            <MonetaryValue>0.00</MonetaryValue>
          </TotalCharges>
          <Weight>1.2</Weight>
          <BillingWeight>
            <UnitOfMeasurement>
              <Code>LBS</Code>
            </UnitOfMeasurement>
            <Weight>2.0</Weight>
          </BillingWeight>
        </RatedPackage>
      </RatedShipment>

    API returns:
    <MonetaryValue>130.06</MonetaryValue>

    The plugin shows the correct value returned by the UPS API for your account.

    When checking prices on the UPS website, are you logged into the same account that is used in the plugin?

    Plugin Contributor grola

    (@grola)

    The plugin uses the correct service codes.

    PickupType has no effect on the service codes. PickupType affects the prices.

    Please check API response for service 08 – UPS Worldwide Expedited:

    <RatedShipment>
        <Service>
          <Code>08</Code>
        </Service>
        <RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning>
        <BillingWeight>
          <UnitOfMeasurement>
            <Code>LBS</Code>
          </UnitOfMeasurement>
          <Weight>2.0</Weight>
        </BillingWeight>
        <TransportationCharges>
          <CurrencyCode>USD</CurrencyCode>
          <MonetaryValue>130.06</MonetaryValue>
        </TransportationCharges>
        <ServiceOptionsCharges>
          <CurrencyCode>USD</CurrencyCode>
          <MonetaryValue>0.00</MonetaryValue>
        </ServiceOptionsCharges>
        <TotalCharges>
          <CurrencyCode>USD</CurrencyCode>
          <MonetaryValue>130.06</MonetaryValue>
        </TotalCharges>
        <GuaranteedDaysToDelivery/>
        <ScheduledDeliveryTime/>
        <RatedPackage>
          <TransportationCharges>
            <CurrencyCode>USD</CurrencyCode>
            <MonetaryValue>0.00</MonetaryValue>
          </TransportationCharges>
          <ServiceOptionsCharges>
            <CurrencyCode>USD</CurrencyCode>
            <MonetaryValue>0.00</MonetaryValue>
          </ServiceOptionsCharges>
          <TotalCharges>
            <CurrencyCode>USD</CurrencyCode>
            <MonetaryValue>0.00</MonetaryValue>
          </TotalCharges>
          <Weight>1.2</Weight>
          <BillingWeight>
            <UnitOfMeasurement>
              <Code>LBS</Code>
            </UnitOfMeasurement>
            <Weight>2.0</Weight>
          </BillingWeight>
        </RatedPackage>
      </RatedShipment>

    API returns:
    <MonetaryValue>130.06</MonetaryValue>

    The plugin shows the correct value returned by the UPS API for your account.

    When checking prices on the UPS website, are you logged into the same account that is used in the plugin?

    Thread Starter Daniel Proczko

    (@diggler)

    Truth be told the plugin is currently not showing the correct pricing for my account. As you can see in the screenshots from the UPS website (where I’m logged in as the same account) the rates are 3x more expensive with your plugin.

    Why? How do we troubleshoot this?

    (Let’s just set expectations that if you are going to suggest we pay for the PRO plugin, then we will need to have it set up as a demo to test accurate pricing, prior to payment.)

    Plugin Contributor grola

    (@grola)

    Please check what rates the API returns for other PickupType, including Not set.

    If API still returns different rates from those returned by the calculator on the UPS website, you should ask the UPS support.

    You don’t need the PRO version for accurate pricing.

    You can always test all our plugins on our demo page: https://demo.flexibleshipping.com/

    Thread Starter Daniel Proczko

    (@diggler)

    I’ve cycled through all the combinations and finally decided to uncheck “Negotiated rates” and was able to get a pickup point o f”not set” to pull the correct rates.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Incorrect international rates & service codes in API requests’ is closed to new replies.