Square terminal payment using terminal device and flutter app with backend

I want to add terminal payment of square . Now i want to know that if i add terminal apis that creates terminal checkout i have tested from sandbox it shows pending after while it got cancelled with timeout reason . I found that checkout all over my dashboard but i didn’t get anything so that i can make manually complete the payment checkout . Now someone please tell me how can i add terminal payment in flutter . I have a terminal device how can i connect it with my app . i have a shopping app thats on checkout customer can pay using terminal and terminal device will send me that payment done / failed and based on response i will show screen and post that response in backend . i can use device token for that . But i don’t know how to use that . i dont even know that my thought process is correct or not . can anyone describe please how terminal payment works in square and how could i add in my app.

or
Is there any way to use my mobile NFC to read card and pay through terminal api?