When I create an order in Virtual Terminal on Sandbox, my webhook for “order.created” gets called and the “state” field is set to “OPEN”. But when I immediately call “retrieve_order” API to get the full info for that order, I see the state of the order is “COMPLETED”. Is this a bug or a timing issue of webhook being called a little too fast? It hard to believe a timing issue here because I tested by returning an HTTP failure code from the webhook so it calls my webhook again after a little while. I still see the status in webhook call as “OPEN” but the order seems to have already been in COMPLETED state. In fact, the dashboard “Transactions” report shows the order as COMPLETED even when webhook says it’s OPEN.
I imagine the virtual terminal basically creates the order and then immediately pays for it. I tested with my own sandbox and I almost instantly receive 4 webhooks: 1
order.created followed by 3
order.updated was also
OPEN, and then the next two were
To be clear: an order cannot be created via the API in a
COMPLETED state, so I assume the virtual terminal has the same limitation.