Square

Square

Square scripts embed hosted payment forms and checkout components for processing card transactions on merchant websites. Scripts handle card tokenization within Square's PCI-compliant iframe environment. Session data is used for fraud prevention and transaction processing.

Overview

Square is a comprehensive commerce platform that provides payment processing, point-of-sale systems, and financial services for businesses of all sizes. On the web, Square's scripts appear when merchants embed Square's hosted payment forms, checkout flows, or online store components into their websites. These scripts handle the critical task of securely collecting and tokenizing payment card information, ensuring that sensitive financial data never touches the merchant's servers directly.

For website operators accepting payments through Square, these scripts are not optional enhancements — they are the payment infrastructure. Without Square's scripts, card transactions cannot be processed. The scripts operate within a PCI-compliant iframe environment that isolates payment data from the rest of the page, meeting the stringent security requirements of the Payment Card Industry Data Security Standard.

What This Script Does

Square's payment scripts handle secure transaction processing through several mechanisms:

  • Payment form rendering: Embeds Square's hosted payment fields (card number, expiration date, CVV) within an iframe on the merchant's checkout page. The iframe isolation ensures the merchant's JavaScript cannot access raw card data.
  • Card tokenization: When the customer submits payment information, Square's scripts convert the raw card data into a secure, single-use token (nonce) that the merchant's server uses to complete the charge via Square's API. The merchant never handles raw card numbers.
  • Fraud prevention: Collects device fingerprint data, session signals, and behavioral indicators to feed Square's fraud detection systems. This includes browser characteristics, IP-derived geolocation, and interaction patterns that help distinguish legitimate transactions from fraudulent ones.
  • 3D Secure authentication: When required by the card issuer or configured by the merchant, manages the 3D Secure (Strong Customer Authentication) flow, presenting additional verification steps within the payment interface.
  • Digital wallet support: Handles Apple Pay, Google Pay, and other digital wallet payment methods through their respective browser APIs, managing the wallet authentication flow within Square's secure environment.
  • Session cookies: Sets cookies necessary for maintaining the payment session state, linking the tokenization request to the merchant's Square account, and supporting fraud prevention across the transaction lifecycle.

Consent & Compliance

Square's payment processing scripts are essential for completing financial transactions on merchant websites. Under GDPR, ePrivacy Directive, and virtually all privacy frameworks, scripts that are strictly necessary for completing a transaction explicitly requested by the user are exempt from consent requirements.

The cookies and data collection performed by Square's payment scripts serve two purposes that both qualify as essential:

  • Transaction processing: The core payment tokenization and processing functionality cannot work without the scripts and their associated session management.
  • Fraud prevention: The device fingerprinting and behavioral analysis performed by Square's fraud detection system is a legal requirement under payment processing regulations and a necessary security measure.

Website operators should still disclose Square as a payment processor in their privacy policy and link to Square's own privacy policy for transparency about how Square handles payment data. However, gating these scripts behind consent would prevent customers from completing purchases — an outcome that contradicts the customer's explicit intent to make a payment.

Should You Block This Without Consent?

Square's payment scripts are essential for processing financial transactions. They handle PCI-compliant card tokenization and fraud prevention, both of which are strictly necessary for the service the customer has requested. Blocking these scripts would make it impossible to accept payments. No.

Visit website

Products (1)

Consent Categories

Essential
Functional

Also Known As

square paymentssquare checkoutsquare payment formsquare cookiessquare fraud preventionsquare embed

Industries

Computers Electronics and TechnologyProgramming and Developer Software

Tracked Domains (2)

squareup.comEssential
square.comFunctional

Frequently Asked Questions

Does Square's payment script require consent?

No. Square's payment processing scripts are essential for completing transactions customers have explicitly requested. Under GDPR and ePrivacy, scripts strictly necessary for processing a purchase are exempt from consent requirements. Gating them behind a banner would prevent payment.

What does Square's payment script do?

Square embeds PCI-compliant payment fields in an iframe to tokenize card data without the merchant ever handling raw card numbers. It also runs fraud detection using device fingerprint signals and behavioral indicators, and supports digital wallets like Apple Pay and Google Pay.

How does ConsentStack treat Square payments?

ConsentStack classifies Square's payment scripts as essential, meaning they load for all visitors regardless of consent status. No consent banner interaction is needed before the checkout form renders. This ensures payment flows are never blocked by consent state.

Related Vendors

Firebase
Firebase
Firebase is Google's mobile and web application development platform offering authentication, real-time database, cloud functions, and analytics. Web SDK scripts initialize Firebase services and may track app events via Firebase Analytics, which is powered by Google Analytics 4. Widely used in single-page apps and PWAs for backend infrastructure and usage tracking.
Google Fonts
Google Fonts
Google Fonts is a free font hosting service that serves hundreds of typeface families via a global CDN. Stylesheets and font files load from fonts.googleapis.com and fonts.gstatic.com to deliver web fonts to visitors. No advertising or tracking functionality is included.
Google
Google
Google is the dominant provider of web analytics, advertising, and infrastructure tools. Scripts like Google Analytics, Tag Manager, Ads, and reCAPTCHA collect behavioral data, manage tag firing, serve targeted ads, and detect bots. Sets persistent cookies to track users and correlate activity across sites.
Google Tag Manager
Google Tag Manager
Google Tag Manager is a tag management system that lets marketers deploy and update analytics and marketing scripts without code changes. The GTM container script loads synchronously in the page head and injects configured tags, triggers, and variables on behalf of other vendors. No data collection of its own — acts as a loader for other scripts.
reCAPTCHA
reCAPTCHA
Google reCAPTCHA is a bot detection and spam prevention service protecting web forms, login pages, and checkout flows. Scripts analyze user behavior, mouse movements, and browser fingerprints to distinguish humans from bots. The invisible reCAPTCHA v3 scores interactions without requiring user challenges.
Sign in with Google
Sign in with Google
Sign in with Google is an OAuth-based authentication service that enables users to log into websites using their Google account credentials. Scripts load the Google Identity Services library, display sign-in buttons, and handle token exchange for secure authentication. Stores session tokens and authentication cookies to maintain login state across page visits.

Manage consent for Square

ConsentStack automatically detects and manages Square trackers so your site stays compliant with global privacy regulations.