We built a plugin that sends a JSON object to our POS via API.
By using the New Order webhook, we are able to achieve what we needed.
Now, we need a way to validate that the order has actually been paid.
We receive payments via a credit card gateway, and once the payment is complete, the order changes its status from "Payment pending" to "processing".
Once the order does this, we should send the JSON object.
We tried using the is_paid() function, which works great before sending the order, but the problem is sending the JSON object once the payment is completed after it has failed before.