# Where to put applicationId and locationId for Web Payments SDK Quickstart

**URL:** <https://developer.squareup.com/forums/t/where-to-put-applicationid-and-locationid-for-web-payments-sdk-quickstart/4918>\
**Category:** Questions\
**Tags:** sandbox, web-payments-sdk\
**Created:** [January 25, 2022, 1:31pm UTC](https://developer.squareup.com/forums/t/where-to-put-applicationid-and-locationid-for-web-payments-sdk-quickstart/4918 "2022-01-25T13:31:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahmednaeem1098](https://avatars.discourse-cdn.com/v4/letter/a/46a35a/32.png) [@ahmednaeem1098](https://developer.squareup.com/forums/u/ahmednaeem1098)\
**Post date:** [January 25, 2022, 1:31pm UTC](https://developer.squareup.com/forums/t/where-to-put-applicationid-and-locationid-for-web-payments-sdk-quickstart/4918/1 "2022-01-25T13:31:05Z")

</div>

I followed the github repository and put my sandbox token into .env.example. Also tried putting the token into .env.sandbox. I keep getting application and/or locationId is incorrect. Where do I put these values?

---

<div class="post-metadata">

**Author:** ![mxb](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/mxb/32/30_2.png) [@mxb](https://developer.squareup.com/forums/u/mxb)\
**Post date:** [January 25, 2022, 5:01pm UTC](https://developer.squareup.com/forums/t/where-to-put-applicationid-and-locationid-for-web-payments-sdk-quickstart/4918/2 "2022-01-25T17:01:27Z")

</div>

Your access token (for server API calls) goes in `.env.sandbox` (see [Credentials section of README](https://github.com/square/web-payments-quickstart#credentials)). Your applicationId and locationId will need to be inserted in each example replacing `{APPLICATION_ID}` and `{LOCATION_ID}` (see [here](https://github.com/square/web-payments-quickstart/blob/main/public/examples/card.html#L10-L11)).

---

<div class="post-metadata">

**Author:** ![ahmednaeem1098](https://avatars.discourse-cdn.com/v4/letter/a/46a35a/32.png) [@ahmednaeem1098](https://developer.squareup.com/forums/u/ahmednaeem1098)\
**Post date:** [January 26, 2022, 1:17pm UTC](https://developer.squareup.com/forums/t/where-to-put-applicationid-and-locationid-for-web-payments-sdk-quickstart/4918/3 "2022-01-26T13:17:51Z")

</div>

Continuing the discussion from [Where to put applicationId and locationId for Web Payments SDK Quickstart](https://developer.squareup.com/forums/t/where-to-put-applicationid-and-locationid-for-web-payments-sdk-quickstart/4918):

Thank you for the response. I’m still getting an error after replacing applicationId and locationId in all files. Not sure what I’m doing wrong. This is what I did:

1. Add Sandbox Access token to .env.example
2. run cp .env.example .env.sandbox
3. Add const appId = ‘sandbox-sq0idb-p7CscPwMnKlqz5Y1eKHUZw’; for all files
4. Add const locationId = ‘LYZF618E5H0R6’; for all files
5. Run Server on [http://localhost:3000/](http://localhost:3000/)
6. Still get ‘applicationId and/or locationId is incorrect’

---

<div class="post-metadata">

**Author:** ![mxb](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/mxb/32/30_2.png) [@mxb](https://developer.squareup.com/forums/u/mxb)\
**Post date:** [January 26, 2022, 4:57pm UTC](https://developer.squareup.com/forums/t/where-to-put-applicationid-and-locationid-for-web-payments-sdk-quickstart/4918/4 "2022-01-26T16:57:06Z")

</div>

Those seem like the right steps so let’s debug a little further. That [error message comes from CSS](https://github.com/square/web-payments-quickstart/blob/63bde7bb6fcbdadd2022cd60004e82ec0ab1271a/public/app.css#L192) which is applied in [a `catch` for creating `payments`](https://github.com/square/web-payments-quickstart/blob/325fee20fca7a51a8c82cb43e3e2ca9c25c81b05/public/examples/card.html#L79-L89). Very, very often it’s a simple misconfiguration (which doesn’t seem to be the case here). Logging the error that’s being thrown should shed some more light:

```diff
try {
    payments = window.Square.payments(appId, locationId);
- } catch {
+ } catch (err) {
+ console.error(err)

```
