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?

@Junayed Thanks for reaching out. Did you follow the Terminal API guide here? Take One-Off Payments. Could you also help me understand what errors you’re seeing when you call the Terminal API?

Hello,

I’m trying to integrate Square Terminal payments into my Flutter shopping app and I’m a bit confused about the correct architecture and flow.

What I’m trying to achieve

At checkout in my app:

Customer selects “Pay via Terminal”
I send a request to create a Terminal checkout
The payment is completed on a Square Terminal device
My app receives the final status (completed / failed)
I update my backend and show success/failure UI in the app

I already have a Square Terminal device and I’m testing using the Sandbox.

When I create a Terminal checkout in sandbox:

It shows PENDING in my dashboard
After some time, it becomes CANCELLED (timeout)
I don’t receive any usable response in my app to manually confirm or complete the payment
I can see the checkout in Square dashboard, but no real-time update is coming back to my app