I’m building a loyalty app that creates one‑time fixed‑amount discount codes per customer using the Admin GraphQL API:
Operation
Open GraphiQLCopy
“customerGets”: {
“value”: {
“discountAmount”: {
“amount”: “4.00”,
“appliesOnEachItem”: false
}
},
“items”: { “all”: true }
}
My problem:
-
The shop base currency is, for example, USD.
-
The checkout/market currency is INR.
-
When I set
discountAmount.amount = 4.00, the code applies roughly ₹374 off, not ₹4 off. So it’s clearly being interpreted in shop base currency and then converted.
Questions:
-
Is there any way in the Admin or Storefront GraphQL APIs to create a fixed-amount discount code whose amount is defined in the buyer’s presentment/market currency (for example, exactly ₹4 off in INR), rather than in the shop’s base currency?
-
If not, what is the recommended pattern for apps that need “X units off in the buyer’s currency” when using
discountCodeBasicCreate?-
Is the only supported approach to:
-
Fetch a market-aware price or FX rate (for example via
productVariant.contextualPricing), -
Convert the desired presentment discount (e.g. ₹4) back into the shop base currency, and
-
Use that converted base-currency value in
discountAmount.amount?
-
-
I want to confirm there is no first-class way to specify discount amounts in market currency, and that deriving base-currency amounts via contextualPricing/FX is the correct and supported approach.