Terminal checkout returning payment IDs that do not exist

Terminal checkouts have just started returning two payment IDs, one of which does not exist. Example:

 {
  "checkout": {
    "id": "I9MvevSFTqoqO",
    "amount_money": {
      "amount": 520,
      "currency": "GBP"
    },
    "reference_id": "1349637",
    "note": "Transaction 1048609 payment 1349637",
    "device_options": {
      "device_id": "238CS145B2003163",
      "collect_signature": true,
      "tip_settings": {
        "allow_tipping": false
      },
      "skip_receipt_screen": true
    },
    "status": "COMPLETED",
    "payment_ids": [
      "J6d7XtsN9BG9mcLmfAIRqFvCuaB",
      "R5Tqtzr2rupVtpXlyZ5vzMqeV"
    ],
    "created_at": "2024-11-11T22:05:49.773Z",
    "updated_at": "2024-11-11T22:06:09.962Z",
    "app_id": "sq0idp-ks4judTCWHPcDz85hCk7qg",
    "location_id": "LTJJM6TXGSTRR",
    "payment_type": "CARD_PRESENT",
    "payment_options": {
      "autocomplete": true
    }
  }
}

In this case, payment ID J6d7XtsN9BG9mcLmfAIRqFvCuaB does exist, and payment ID R5Tqtzr2rupVtpXlyZ5vzMqeV does not exist.

This is causing problems!

:wave: I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:

Additional Documentation

Retrieve Payments
Troubleshoot the Payments API
Retrieve Refunds

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.

I’ve reached out to the team about this. The ID R5Tqtzr2rupVtpXlyZ5vzMqeV is the order_id and shouldn’t be in the payment_ids array. :slightly_smiling_face:

The team deployed a fix for this and the checkouts are returning normally now. :slightly_smiling_face:

I see new checkouts are working as expected, but checkouts that were created before still have multiple entries in the payment_ids array (eg. if I re-fetch the checkout shown above, it still has R5Tqtzr2rupVtpXlyZ5vzMqeV).

I’ve deployed a workaround for this in my application — I’m just noting it here in case it’s affecting anyone else.