This is a new problem as of 2022.06.25 today.
Square is sending webhook for terminal.checkout.updated and payment.updated without terminal.checkout.created. Log has a lot of 500 status errors rather than 200. Of course, I understand webhook will not be in perfect order but more than 25 min. is kind of an issue.
Later terminal.checkout.created is found (reported about 25 to 30 min. later). I can provide Square terminal checkout id to search log on this issue. This is new. So far, I was updating as terminal.checkout.created â terminal.checkout.updated(completed).
Here is my solution. I was inserting terminal.checkout.created by webhook. I will insert from site now, not by webhook.
Has any of you encountered this issue today (well, today is the first time on this issue)?
1 Like
We are experiencing the same issue with Square terminals in our Kiosk installations. 20-30min delays.
Follow ups on this issue.
-
Insert (data to your host database for webhook) terminal.checkout.created from âPOSâ, not by webhook. It is possible and verified that Squareâs webhook for terminal.checkout.created may send âterminal.checkout.createdâ after 25 to 30 min. from the initial creation from the site.
-
Check both [terminal.checkout.updated (COMPLETED)] and [payment.updated (COMPLETED)].
- For terminal.checkout.updated on COMPLETED, and ârecord on databaseâ is not found on your online DB, insert. (ex: site lost Internet connection to update online database on initial terminal.checkout.created.)
- For payment.updated on COMPLETED, and ârecord on databaseâ is not found on your online DB, read serialized object of payment. This is almost impossible case but it happens. Get string from payment object as [[âterminal_checkout_idâ : âTeRmiNaLCHeckoutiDxxYY38_OR_WHATEVER.â]] Insert into your online DB with this checkout id. Remember, we are handling only âCOMPLETEDâ payment here.
There is no way to get âterminal_checkout_idâ from payment object. However, you will see âterminal_checkout_idâ from developersâ Log on Square developer page. This is the reason why you need to get string from payment object as [[âterminal_checkout_idâ : âTeRmiNaLCHeckoutiDxxYY38_OR_WHATEVER.â]]. I wish Squareâs payment object include terminal.checkoutID all the time but this is not the case.
This is how I am handling on cases when Square webhook update on payment. If you have better method in coding, please let me know.
The team was able to identify and resolve the issue.