In what currency is an order's "total_spent" attribute recorded in?

Solved
rloretto
New Member
2 0 0

I'm working with the 2020-04 Order API, and the documentation does not seem to provide any assertions about the currency in which customers' "total_spent" attribute is recorded in. Is it the customer's currency, the store's currency? Some normalized currency like USD?

0 Likes
vix
Shopify Staff
Shopify Staff
534 105 103

This is an accepted solution.

Hey @rloretto 

This value is in the shop currency. 

Vix | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

PaulNewton
Shopify Partner
2576 134 438

Yes supposed to be in shop currency though docs do not specify https://shopify.dev/docs/admin-api/rest/reference/customers/customer?api[version]=2020-04#total-spen...

And it is not impossible for  shop currency to change , so to hard confirm one would have to go through customer orders and many resources as it's also unclear what happens then.

https://shopify.dev/docs/admin-api/rest/reference/orders/order?api[version]=2020-04#currency-propert... (scroll up as stupid sticky header breaks id anchors) 

:~: shop currency 

https://shopify.dev/docs/admin-api/rest/reference/store-properties/currency?api[version]=2020-04

 

GraphQL -  https://shopify.dev/docs/admin-api/graphql/reference/object/order?api[version]=2020-04#currencycode-...

Shop.currencyCode https://shopify.dev/docs/admin-api/graphql/reference/object/shop#currencycode-2020-04

{
  shop {
    paymentSettings {
      currencyCode
    }
  }
}

Depreciated

{ shop { currencyCode } }

 

 

 

 

Problem Solved? ✔️Accept and ? Like the solution so you can help others.
Buy me a coffee ☕ paypal.me/paulnewton or donate to eff.org
Confused? Busy? Buy a custom solution paull.newton+shopifyforum@gmail.com
0 Likes
rloretto
New Member
2 0 0

thank you!

0 Likes