Custom Carrier Service not requesting rates from our carrier callback url

New Member
6 0 0

Hi all

we changed the endpoint registering from https to http and since then it works like a charm. I think shopify srevers are not all configured the same and some (maybe only one) of them performing the carrier POST request is not performing it if HTTPS.

 

Strange

 

Someone from Shopify Admins should take a look on this.

 

miso

0 Likes
Shopify Staff
Shopify Staff
1558 78 232

@RRStoyanov - Are you saying that you're responding to the requests with rates and they are not appearing in the checkout? What's the Shopify response to your request, is there a request-id header I can look at?

@Michal - That's strange indeed. Was this a very recent change? That's good to know.

0 Likes
Shopify Partner
9 0 0

I tried with http instead of https and didn't work as well...

I need valid responses return from me (what exactly is the structure returned from the callback url) and once I know that's valid, I can play with http/https.

0 Likes
Shopify Partner
9 0 0

That's what I see when the call hit my callback url. How to get the request id?

Headers

[2018-04-27 16:45:14] local.INFO: array (
  'x-shopify-shop-domain' => 'xxxxxxxx.myshopify.com',
  'x-shopify-hmac-sha256' => 'shmac-string',
  'x-forwarded-proto' => 'https',
  'x-forwarded-for' => 'xx.xx.xx.xxx',
  'content-type' => 'application/json',
  'accept-encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
  'accept' => '*/*',
  'content-length' => '840',
  'connection' => 'close',
  'user-agent' => 'Ruby',
  'host' => 'xxxxxx.xxxxx.xxxx',
)

Body content

[2018-04-27 16:45:14] local.INFO: array (
  0 =>
  stdClass::__set_state(array(
     'rate' =>
    stdClass::__set_state(array(
       'origin' =>
      stdClass::__set_state(array(
         'country' => 'HU',
         'postal_code' => 'N1 6AH',
         'province' => '',
         'city' => 'Some City',
         'name' => NULL,
         'address1' => 'Some Address',
         'address2' => '',
         'address3' => NULL,
         'phone' => 'xxxxxxxxxxx',
         'fax' => NULL,
         'email' => NULL,
         'address_type' => NULL,
         'company_name' => 'My Shop Hungary',
      )),
       'destination' =>
      stdClass::__set_state(array(
         'country' => 'HU',
         'postal_code' => 'TEST',
         'province' => NULL,
         'city' => 'Test',
         'name' => 'Rostislav Stoyanov',
         'address1' => 'Test',
         'address2' => 'ap 68',
         'address3' => NULL,
         'phone' => '+xxx xxx xxx xxxxx',
         'fax' => NULL,
         'email' => NULL,
         'address_type' => NULL,
         'company_name' => NULL,
      )),
       'items' =>
      array (
        0 =>
        stdClass::__set_state(array(
           'name' => 'xxx xxx xxxxx xxx',
           'sku' => 'xxxxxxxxxxxx',
           'quantity' => 1,
           'grams' => 0,
           'price' => 595,
           'vendor' => 'xxxxxxxx',
           'requires_shipping' => true,
           'taxable' => true,
           'fulfillment_service' => 'manual',
           'properties' => NULL,
           'product_id' => xxxxxx,
           'variant_id' => xxxxxx,
        )),
      ),
       'currency' => 'EUR',
       'locale' => 'hu',
    )),
  )),
)

My response is

[{"rates":[{"service_name":"My Shipping","description":"Includes tracking and insurance","service_code":"my_shipping","currency":"GBP","total_price":123,"min_delivery_date":"2017-11-11T00:00:00.000Z","max_delivery_date":"2020-11-12T00:00:00.000Z"}]}]

If there is a channel where  I can share and give you exact urls instead of trying to hide out stuff, just tell me.

0 Likes
Shopify Partner
9 0 0

That's what I see when the call hit my callback url. How to get the request id?

Headers

[2018-04-27 16:45:14] local.INFO: array (
  'x-shopify-shop-domain' => 'xxxxxxxx.myshopify.com',
  'x-shopify-hmac-sha256' => 'shmac-string',
  'x-forwarded-proto' => 'https',
  'x-forwarded-for' => 'xx.xx.xx.xxx',
  'content-type' => 'application/json',
  'accept-encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
  'accept' => '*/*',
  'content-length' => '840',
  'connection' => 'close',
  'user-agent' => 'Ruby',
  'host' => 'xxxxxx.xxxxx.xxxx',
)

Body content

