Can't complete a draft order if it was created in a different currency

I can create a draft order fine. I send in the customer id and some line items with a discount.

However, if the customer’s currency is different from my base currency, it seems like the draft order “recalculates” and then updates all the pricing to match the customers currency.

The problem is that this happens when I try to complete the draft order quickly after creating the draft order.

I always take this approach when creating orders;

  1. Create the draft order. Retrieve it’s ID
  2. Poll the status of the draft order, wait until it’s status is “ready”
  3. Complete the draft order via ID.

The draft order comes back as “ready”, but when I go to complete it I get a bunch of error messages.

{
    "data": {
        "draftOrderComplete": {
            "draftOrder": {
                "id": "gid://shopify/DraftOrder/1507734389120",
                "order": null,
                "__typename": "DraftOrder"
            },
            "userErrors": [
                {
                    "field": null,
                    "message": "The previously proposed price for this merchandise was invalid and has been updated.",
                    "__typename": "UserError"
                },
                {
                    "field": null,
                    "message": "The previously proposed price for this merchandise was invalid and has been updated.",
                    "__typename": "UserError"
                },
                {
                    "field": null,
                    "message": "The previously proposed price for this merchandise was invalid and has been updated.",
                    "__typename": "UserError"
                },
               { ... continued for 130 lines ... }
                {
                    "field": null,
                    "message": "The supplied custom discount was not honoured.",
                    "__typename": "UserError"
                },
                {
                    "field": null,
                    "message": "The supplied custom discount was not honoured.",
                    "__typename": "UserError"
                },
                {
                    "field": null,
                    "message": "The supplied custom discount was not honoured.",
                    "__typename": "UserError"
                },
                { ... continued for 130 lines ... }
            ],
            "__typename": "DraftOrderCompletePayload"
        }
    },
    "extensions": {
        "cost": {
            "requestedQueryCost": 11,
            "actualQueryCost": 11,
            "throttleStatus": {
                "maximumAvailable": 2000,
                "currentlyAvailable": 1989,
                "restoreRate": 100
            }
        }
    }
}

This seems more likely to happen when there are more lines items on the order.

I would expect that the draft order should not return “ready” if it is going to change prices on me.

If I view the draft order in the admin section, everything looks fine, and the prices show up in the customer’s currency (different from the store’s base currency).

This is happening on a client’s store. Using API version 2025-01.

Update:

We actually can’t complete this draft order even from the admin section…

So I don’t think this actually has anything to do with the draft order not being “ready”.

I found the issue.

I had inadvertently sent in an empty “appliedDiscount” field when creating the draft order. And in this appliedDiscount field I supplied the store’s base currency.

When this differed from the customer’s currency the draft order was not able to be completed.

After removing this from the draft order creation process, it all worked as expected.

Great to hear you figured this out and thanks for updating the post here Ozzy!

Hey @Liam-Shopify
We’ve encountered the same error, and we are using the correct currencies in the payload.
This works properly with an older API version (2024-10), but not with 2025-01.

Could you please help with it?
(Supplier store currency is AUD for sure)

Draft order payload:

{
    "input": {
        "presentmentCurrencyCode": "AUD",
        "shippingLine": {
            "price": 13,
            "title": "Custom Shipping"
        },
        "lineItems": [
            {
                "variantId": "...",
                "quantity": 1,
                "appliedDiscount": {
                    "valueType": "FIXED_AMOUNT",
                    "title": "Supplier Discount",
                    "value": 25.8,
                    "description": "Supplier Discount",
                   "amountWithCurrency": {
                           "amount": 25.8,
                           "currencyCode": "AUD"
                  }
                }
            }
        ],
        "billingAddress": {
            ...
        },
        "shippingAddress": {
          ...
        },
        "email": ...,
        "note": null,
        "tags": "App",
        "customAttributes": [
            {
                "key": "Syncee Order Number",
                "value": "...."
            },
            {
                "key": "Retailer Domain",
                "value": "..."
            }
        ]
    }
}
1 Like

