Terminal API Test Device ID Not Successfully Completing

Hmm it’s a US account but the location_id in the checkout object is null - we are setting that when we create the device code. I will investigate that some more, to see if we’re losing track of something on our end and get back to you if it doesn’t see to be that. Thanks for the help!

I tried to create a new topic for this but I can’t seem to do that - apologies for responding on a solved issue. How would that get linked up with my device code? I set the location_id when created the device code and I see it in the response:

This is what my create device code response looks like:

{
    "success":true,
    "data":{
       "device_code":{
          "id":"REXWPW5J0T60A",
          "name":"The Terminal",
          "code":"TXMPDA",
          "product_type":"TERMINAL_API",
          "location_id":"YQZ8K6H2VZB23",
          "status":"UNPAIRED",
          "pair_by":"2023-04-05T15:46:04.000Z",
          "created_at":"2023-04-05T15:41:05.000Z",
          "status_changed_at":"2023-04-05T15:41:04.000Z"
       }
    }
 }

And my create checkout response looks like this (except with the app ID, which I removed just in case it’s not something good to share here):

 {
    "checkout": {
        "id": "sGOUc584kPqqO",
        "amount_money": {
            "amount": 1746,
            "currency": "USD"
        },
        "payment_options": {
            "autocomplete": true
        },
        "device_options": {
            "device_id": "9fa747a2-25ff-48ee-b078-04381f7c828f",
            "skip_receipt_screen": true,
            "collect_signature": false,
            "tip_settings": {
                "allow_tipping": false
            }
        },
        "deadline_duration": "PT5M",
        "status": "PENDING",
        "created_at": "2023-04-05T15:42:08.757Z",
        "updated_at": "2023-04-05T15:42:08.757Z",
        "app_id": "",
        "payment_type": "CARD_PRESENT"
    }
}

Are you in production now? The Devices API is only for production payments? :slightly_smiling_face:

Ah - I misunderstood the notice on the docs, I thought that it meant that there wasn’t a test mode option on the device itself, not that we couldn’t run the other requests in test mode.

I’m getting a different error now, Merchant not authorized for device_id=9fa747a2-25ff-48ee-b078-04381f7c828f, but I will look into that and make a new topic if I can’t resolve it.

@peter_ts did you figure out? I got same error recently but in production

@eriknyk were you able to figure out the issue? When you get this error in production it means that there’s a configuration issue with credentials and device codes. :slightly_smiling_face: