Hope you’re doing well! I have a question regarding the Loyalty Events Webhook for the “Create Reward” event.
We’ve noticed that in some cases, the “Create Reward” webhook is not sent. Specifically, when a Reward is created via the API and then deleted immediately afterward, we only receive the “Delete Reward” webhook — the “Create Reward” webhook never arrives.
Our team has encountered this behavior several times, so we’d like to confirm:
If a newly created Reward is deleted within a short time after creation, could this prevent Square from sending the “Create Reward” Loyalty Events Webhook?
Thank you very much for your help and clarification!
I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:
If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.
Thank you for reaching out with your question about the Loyalty Events Webhook.
Based on the information provided in the Square documentation, it seems that when a reward is created and then immediately deleted, the “Create Reward” webhook event might not be sent if the deletion occurs before the system processes the creation event. This behavior can occur because webhook events are processed asynchronously, and if the deletion happens quickly enough, it might prevent the “Create Reward” event from being dispatched.
This is consistent with the behavior you’ve observed, where only the “Delete Reward” webhook is received. The system prioritizes the latest state of the reward, and if the reward is deleted before the “Create Reward” event is processed, it might skip sending the creation event.
If this behavior is causing issues for your application, you might consider implementing a delay or a check to ensure that the “Create Reward” event is processed before allowing a deletion, or handle the logic in your application to account for this scenario.
I hope this helps clarify the situation. If you have any further questions, feel free to ask!