Order Webhook Missing order

Hi, I recently had two orders come through on our system but the webhook only sent the first of the two orders that went through. The ID that came through was “7OS9PLWIBWs9uwi4N4cizxwp9NWZY” and the one that did not come through was “25D7VmbFvIRCMedhU3OSm8qeV”. Is there a difference in the two? Is one considered not an order?

For the order that did create the event did you create the order in the POS? Otherwise the orders webhook won’t fire for payments taken within the Square POS. Instead we recommend listing to payment.created and payment.updated to get the order_ids. :slightly_smiling_face:

This is most likely the reason. If a member uses the app instead, will the payment.created also be fired along with order webhooks?

Yes, the payment.created event will fire on every payment. :slightly_smiling_face:

Are order.created events ever fired from a POS sale? I thought I had been testing this in the sandbox virtual terminal (desktop), but it seems the virtual terminal and app POS are two different forms of transactions.

What webhook should I be using when a sale is made on the POS?

At this time POS sales won’t trigger any orders events. Yes, Virtual Terminal is different and uses the Orders API which is why you got an event.

For POS sales you’ll want to listen for payment.created and payment.updated events. :slightly_smiling_face:

1 Like

Is there a way to sandbox test POS sales?

Actually, I just realized that both orders were created with the App. So now I’m wondering why the first order fired an order.created event again?

At this time there isn’t a way to sandbox test for POS sales. As for getting webhooks for orders created on the POS the team is looking into this. :slightly_smiling_face:

I just tested this again with my app and made a cash payment and saw that there was an order webhook come through for it.

Another discrepancy from the one that failed to send a hook and the current one is that the receipt has " Order Source: [Point of Sale]" and the one that didn’t send a webhook does not have that recorded.