Applying a discount to multiple open orders via the Orders API

I’m building a promotions integration for SMBs. At a set time, the seller wants to apply a percentage discount to every order currently open at a location, then let those checks close normally.

Four questions:

  1. Can an OAuth-authorized app add an order-level discount to an open order with UpdateOrder, or does staff have to apply it on the POS?

  2. Is there a supported way to do this across many open orders at once, or do I iterate SearchOrders filtered to OPEN and update each one?

  3. Does a discount added this way flow into the payment and the seller’s reporting the same as a POS-applied discount?

  4. If neither is the right approach, what’s the recommended pattern for applying a discount to open checks from an integration?

Thanks.

  1. An OAuth app can apply a discount to an OPEN order via update order but it cannot update an order created on the POS
  2. Call SearchOrders with the OPEN state and target the correct location_id (s). You will have to iterate the returned list. A gotcha hear is if a POS or other system updates an order while you are holding a local copy of the object you will get a version mismatch error. Re-fetch that order and try again.
  3. Yes the discount will show up in reporting as we show the calculated totals before and after discount.
  4. You’re on the right path! Just note the orders on POS limitation