Let me also attach the CalculateDraftOrder result.
Could you kindly provide us with your advice? Our clients are waiting to proceed with creating these orders.

{
    "data": {
        "draftOrderCalculate": {
            "calculatedDraftOrder": {
                "customer": {
                    ...
                    "defaultAddress": {
               ....
                    },
                    "taxExempt": false
                },
                "billingAddressMatchesShippingAddress": false,
                "totalPriceSet": {
                    "presentmentMoney": {
                        "amount": "124.57",
                        "currencyCode": "AUD"
                    },
                    "shopMoney": {
                        "amount": "124.57",
                        "currencyCode": "AUD"
                    }
                },
                "lineItems": [
                    {
                        "appliedDiscount": {
                            "amountSet": {
                                "presentmentMoney": {
                                    "amount": "25.8",
                                    "currencyCode": "AUD"
                                },
                                "shopMoney": {
                                    "amount": "25.8",
                                    "currencyCode": "AUD"
                                }
                            },
                            "value": 25.8,
                            "valueType": "FIXED_AMOUNT",
                            "description": "Syncee Supplier Discount"
                        },
                        "discountedTotalSet": {
                            "presentmentMoney": {
                                "amount": "111.57",
                                "currencyCode": "AUD"
                            },
                            "shopMoney": {
                                "amount": "111.57",
                                "currencyCode": "AUD"
                            }
                        },
                        "product": {
                            ...
                        },
                        "quantity": 1,
                        "requiresShipping": true,
                        "sku": "...",
                        "taxable": true,
                        "title": "...",
                        "variantTitle": null,
                        "variant": {
                            "id": "gid://shopify/ProductVariant/..."
                        },
                        "weight": {
                            "value": 1.022,
                            "unit": "KILOGRAMS"
                        }
                    }
                ],
                "totalTaxSet": {
                    "presentmentMoney": {
                        "amount": "0.0",
                        "currencyCode": "AUD"
                    },
                    "shopMoney": {
                        "amount": "0.0",
                        "currencyCode": "AUD"
                    }
                },
                "totalDiscountsSet": {
                    "presentmentMoney": {
                        "amount": "25.8",
                        "currencyCode": "AUD"
                    },
                    "shopMoney": {
                        "amount": "25.8",
                        "currencyCode": "AUD"
                    }
                },
                "shippingLine": {
                    "id": null,
                    "custom": true,
                    "shippingRateHandle": null,
                    "title": "Custom Shipping",
                    "originalPriceSet": {
                        "presentmentMoney": {
                            "amount": "13.0",
                            "currencyCode": "AUD"
                        },
                        "shopMoney": {
                            "amount": "13.0",
                            "currencyCode": "AUD"
                        }
                    }
                },
                "presentmentCurrencyCode": "AUD"
            },
            "userErrors": []
        }
    },
    "extensions": {
        "cost": {
            "requestedQueryCost": 16,
            "actualQueryCost": 16,
            "throttleStatus": {
                "maximumAvailable": 20000.0,
                "currentlyAvailable": 19984,
                "restoreRate": 1000.0
            }
        }
    }
}
3 Likes

Do you have any updates here?

Any updates on this @eytan-shopify @Liam-Shopify ?

I’m encountering this issue with version 2025-01, even though my process involves creating a draft order, polling it until it’s ready, and only then marking it as complete. In my specific case, I’m building a replacement order feature that applies a 100% custom discount. I’ve noticed that it fails inconsistently, particularly when the customer’s currency differs from the shop’s currency in Shopify.

NOTE: In most of the cases, there are only one or two line items in the draft orders i am creating via API.

1 Like

Hey @Shreyash, I can take a look at this. When you apply your discount, are you applying a percentage or a fixed amount? If fixed amount, can you test applying it as a percentage instead?

If you still have issues after that, can you share an example the request and variables that you’re using and I’ll attempt to replicate.

