Delivery Carrier Service simply not working despite receiving correct response

Delivery Carrier Service simply not working despite receiving correct response

xaviero
Shopify Partner
3 0 1

I have a development store: carrierservicetesting.myshopify.com

 

I have enabled a carrierService, and I have double checked that it's active. I created it using the GraphQL API, and if I request carrier services, I receive it, so I know it's there. This is what I get from the API:

[ { active: true, callbackUrl: 'https://script.google.com/macros/s/AKfycbz8MLwNANhEpdEMSLeMSZh_XfxXhdHzmmNHSSzh-CLTwx9tH7bAxdOv3ahys...', formattedName: 'CustomCarrierService (Rates provided by app)', id: 'gid://shopify/DeliveryCarrierService/91631419672', name: 'CustomCarrierService', supportsServiceDiscovery: true } ]

 

My setup is a Google Apps Script that receives the request and returns the response (happy to share more details if needed).

I have tried sending a request through Postman, and I receive the correct response: a 200OK with the following:

 

{
    "rates": [
        {
            "service_name": "CustomCarrierService",
            "description": "Test Description",
            "service_code": "CUSTOM_SHIPPING",
            "currency": "CLP",
            "total_price": "3990"
        }
    ]
}
 
Finally, I can also confirm that my script is in fact being triggered at checkout, and that the logged response is what Shopify expects. However, Shopify simply won't show my rates.
 
I have dived through every content online I have seen and can't find a solution. Support told me they can't help me.
 
I have double checked that I have activated the "Automatically show new shipping services to customers when they become available" like I saw in some other post.
 
I am attaching what I see on my Shipping Setup screen as well in case it sheds more light.
Could someone please help me figure out what am I missing?
Captura de pantalla 2024-10-24 081821.png
Reply 1 (1)

xaviero
Shopify Partner
3 0 1

For anyone else with the same issue, it seems to be that Google Apps Scripts returns a redirect to the Shopify call for some reason. I implemented the same functionality using Cloudflare Workers, which does require some set up on Google Cloud but anyways, it worked out in the end. So in short, it seems you can't use Google Apps Scripts for this.