[2018-04-27 16:45:14] local.INFO: array (
  0 =>
  stdClass::__set_state(array(
     'rate' =>
    stdClass::__set_state(array(
       'origin' =>
      stdClass::__set_state(array(
         'country' => 'HU',
         'postal_code' => 'N1 6AH',
         'province' => '',
         'city' => 'Some City',
         'name' => NULL,
         'address1' => 'Some Address',
         'address2' => '',
         'address3' => NULL,
         'phone' => 'xxxxxxxxxxx',
         'fax' => NULL,
         'email' => NULL,
         'address_type' => NULL,
         'company_name' => 'My Shop Hungary',
      )),
       'destination' =>
      stdClass::__set_state(array(
         'country' => 'HU',
         'postal_code' => 'TEST',
         'province' => NULL,
         'city' => 'Test',
         'name' => 'Rostislav Stoyanov',
         'address1' => 'Test',
         'address2' => 'ap 68',
         'address3' => NULL,
         'phone' => '+xxx xxx xxx xxxxx',
         'fax' => NULL,
         'email' => NULL,
         'address_type' => NULL,
         'company_name' => NULL,
      )),
       'items' =>
      array (
        0 =>
        stdClass::__set_state(array(
           'name' => 'xxx xxx xxxxx xxx',
           'sku' => 'xxxxxxxxxxxx',
           'quantity' => 1,
           'grams' => 0,
           'price' => 595,
           'vendor' => 'xxxxxxxx',
           'requires_shipping' => true,
           'taxable' => true,
           'fulfillment_service' => 'manual',
           'properties' => NULL,
           'product_id' => xxxxxx,
           'variant_id' => xxxxxx,
        )),
      ),
       'currency' => 'EUR',
       'locale' => 'hu',
    )),
  )),
)

My response is

[{"rates":[{"service_name":"My Shipping","description":"Includes tracking and insurance","service_code":"my_shipping","currency":"GBP","total_price":123,"min_delivery_date":"2017-11-11T00:00:00.000Z","max_delivery_date":"2020-11-12T00:00:00.000Z"}]}]

If there is a channel where  I can share and give you exact urls instead of trying to hide out stuff, just tell me.

0 Likes
New Member
6 0 0

We had the same situation again from 22.5.2018 - then we desided to switch off our own carrier service and started to use the rates from shopify itself.

 

We had also immediate dropdown in conversion and saw mayn useres going out in shopping cart in our google analytics.

Now 2 days later im testing on another shop (our testing myshopify shop) and this is NOT showing me any errors anymore.

 

Question:

Is it possible that shopify serves different shops on different servers out of which one is defect and is causing the error? We are not convinced to test on live as we will start loosing customers again.

 

Request:

{
  "rate": {
    "origin": {
      "country": "SK",
      "postal_code": "84101",
      "province": "SK",
      "city": "Bratislava",
      "name": null,
      "address1": "Bujnakova",
      "address2": "",
      "address3": null,
      "phone": "0906123234",
      "fax": null,
      "email": null,
      "address_type": null,
      "company_name": null
    },
    "destination": {
      "country": "SK",
      "postal_code": "82107",
      "province": "SK",
      "city": "Bratislava",
      "name": "Michal Hegyi",
      "address1": "korytnicka 8",
      "address2": "",
      "address3": null,
      "phone": null,
      "fax": null,
      "email": null,
      "address_type": null,
      "company_name": null
    },
    "items": [{
      "name": "Short Sleeve T-Shirt",
      "sku": "",
      "quantity": 1,
      "grams": 400,
      "price": 1600,
      "vendor": "Promodoro",
      "requires_shipping": true,
      "taxable": true,
      "fulfillment_service": "manual",
      "properties": null,
      "product_id": 48447225880,
      "variant_id": 258644705304
    }],
    "currency": "EUR",
    "locale": "sk"
  }
}

Response:

{"rates":[{"total_price":350,"service_name":"InTime","service_code":"SHIRTPLATFORM-68","description":"Dorucenie slovenskym InTime - Slovak Parcel Service","currency":"EUR","phone_required":true}]}

 

 

0 Likes
Shopify Partner
43 0 5

Yeah, would it be possible to add functionality for redundancy and decent error reporting?

Product codes should be namespaced and with a priority or revision; two carriers returning the same code within the same namespace must be merged by revision.

0 Likes
Shopify Partner
43 0 5

Now some sites are seeing 100% failure rates - and no incoming requests to the server IN PRODUCTION

 

There is a status.shopify.com message saying that 'USPS shipping rates not available at checkout', however the issue is NOT limited to USPS, as my app is having the same problem. 

 

0 Likes
Trailblazer
195 0 84

@Thomas

I use a custom carrierService API for all my sites. It's not related to USPS.

All my sites are down and returning this strange error. Normally when carrier Service API goes down on my end, there is no error, and simply not rates are returned.

I have a feeling, this is something on Shopify's side, which is effecting all carrierService API endpoints. 

 

Support is telling me it's an issue with USPS and not shopify, but due to my experence & Thomas's it appears to be a larger issue related to carrierService API shipping methods, not just USPS. 

 

For me, we started to know about this 6 hours ago, which would have been roughly 8:30pm May 29th, PST.

As a temporary fix, I've simply added a $6 flat rate shipping to my stores, to continue to process sales. 

0 Likes
New Member
6 0 0

We are experiencing this error already for longer time. Shopify support said it is a problem of our carrier. They dont know whta is the rreason. In my opinin one or more shopify srevers is having trouble executing the callback defined in shopify API.

 

However - we will not use the carrier as this is not working.

0 Likes