Carrier Service - Cart Payload always returns store's base Currency

When using the Carrier Service API, the cart’s payload that gets sent to our apps payload always has a currency of the Shops default currency, rather than the actual currency of the market the user is checking out in.

Sample cart payload below:

{
  "currency": "USD",
  "customer": null,
  "destination": {
    "address1": "Toronto St",
    "address2": null,
    "address3": null,
    "address_type": null,
    "city": "St. John's",
    "company_name": null,
    "country": "CA",
    "email": null,
    "fax": null,
    "latitude": 47.5973014831543,
    "longitude": -52.71310043334961,
    "name": null,
    "phone": null,
    "postal_code": "A1A 2T4",
    "province": "NL"
  },
  "items": [
    {
      "fulfillment_service": "manual",
      "grams": 0,
      "name": "The Multi-location Snowboard",
      "price": 74109,
      "product_id": 8530212880580,
      "properties": {},
      "quantity": 1,
      "requires_shipping": true,
      "sku": null,
      "taxable": true,
      "variant_id": 45870380482756,
      "vendor": "Custom Carrier Service"
    }
  ],
  "locale": "en-CA",
  "order_totals": {
    "discount_amount": 0,
    "subtotal_price": 74109,
    "total_price": 74109
  },
  "origin": {
    "address1": null,
    "address2": null,
    "address3": null,
    "address_type": null,
    "city": null,
    "company_name": "Custom Carrier Service",
    "country": "US",
    "email": null,
    "fax": null,
    "latitude": null,
    "longitude": null,
    "name": null,
    "phone": null,
    "postal_code": null,
    "province": null
  }
}

The above cart is in a Canadian market - and prices show as CAD in the checkout, but the actual cart payload always returns USD currency.

Is this expected behaviour?

Hey @Lewis

Yes, this is expected behavior. The Carrier Service callback payload always sends prices and currency in the store’s base currency and not the customer’s presentment/market currency. So if your store’s base currency is USD, the currency field and all price values in the payload will be in USD regardless of which market the customer is shopping in.

The good news is that the response side handles this well. When you return shipping rates from your callback, you include a currency field on each rate and Shopify will automatically convert the rate to the customer’s presentment currency for display at checkout. So you can safely calculate your shipping rates based on the USD values you receive, return rates in USD (or any supported currency), and Shopify takes care of the currency conversion on the storefront.

Hi @Liam-Shopify Thanks for the response and for clarifying.

Would be great to see both the presentment prices and the market prices in future if possible.

Reason being is that we need to have different shipping rates returned per market based on things like cart currency and item prices.

Right now, that doesn’t seem to be possible without going down the route of something like a checkout extension to set these as cart attributes, which isn’t particularly elegant. Given these have also been deprecated in favor of Cart Metafields, this makes it even less of a viable route. Are there plans to expose Cart metafields to the cart payload on the Carrier Service?

I understand we can send back a currency and Shopify will convert it for us, but for us to determine which rate to send back to Shopify, we really need to know the market’s currency and market prices otherwise we’ll have to build some form of currency conversion element in the app which means it’ll likely never be a truly 1-1 conversion from Shopify → App.

Open to any other ideas on this in the interim if there’s something I’m missing?