Device ID in Terminal API Activation Flow

I’m trying to understand how to track the devices on the device activation flow with Terminal API.

Initially we Create a Device Code (POST /v2/devices/codes - Square API Reference)

In this step, we are passing an idempotency_key and a name.

Once the code is entered in the Terminal device, we receive a webhook. (device.code.paired Webhook - Square API Reference)

How to track which create device request sent which webhook?

And after that, in the Payment Flow (Take Payments with the Terminal API), what’s the Device ID I should add to the request?

I need to find the ID to track the device and request payments.

Once the device is paired you’ll get the device_id that you’ll use to pass in the CreateTerminalCheckout request to take a payments. This device_id will allow you to track events within your application. :slightly_smiling_face: