A few queries about the Draft Order API that aren’t convered in the documentation.
Is it possible to set the payment gateway for a new order created from the draft
Can you ‘Hold Stock’ for a draft order created through the API (Like you can in the admin panel)
Is it possible to mark an order created from the draft as ‘authorized’ instead of paid, or pending. If not what is the point in pending? You can’t actually capture a payment for the new order through the API then, nor add a new Authorization since the order has already been created. The only way to change the new order from ‘Pending’ to ‘Paid’ is to manually do it via the admin panel.
Unfortunately not.. I ended up taking the approach where I create a new order via the Order API matching the Draft Details, after which I then either deleted the Draft Order, or added a note indicating it had been turned into x order.
A few things to be aware of with the Order API that they don’t make very clear in their documentation.. You cannot mark an API order as paid, if you didn’t mark it as ‘Authorized’ or ‘Paid’ during its creation. You can however if it was created via the Shopify Checkout. You can no longer directly mark orders as Paid, instead you need to add a transaction of ‘capture’ and ‘success’. If you want to temporarily hold stock for an order, the only method is to create a genuine Order, and cancel it after x period of time, the ‘Temporary Stock Holding’ for the Draft API isn’t a thing, although you can do it via the Shopify Admin (Frustrating). When Re-Stocking an Order, you need to Re-Fund it first, and pass in a Location ID (sort of a Warehouse) even if your Shopify Store doesn’t use this functionality.
I’ve worked through a lot of ‘Kinks’ with the Shopify Admin API, so let me know if you have any queries because Shopify certainly won’t answer you.