To resolve the error "Line items currency must be provided when either order currency or order presentment currency is different from the shop currency", you need to ensure that each line item in the order includes a currency field if the order's currency or presentment currency differs from the shop's default currency.
✅ Root Cause
Shopify requires explicit currency information for line items when:
- The order's currency is different from the shop's default currency.
- The presentment currency (the currency shown to the customer) is different from the shop's default currency.
If either of these conditions is true, all line items in the order must explicitly specify their currency.
🔧 Solution
Update your GraphQL mutation to include the currency field for every line item in the order when the order's or presentment currency differs from the shop's default.
Example Mutation:
mutation {
orderCreate(input: {
lineItems: [
{
variantId: "gid://shopify/ProductVariant/1234567890",
quantity: 1,
currency: "EUR" # Must be specified if the order/presentment currency is not the shop's default
},
{
variantId: "gid://shopify/ProductVariant/0987654321",
quantity: 2,
currency: "EUR"
}
],
currency: "EUR", # Order currency (if different from shop's default)
presentmentCurrency: "EUR" # Optional: if presentment currency differs
}) {
order {
id
currency
lineItems {
edges {
node {
title
quantity
currency
}
}
}
}
userErrors {
field
message
}
}
}
🧪 Key Checks
- Shop Currency: Confirm your shop's default currency (e.g.,
USD) via the Shopify admin or API.
- Order Currency: If the
currency field in the order input is different from the shop's default, all line items must have a currency.
- Presentment Currency: If
presentmentCurrency is specified (e.g., for multi-currency storefronts), line items must also have a currency.
📌 Important Notes
- If the order's currency and presentment currency match the shop's default, you can omit the
currency field for line items.
- Always validate the shop's currency before creating an order in a different currency.
🛠️ Debugging Tips
By ensuring all line items include the currency field when required, you'll avoid this error and comply with Shopify's validation rules.