Carrier Service option not selected

New Member
2 0 0

I am developing a carrier service.

My service get called and I respond according to development documentation (see below). My carrier options will be shown in the list of possible shipping options. In my early versions it was possible to select my own option and that would be included in shipping_lines on the order.

But lately I have changed the service code and requests to my backend service takes a little bit longer than before (still less than a second). Right now when I select my shipping option it will not be included in the order, even if it shows in the list and i can select it. In Shopify Admin interface when I select and apply my own option nothing happens, if I chose another option (not from my service) it will be added.

Why this behaviour? How can I understand why Shopify says no to my option?

My response payload looks like

    "service_name": "Postens utlämningsställe 1.4 km Godisbjörnen",
    "service_code": "73bQWREOqJoADddtnJ5GAfnM3ytUna9npCzyEvh2",
    "total_price": 0,
    "description": "Fri frakt när du handlar för minst 250 kr, Välj till vilket utlämningsställe din beställning ska skickas., Peppareds Torg 2, 43150, MÖLNDAL, SE",
    "currency": "SEK"


New Member
2 0 0

Solved it myself!

I thought Shopify should call carrier service one time only, but it calls it several times during selection process. I had a unique identifier as service code that changed from call to call and that's why it didn't work.

When sending same code for all request it worked fine.