🚨 Discount Function fixedAmount gets double currency-converted on subscription renewal orders in multi-currency stores

Description:

When a Shopify Function returns a fixedAmount discount for subscription items in a multi-currency store, the first order applies the discount correctly, but subsequent subscription renewal orders apply an
additional currency conversion, making the discount significantly larger than intended.

Native Shopify automatic discounts do not have this issue.

Steps to reproduce:

  1. Set up a store with a default currency of USD and enable AUD as a presentment currency
  2. Create a Discount Function that returns a fixedAmount discount (e.g., A$3 off per item)
  3. The function correctly returns the amount “in the currency of the cart” as documented in ProductDiscountCandidateFixedAmount.amount
  4. A customer in AUD adds 2 items to cart with a subscription selling plan
  5. Complete checkout — first order discount is correct (A$6.00 = A$3 × 2)
  6. Check the subscription contract’s renewal subtotal — the discount has been re-converted from shop currency, resulting in A$10.02 instead of A$6.00

Expected behavior:

The fixedAmount returned by the discount function is in the cart’s presentment currency (AUD). Subscription renewals should use this value as-is in AUD, not treat it as shop currency (USD) and convert again.

Actual behavior:

The stored discount amount (6.00) is treated as USD on renewal and converted to AUD again: $6.00 Ă— ~1.67 (AUD/USD rate) = A$10.02.

Notes:

  • Percentage-type discounts from Functions work correctly on subscription renewals (they are currency-agnostic)
  • Native Shopify automatic discounts with fixed amounts work correctly on subscription renewals
  • Only Function-based fixedAmount discounts are affected
  • The presentmentCurrencyRate and ProductDiscountCandidateFixedAmount schema docs say the amount should be “in the currency of the cart” — the function follows this correctly

4 Likes

@dostu this looks like a genuine bug in how Shopify stores the fixedAmount discount value against the subscription contract. On first checkout the function correctly returns the amount in the cart’s presentment currency (AUD), but when the contract is stored it seems to lose that currency context — so on renewal it treats the stored number as shop currency (USD) and converts again.

The fact that percentage discounts and native fixed amount discounts don’t have this issue makes it pretty clear this is specific to how Function-based fixedAmount values are persisted against subscription contracts.

The only workaround we can think of until this gets fixed is switching to a percentage-based discount in the function and calculating the equivalent percentage from the fixed amount at runtime. Not ideal especially if the fixed amount needs to stay consistent, but it sidesteps the currency conversion issue entirely:

const discountPercentage = (fixedAmountAUD / linePriceAUD) * 100;

return {
  discounts: [{
    targets: [{ productVariant: { id: variantId } }],
    value: { percentage: { value: discountPercentage } }
  }]
};

Worth flagging to Shopify support with your reproduction steps since this is well documented and clearly a platform bug.

The issue seems to have started on March 7. This is a critical issue, because when the currency rate is large (for example MXN) discount essentially becomes 100% and the orders are free.

1 Like

Hi @dostu, thanks for flagging this with us.
Appreciate the reproduction steps with the pricing breakdowns as always :slight_smile:

I’ll need to check our logs to investigate this. Can you provide a Function ID or handle we can use? Let me know if you’d prefer to share this via DM and I’ll send you a message.

1 Like

It’s 3b161a02-cb63-a3a0-19ac-dc1e5502820a1c892efd (discount-function-v4). And here’s the subscription contract id of an example affected order 82534138224. Let me know if you need more examples.

1 Like