Sandbox Application ID linked with a location

Trying to use the sandbox account.
Cannot use the location from sandbox test account to the application ID. Is anybody that can help me out with this please?

:wave: What errors are you getting and what APIs are you calling? Also what is your application ID? :slightly_smiling_face:

Hi again, sandbox-sq0idb-0BJ7J3oaiWzSjqoHbsZQRA the app ID. Errors are ‘forbidden’
I’d like to have the Store 2 location and dashboard linked to the above app ID and I am not allowed. I used the Store 2 Location ID along with the token from app ID and they don’t go toghether, just trying to place order :frowning:

Any idea? If I look to the API calls, is posting the order, and the payment. If I retrieve the order using the location ID along with sandbox token I get an empty 200 OK. Not sure why the new location added to the new sandbox test account is not working.

With our sandbox each sandbox test account represents a single Square test account. Each test account can have multiple location within that test account. The forbidden error is because you are trying to process a payment with a location that isn’t associated to the access token you are using.

If you are using the Default test account as your main location you will need to create a location within that account. You can do so with CreateLocation or in the Default test account seller Dashboard. Once you’ve created the location you can ListLocations to get the location_id of the newly created location.

When you process a payment to the newly created location you will then be able to see all the payment in the Default test account. :slightly_smiling_face:

Bryan, I am not asking using the Default account. I like to use the Store 2 sandbox test account with it’s location associated. Can you look above to the image please?

Okay great. You can definitely use Store 2 for processing the payments. You will need to use the access token for that sore which you can get by clicking the three dots next to. Open. Once you have the access token then you can make API calls to that account.

That’s why I am saying, is not working. Token from Store2 with location ID from within Store 2 Business location Bryan

When you call ListLocations with the token you are using is the location_id you are passing in the payment request in the response?

200 OK

{
  "locations": [
    {
      "id": "LWY6WPNRR3ENF",
      "name": "Store 2",
      "address": {
        "address_line_1": "my address",
        "locality": "my loc",
        "administrative_district_level_1": "PA",
        "postal_code": "12045",
        "country": "US"
      },
      "timezone": "UTC",
      "capabilities": [
        "CREDIT_CARD_PROCESSING"
      ],
      "status": "ACTIVE",
      "created_at": "2021-11-09T16:13:33Z",
      "merchant_id": "myid",
      "country": "US",
      "language_code": "en-US",
      "currency": "USD",
      "phone_number": "1234567890",
      "business_name": "my name",
      "type": "PHYSICAL",
      "business_hours": {},
      "business_email": "my email",
      "mcc": "7299"
    }
  ]
}

when I do api calls not taking the orders. Yes I pass payment, fulfillment all

Okay, after looking at the account I see that all the payments were completed with autocomplete set to false. This puts the payment in an authorized state and the payment won’t show in the Dashboard. Once you complete the payment by calling CompletePayment with the payment_id will it show in the Dashboard. :slightly_smiling_face:

The CompletePayment is called before or after the PayOrderRequest ?

Oh, are these payments that are all associated to a single order? If so you can can just call PayOrder with the payment_ids and that will work. :slightly_smiling_face:

No, all these payments are individual. The last one is rHecv30lUcw3oV62a9xKM79o8vPZY

Okay, then you can just call CompletePayment with them. PayOrder is only for when you have multiple payments associated to a single order and you need to pay the order once all payments are collected. :slightly_smiling_face:

Not working Bryan, I mean something I missed.
Payment ID rHecv30lUcw3oV62a9xKM79o8vPZY
trying to retrieve it using the LQGST1XZNKA2V as a location ID along with my Store 2 token is not found.
My SquareClient using the above connections

That’s not the payment_id. That’s an order_id the payment_id for that is BMq0LJOe8yDeoeDDUNa9IoMW2eTZY . Also the location_id for that payment is LWY6WPNRR3ENF . You won’t be able to complete the order with the other location LQGST1XZNKA2V . You can only complete a payment to a location that the order is associated to.

What do I need to set in order to use the above location taking orders besides the Store 2 token? All my syncs are 100% accurate using that token and app ID

When you CreateOrder you will need to use LQGST1XZNKA2V as the location_id.

With the Store 2 Token right? This is what I did, not going through, even on transactions is not