SquarePOS问题:API创建的交易未显示在仪表盘如何解决?
Let’s walk through the key steps to figure out why your order isn’t showing up in the Square POS dashboard:
1. First, Check the API Response in Postman
You didn’t mention what response you got from the API, so this is the first critical step. In Postman, look at the response status code and body:
- If you get a
4xxerror (like 400, 401, 403), that means the request failed entirely. For example:401 Unauthorized: Your Bearer token is invalid or doesn’t have the right permissions (make sure it’s for the correct environment: sandbox vs production).400 Bad Request: Likely a malformed JSON payload. Looking at your request, thebase_price_money.amountis cut off (1...) — this is definitely invalid. Square requires amounts to be in the smallest currency unit (e.g., 100 for $1 USD) and paired with acurrencyfield, like:"base_price_money": { "amount": 100, "currency": "EUR" }
- If you get a
200 OKresponse, check the returnedorderobject. Does it have a validid? What’s itsstate(e.g.,DRAFT,OPEN,COMPLETED)?
2. Match API Environment to Your POS Dashboard
Square has separate sandbox and production environments. If you’re using a sandbox Bearer token, your order will only appear in the sandbox version of the dashboard — not your live POS dashboard. Double-check that your token and dashboard are using the same environment.
3. Verify the location_id is Correct
The location_id in your request URL (https://connect.squareup.com/v2/locations/*****/orders) must correspond to a location that’s linked to your POS device. To confirm:
- Call the
GET /v2/locationsAPI endpoint with your token to list all your locations. - Compare the ID in your request to the IDs returned — make sure it’s the exact ID for the location you’re checking in the POS dashboard.
4. Check the Order’s State and Visibility
Square’s POS dashboard might not display all order states by default:
- If your order is in
DRAFTstate, it might not show up until you convert it toOPENorCOMPLETED(either via API or manually in the POS). - If you didn’t attach a payment to the order, it might be marked as incomplete. Try adding a
paymentsarray to your request (or processing the payment in the POS) to see if it appears.
5. Test with a New Idempotency Key
Square uses the idempotency_key to prevent duplicate orders. If you’ve already used 123456AZD in a previous request, the API will return the existing order instead of creating a new one. Try generating a unique key (like a UUID) and resending the request.
6. Review Developer Console Logs
Log into your Square Developer Dashboard, navigate to your app, and check the API Request Logs. This will show you every request you’ve sent, including detailed error messages, response bodies, and timestamps — it’s often the fastest way to spot issues you might have missed in Postman.
内容的提问来源于stack exchange,提问作者Arthur Attout

