Question about registering a custom carrier service

Shopify Partner
3 0 0

Is it possible to register a custom carrier service as only domestic? I don't want the method to be available for international customers. Currently I just check in the code before calculating a rate but it'd be better to just have it register for domestic-only.

0 Likes
Highlighted
Shopify Staff
Shopify Staff
582 0 45

You'll just have to return an empty set of rates when the checkout requests rates from your service provider. In the least, you could have a white list of countries/regions and if the customer isn't coming from there return a blank set of rates immediately.

The request will have to go to your server (which is providing the rates) and you'll need to do all the necessary calculations (even if that means doing nothing).

I understand that it's a bit of a gross experience; the user gets to the 2nd page of the checkout only to find out that they aren't even eligible to purchase the product. Though, you can use this as an opportunity to see what other markets are interested based on the abandoned carts :)

0 Likes
Shopify Partner
3 0 0

I was just hoping to cut down on the number of API requests. The shipping method is only available for domestic orders so interest levels don't matter. Right now I'm returning an empty rates array. Where can I submit a suggestion for the ability to register a shipping service as only domestic or international be added? Also, I found some errors in the Carrier Service API documentation and would like to make whoever's responsible for that aware. Where's the best place to do that?

0 Likes