I am working with a coffee shop to implement some loyalty software. I would like to integrate this software with Square.
I have been able to match up the Square Customer Id with the loyalty user Id (saved loyalty user id as a reference id) so I can update loyalty points to the correct loyalty member based on the total of their transaction. I award 1 point for every $1 spent.
I am keeping track of loyalty point totals for each member and all of the calculations and logic are done in the loyalty software.
The problem I’ve run into is currently, I have no way of sending a loyalty member’s points total to the POS system so the cashier can know if they are eligible for a reward.
In my ideal world, one of the below options would be possible.
Option 1: Cashier Redeems Loyalty Points For Rewards
-
The cashier scans the customer’s loyalty QR code with the built-in camera on the POS system.
-
A window/interface is opened on the POS system that shows the customer’s name, their loyalty points total, and any rewards they can redeem.
-
Cashier tells the customer what rewards they have available and asks if they would like to redeem them.
Option 2: Customer Redeems Loyalty Points For Rewards
-
The cashier opens the camera on the customer-facing display so that the customer can scan their loyalty QR code
-
Once scanned, the display updates with the customer’s loyalty points total and if eligible, the rewards they can redeem.
-
The customer can choose to press a reward on the display to redeem, and then that reward is sent to the POS so the cashier knows what reward they want to redeem.
Are either of these options possible? Or is there a better way of going about this while still using the API and webhooks?
Thank you!
At this time with the Square POS the ability to add custom workflows like a loyalty redemption process from a 3rd party loyalty program within the Square app isn’t currently available. You’ll need to build with Square’s Loyalty API to be able to redeem within the Square app.
Thank you for the information, I appreciate it.
I am also using the webhook subscription payment.updated and I am receiving two inbound webhooks for every one successful payment.
It looks like the only difference between the two webhooks is the event Id. They are sent within 10 seconds of each other. Is there a way to only receive one webhook for one transaction?
Webhooks may be sent more than once. You’ll need to respond with a 2xx
HTTP status code to Square as soon as possible to acknowledge the receipt of the event notification. If your application fails to acknowledge in a timely manner, a duplicated event will be sent that your application has 10 seconds to respond to.
Sending a second webhook makes sense if a response with 2xx doesn’t occur within ten seconds.
I took another look and all of the inbound webhooks are sent a second time even though they are under ten seconds. Is there possibly another reason why I would be receiving two webhooks for these payments?
You’ll only see one log for the events in the Webhook Logs at this time. I’ve confirmed with the team that this is the expected behavior. If you have the ability to increase the response time to respond as soon as possible it will eliminate the duplicate event.
1 Like
Hi Bryan,
Sorry for the delay in getting back to you on this. I believe my application responds with a 2xx response code within ten seconds of the virtual terminal taking payment in the Sandbox environment.
It looks like some of these inbound webhooks are being sent to my application within 3 seconds of each other and the only thing that is different in the payload is the Event Id.
Is this normal? Or am I perhaps reading the webhook logs incorrectly?
Thank you!
This is the expected behavior with Square’s webhooks.