@Levente_Kovacs, are you still seeing this issue as well?

Hey @KyleG-Shopify

My discount value is always a percentage amount, specifically 100% as i am creating replacement order feature.

URL: https://${myshopifyshop}/admin/api/2025-01/draft_orders.json

Payload (data):

{
  "customer": {
    "first_name": "CUSTOMER_FIRST_NAME",
    "last_name": "CUSTOMER_LAST_NAME",
    "email": "CUSTOMER_EMAIL",
    "tax_exempt": true,
    "id": 12345
  },
  "line_items": [
    {
      "variant_id": "LINE_ITEM_VARIANT_ID",
      "price": "100.00",
      "quantity": 1,
      "properties": []
    }
  ],
  "applied_discount": {
    "value_type": "percentage",
    "value": 100,
    "amount": 90.91
  },
  "shipping_line": {
    "custom": true,
    "price": 0,
    "title": "Free Standard Shipping (2-7 Business Days)"
  },
  "email": "CUSTOMER_EMAIL",
  "customer_id": 12345,
  "billing_address": {
    "first_name": "CUSTOMER_FIRST_NAME",
    "last_name": "CUSTOMER_LAST_NAME",
    "address1": "CUSTOMER_ADDRESS1",
    "phone": "CUSTOMER_PHONE",
    "city": "CUSTOMER_CITY",
    "zip": "CUSTOMER_ZIP",
    "province": "CUSTOMER_PROVINCE",
    "country": "CUSTOMER_COUNTRY",
    "country_code": "CUSTOMER_COUNTRY_CODE"
  },
  "shipping_address": {
    "first_name": "CUSTOMER_FIRST_NAME",
    "last_name": "CUSTOMER_LAST_NAME",
    "address1": "CUSTOMER_ADDRESS1",
    "phone": "CUSTOMER_PHONE",
    "city": "CUSTOMER_CITY",
    "zip": "CUSTOMER_ZIP",
    "province": "CUSTOMER_PROVINCE",
    "country": "CUSTOMER_COUNTRY",
    "country_code": "CUSTOMER_COUNTRY_CODE"
  },
  "note": "missing",
  "tax_exempt": true,
  "source_name": "MY COMPANY"
}

JS Code snippet that i am using for testing:

await axios({
        url: shopRequestUrl,
        method: 'POST',
        headers: shopRequestHeaders,
        data: {draft_order: data},
        validateStatus: (status) => status === 201 || status === 202 // Accept 201 Created or 202 Accepted
      });

Draft order gets created successfully, here is the API response:

