How to specify merchantOfRecord when creating draft order

I have an app that creates an order with 100% discount for a customer. They way it is done is by calling draftOrderCreate mutation then completing the order.

I am getting “Change merchant of record on this order to do the following: create an order with zero value.” for 1 of our customers.

How do I set this?

I can see we can retrieve the value New Merchant of Record application field in order object - Shopify developer changelog but can not find a way to set it.

1 Like

Hey @kolem,

It sounds like this customer is from a managed market, which would explain the error you’re seeing. The merchant of record gets automatically selected based on the customer’s shipping address or market configuration as opposed to setting this with the API. For customers in managed markets with free orders you’ll need to change the merchant of record through the admin interface after creating the draft order.

The managed markets documentation specifically mentions the current limitations.

Hope that helps.