Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Some questions about Carrier Service

Some questions about Carrier Service

SoporteMP
Shopify Partner
3 0 0

Hello!

I've created a carrier service example in my development shop, to explore how to configure it. But I had a question about to the service's price.

I'v configured this rates as a example:

 

{
    "rates": [
        {
            "service_name": "Envío Sameday",
            "service_code": "ON",
            "total_price": "5500",
            "description": "This is the fastest option by far",
            "currency": "COP",
            "min_delivery_date": "2013-04-12 14:48:45 -0400",
            "max_delivery_date": "2013-04-12 14:48:45 -0400"
        },
        {
            "service_name": "Envío Nacional",
            "service_code": "2D",
            "total_price": "10000",
            "currency": "COP",
            "min_delivery_date": "2013-04-12 14:48:45 -0400",
            "max_delivery_date": "2013-04-12 14:48:45 -0400"
        },
        {
            "service_name": "Envío estandar",
            "service_code": "1D",
            "total_price": "8000",
            "currency": "COP",
            "min_delivery_date": "2013-04-12 14:48:45 -0400",
            "max_delivery_date": "2013-04-12 14:48:45 -0400"
        }
    ]
}

 

 

 

And I set the currency as a COP. (pesos colombianos), but in the checkout, the price is shown like this:

Captura de Pantalla 2021-11-05 a la(s) 3.32.57 p.m..png

In this case the total price 5500 is $5500 COP, but the checkout show $55.00 that is wrong.

It should be clarified that the store is configured in COP.

Does anybody know what is happening?

 

Thank you!

 

Reply 1 (1)

GrahamS
Shopify Staff (Retired)
193 37 55

Hey @SoporteMP ,

 

This is an expected outcome for currencies that do not use subunits, such as pesos. This needs to be manually accounted for in the "total_price" parameter. From our docs:

 

total_price: The total price expressed in subunits. If the currency does not use subunits, the value must be multiplied by 100. For example: `"total_price": 500` for 5.00 CAD, `"total_price": 100000` for 1000 JPY.

 

Hope this helps!

 

Best,

To learn more visit the Shopify Help Center or the Community Blog.