{
  "draft_order": {
    "id": 56789,
    "note": "missing",
    "email": "CUSTOMER_EMAIL",
    "taxes_included": false,
    "currency": "CUSTOMER_CURRENCY",
    "invoice_sent_at": null,
    "created_at": "CUSTOMER_CREATED_AT",
    "updated_at": "CUSTOMER_UPDATED_AT",
    "tax_exempt": true,
    "completed_at": null,
    "name": "#D11300",
    "allow_discount_codes_in_checkout?": false,
    "b2b?": false,
    "status": "open",
    "line_items": [
      {
        "id": 34567,
        "variant_id": "LINE_ITEM_VARIANT_ID",
        "product_id": 10101010,
        "title": "MY_PRODUCT_TITLE",
        "variant_title": "XL",
        "sku": "MY_SKU_XL",
        "vendor": "MY_VENDOR",
        "quantity": 1,
        "requires_shipping": true,
        "taxable": true,
        "gift_card": false,
        "fulfillment_service": "manual",
        "grams": 200,
        "tax_lines": [
          {
            "rate": 0.1,
            "title": "GST",
            "price": "0.00"
          }
        ],
        "applied_discount": null,
        "name": "MY_PRODUCT_TITLE - XL",
        "properties": [],
        "custom": false,
        "price": "90.91",
        "admin_graphql_api_id": "gid://shopify/DraftOrderLineItem/34567"
      }
    ],
    "api_client_id": 2919509,
    "shipping_address": {
      "first_name": "CUSTOMER_FIRST_NAME",
      "address1": "CUSTOMER_ADDRESS1",
      "phone": "CUSTOMER_PHONE",
      "city": "CUSTOMER_CITY",
      "zip": "CUSTOMER_ZIP",
      "province": "CUSTOMER_PROVINCE",
      "country": "CUSTOMER_COUNTRY",
      "last_name": "CUSTOMER_LAST_NAME",
      "address2": null,
      "company": null,
      "latitude": null,
      "longitude": null,
      "name": "CUSTOMER_NAME",
      "country_code": "AU",
      "province_code": "NSW"
    },
    "billing_address": {
      "first_name": "CUSTOMER_FIRST_NAME",
      "address1": "CUSTOMER_ADDRESS1",
      "phone": "CUSTOMER_PHONE",
      "city": "CUSTOMER_CITY",
      "zip": "CUSTOMER_ZIP",
      "province": "CUSTOMER_PROVINCE",
      "country": "CUSTOMER_COUNTRY",
      "last_name": "CUSTOMER_LAST_NAME",
      "address2": null,
      "company": null,
      "latitude": null,
      "longitude": null,
      "name": "CUSTOMER_NAME",
      "country_code": "AU",
      "province_code": "NSW"
    },
    "invoice_url": "https://${myshopifyshop}/56789/invoices/bc3df802093ef1c0a981b9205b0904dv",
    "created_on_api_version_handle": "2025-01",
    "applied_discount": {
      "description": "",
      "value": "100.0",
      "title": "",
      "amount": "90.91",
      "value_type": "percentage"
    },
    "order_id": null,
    "shipping_line": {
      "title": "Free Standard Shipping (2-7 Business Days)",
      "custom": true,
      "handle": null,
      "price": "0.00"
    },
    "tax_lines": [
      {
        "rate": 0.1,
        "title": "GST",
        "price": "0.00"
      },
      {
        "rate": 0.1,
        "title": "GST",
        "price": "0.00"
      }
    ],
    "tags": "",
    "note_attributes": [],
    "total_price": "0.00",
    "subtotal_price": "0.00",
    "total_tax": "0.00",
    "payment_terms": null,
    "admin_graphql_api_id": "gid://shopify/DraftOrder/56789",
    "customer": {
      "id": 12345,
      "created_at": "CUSTOMER_CREATED_AT",
      "updated_at": "CUSTOMER_UPDATED_AT",
      "first_name": "CUSTOMER_FIRST_NAME",
      "last_name": "CUSTOMER_LAST_NAME",
      "orders_count": 1,
      "state": "disabled",
      "total_spent": "529.98",
      "last_order_id": 8766543299,
      "note": null,
      "verified_email": true,
      "multipass_identifier": null,
      "tax_exempt": false,
      "tags": "Placed Order",
      "last_order_name": "#152460",
      "email": "CUSTOMER_EMAIL",
      "phone": null,
      "currency": "CUSTOMER_CURRENCY",
      "tax_exemptions": [],
      "email_marketing_consent": {
        "state": "subscribed",
        "opt_in_level": "single_opt_in",
        "consent_updated_at": "CONSENT_UPDATED_AT"
      },
      "sms_marketing_consent": null,
      "admin_graphql_api_id": "gid://shopify/Customer/12345",
      "default_address": {
        "id":1234567890,
        "customer_id": 12345,
        "first_name": "CUSTOMER_FIRST_NAME",
        "last_name": "CUSTOMER_LAST_NAME",
        "company": null,
        "address1": "CUSTOMER_ADDRESS1",
        "address2": null,
        "city": "Scone",
        "province": "New South Wales",
        "country": "Australia",
        "zip": "2337",
        "phone": "CUSTOMER_PHONE",
        "name": "CUSTOMER_NAME",
        "province_code": "NSW",
        "country_code": "AU",
        "country_name": "Australia",
        "default": true
      }
    }
  }
}

