Need help with draft order api in shopify pos.

I am trying to use the Draft Order API to support creating an order that can contain multiple variants. Currently, I am testing the sample code provided in Shopify’s documentation, but I am encountering an error. Could you please guide me?

Check for these common issues:

  1. Correct Variant IDs: Ensure the variant_ids exist in your store.
  2. API Permissions: Verify your API credentials have the necessary permissions.
  3. Valid JSON: Confirm the JSON structure is correctly formatted.

If you’re still encountering an error, please share the specific error message for more targeted help.

Currently, my app is using Smart Grid to handle adding customers or adding to the cart. However, the Draft Order API is a separate target that is not handled within Smart Grid. So, when I add a screen for Draft Order to check how it work, the POS displays Error loading extension. I’m unsure where the Draft Order API is processed within the POS (cart or order), so i need to test the sample code to find where it render