You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

SquarePOS问题:API创建的交易未显示在仪表盘如何解决?

Troubleshooting Missing Square POS API Orders in the Dashboard

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 4xx error (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, the base_price_money.amount is 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 a currency field, like:
      "base_price_money": {
        "amount": 100,
        "currency": "EUR"
      }
      
  • If you get a 200 OK response, check the returned order object. Does it have a valid id? What’s its state (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/locations API 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 DRAFT state, it might not show up until you convert it to OPEN or COMPLETED (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 payments array 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

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.26 09:46:42