I have a polling logic (if i get a 202 response) until the draft order is ready

For marking draft order as complete, i am using this API: https://${myshopifyshop}/admin/api/2025-01/draft_orders/${draft_order_id}/complete.json

When i mark this draft order as complete, i am getting the following errors.

Error: The previously proposed price for this merchandise was invalid and has been updated.

The supplied custom discount was not honoured.

Just a note, REST is deprecated now so I’d advise moving over to GraphQL.

I tried graphql api as well, but i am facing this error there as well for version 2025-01. But i can confirm that this is very infrequent.

Hey @Shreyash, I was able to replicate these errors you are seeing after a lot of trial and error.

In all of the instances where I saw the error, it was caused when there was a markets setting mismatch with the Draft order details.

The first thing to check, make sure the market for the customers shipping country is assigned in the product settings. If not, it will use the store default, which will create a price discrepancy when the order is calculated at completion.

If it still fails after that, try an update mutation on the draft order, including the customers shipping address that matches. That should cause the order to calculate based on the market settings and then complete after that.

If you still get an error after going through the market settings, share the x-request-id with me from the response headers of erroring mutation and I’ll see what I can find out for you from that.

Hey @KyleG-Shopify

I can confirm that this issue does not appear to be related to a market mismatch.

I tested this by creating a product that isn’t assigned to the customer’s shipping country market and generated multiple orders, but I was unable to reproduce the error.

I also tested with existing products by removing the customer’s shipping country from the product’s market settings, as well as by disabling the market for that country entirely in my Shopify settings.

In all cases, I did not encounter the error message: “The previously proposed price for this merchandise was invalid and has been updated.”

As this error occurs very rarely for one of my customers, I’ll share the request ID with you once this error occurs again.

In the meantime, could you please provide detailed steps on how you were able to reproduce this error consistently? It would help me verify the behaviour on my end and ensure we’re testing under the same conditions.

Hey @KyleG-Shopify , just checking in to see if you could share the steps you used to reproduce this when you get a chance.

Hey @Shreyash,

Thanks for the follow up. I was consistently replicating this when creating draft orders for products where the buyer was not locating in the default market and the buyers region was not added to the product publications region catalog.

What was happening is I was creating the draft order, so it was being assigned to the default location which caused a price discrepancy as the order was being converted. The solution was to ensure that the buyers market was added to the product region catalog so that when the draft order is created or updated, the proper market pricing is being used initially.

Hey @KyleG-Shopify

I haven’t been able to reproduce this behavior on my end. For testing, I created a product called “iPhone 17 Pro,” which is only available in the Canada region. I then created a draft order using a customer account with an address in the Netherlands and completed the order without any issues.

Product:

Order:

I also tested by changing the customer’s region to Australia, and the process still worked fine. In both cases, the currency conversion worked properly, so I’m still unable to replicate the issue you described.

I’ve got the request IDs you asked for to help narrow down the issue. Could you please DM me? I’m new here and don’t have DM access yet.

1 Like

Hello,

I’m facing the same issue with some of our Draft Orders. The process has been working fine for a couple of years now.

The returned error is : The supplied custom discount was not honoured

It seems that this is occurring with orders that have been created a few weeks before the completion. Is there any kind of check on product prices or customers that is causing the error?
Through the back office I can manually complete the order so why the issue is only thrown by the API?

Thanks.

Hey @AlanBilli, thanks for sharing that. From what I was seeing when I was looking in to Shreyash’ issue was the errors occurred when there was a mismatch from the draft order and the validation as it’s converted to a real order (Look in to the products, markets, store currency, etc).

If this is happening on specific orders it may help to reach out to our support teams as well so they can look at the order and the context around it to narrow this down. However, if you can replicate this on multiple stores, share the steps that I can take to replicate and we can dig in further!