Hi ,
I am creating an app that will work with square Api which will sit on the merchant’s. Our backend will be listeining to payment.create webhook, which has the device_id field. Is there a way our app, that sits on the merchant’s device/terminal can access the device_id that its been installed on?
I have been looking throgh the apis and sdk and listDevice seems like an option.
Can someone elaborate on this. Seems like a common enough usecase.
Is this with the Terminal API? If so you can use ListDevices to get all the devices that have been paired. The device_id in the body of the response is the serial number of the Terminal device so you can identify which device it is.
As of now we were not planning on integrating with the terminal api. We basically needed access to receipt information along with device_id which is available in the payment webhook. From that point on, we need to make an api call from the app sitting on merchant’s device containing the device_id and some other information regarding the user. Does this require an integration with terminal api?
Thanks.
What Square product are you using to process the payment with? Currently device_details is only available in the webhook for in person payments.
Also if you’re getting the payment webhook the sellers app can can call our Payments API with the payment_id to get all the payment information that includes the receipt_url and device_details.