# Whitelisted Square Domains for Content Security Policy & Web Payments SDK

**URL:** <https://developer.squareup.com/forums/t/whitelisted-square-domains-for-content-security-policy-web-payments-sdk/8186>\
**Category:** Feature Requests\
**Tags:** web-payments-sdk\
**Created:** [January 12, 2023, 12:06am UTC](https://developer.squareup.com/forums/t/whitelisted-square-domains-for-content-security-policy-web-payments-sdk/8186 "2023-01-12T00:06:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![steveh](https://avatars.discourse-cdn.com/v4/letter/s/5fc32e/32.png) [@steveh](https://developer.squareup.com/forums/u/steveh)\
**Post date:** [January 12, 2023, 12:06am UTC](https://developer.squareup.com/forums/t/whitelisted-square-domains-for-content-security-policy-web-payments-sdk/8186/1 "2023-01-12T00:06:37Z")

</div>

Hello,

I don’t believe I’ve seen documented anywhere all of the Square domains that need to be whitelisted when employing Content Security Policy ([Content Security Policy (CSP) - HTTP | MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP)) in conjunction with the Web Payments SDK. It’s easy enough to figure out by following the breadcrumbs of complaint that a browser will log to the console, but it would be nice if this information was documented and thus a bit more contractual, especially if it were to ever change. Thanks.

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [January 12, 2023, 12:11am UTC](https://developer.squareup.com/forums/t/whitelisted-square-domains-for-content-security-policy-web-payments-sdk/8186/2 "2023-01-12T00:11:04Z")

</div>

You’ll want to enable traffic through the following ports.

```auto
- squareup.com:80
- squareup.com:443
- api.squareup.com:443
- connect.squareup.com:443
- connect.squareupsandbox.com:443
- docs.connect.squareup.com:443

```

Your right we don’t document this and we can look into adding this to our documentation. Thanks for pointing this out. 🙂

---

<div class="post-metadata">

**Author:** ![steveh](https://avatars.discourse-cdn.com/v4/letter/s/5fc32e/32.png) [@steveh](https://developer.squareup.com/forums/u/steveh)\
**Post date:** [January 12, 2023, 12:36am UTC](https://developer.squareup.com/forums/t/whitelisted-square-domains-for-content-security-policy-web-payments-sdk/8186/3 "2023-01-12T00:36:39Z")

</div>

This are the settings that I’ve found to be necessary:

**Sandbox**

script-src  
`https://*.squarecdn.com`  
`https://js.squareupsandbox.com`

connect-src  
`https://pci-connect.squareupsandbox.com`

**Production**

script-src  
`https://*.squarecdn.com`  
`https://js.squareup.com`

connect-src  
`https://pci-connect.squareup.com`

There should also be verbiage around having to use a Nonce with the inline script provided at [https://developer.squareup.com/reference/sdks/web/payments](https://developer.squareup.com/reference/sdks/web/payments) when using CSP.

(This sample HTML snippet has been _very_ handy and works well, although I think there is opportunity to make it a little less brittle. A topic for another post however…)

Thanks

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [January 12, 2023, 12:39am UTC](https://developer.squareup.com/forums/t/whitelisted-square-domains-for-content-security-policy-web-payments-sdk/8186/4 "2023-01-12T00:39:26Z")

</div>

We’re constantly working to improve our features based on feedback like this, so I’ll be sure to share your request to the API product team. 🙂

---

<div class="post-metadata">

**Author:** ![lavid](https://avatars.discourse-cdn.com/v4/letter/l/35a633/32.png) [@lavid](https://developer.squareup.com/forums/u/lavid)\
**Post date:** [March 30, 2026, 10:39pm UTC](https://developer.squareup.com/forums/t/whitelisted-square-domains-for-content-security-policy-web-payments-sdk/8186/5 "2026-03-30T22:39:52Z")

</div>

I highly doubt it’ll get any traction, but the lack of proper documentation around needed CSP and CORS etc policy for using the square payment web payment SDK is bothersome. Without some sort of documented set of FQDNs that the square payment API uses (in card mode, google pay, apple pay, etc) prevents consumer websites from implementing their own CSP and CORS policies to harden security.

At least since this thread started, \*.ingest.sentry.io and [csp-report.browser-intake-datadoghq.com](http://csp-report.browser-intake-datadoghq.com) are also required.
