# Privacy and LGPD

> What the SDK collects in the customer's browser, what it never collects, how it transmits data and how long data is kept.

URL: https://docs.proteside.com/en/docs/integration/privacy

The SDK runs in your customers' browsers, so it's natural to ask what data it sends. In short: technical metadata
about the page and its scripts, never payment data or anything the customer types. This page details each point so
you can review it with your data protection officer (DPO) or legal team.

## What is never collected
* **Form field values.** The SDK never reads what the customer types. For sensitive fields, it records only **which
  script** added a listener, the field type and the event type.
* **Keystrokes.**
* **Payment data:** card number, CVV, Pix key, copy-and-paste code, crypto address, VPA and boleto digit line. The
  payment code read on the page stays in memory only, in the browser, as a reference for comparison.
* **Clipboard content.** Only the length of the copied text is sent.
* **Request bodies.** For exfiltration detection, only the names of the patterns found (for example, "card" or
  "CPF") and the body size are sent.
* **Script source code.** Only the SHA-256 hash of the content is sent.

On top of that, the SDK applies automatic redaction before sending: fields and values that look like payment data, ID
documents, credentials or contact details are replaced with `[REDACTED]`.

## What is collected
| Data             | Detail                                                                                                                          |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| Page             | Full page URL (`pageUrl`) and path.                                                                                             |
| Visit source     | Full `document.referrer`, in the `PAGEVIEW` event.                                                                              |
| Browser          | User agent, truncated to 100 characters, and page load time.                                                                    |
| Session          | A random identifier generated on every page load. It doesn't identify the customer and isn't persisted.                         |
| Scripts          | Address (origin and path, without query string), content hash, size, classification and whether it uses `integrity` or `nonce`. |
| Detections       | Event type, technical selectors of the elements involved (for example, `input#cpf`, never the value) and destination domains.   |
| Security headers | Values of the page's security headers (CSP, HSTS and others). `Set-Cookie` is never read.                                       |
| Version          | SDK version and channel.                                                                                                        |

The visitor's IP address reaches Proteside's servers with every request, as with any web access, and is used to limit
API abuse.

**Dynamic Pix.** When the Pix code is generated by a payment provider, the charge address is sent once to Proteside,
outside the events, to check the recipient on the charge signed by the provider. Proteside reads only the key and the
recipient: the buyer's data is discarded right away and the charge address isn't stored.

> **Don't put personal data in the checkout URL**
>
> The SDK sends the **full** page URL, including query string and fragment, and the full referrer. If your checkout
> uses parameters such as `?email=customer@example.com`, `?cpf=…` or session tokens in the URL, those values are sent
> to Proteside: automatic redaction doesn't detect them inside a URL. Keep personal data and tokens out of your
> payment page URLs.

## Browser storage
* The SDK doesn't set cookies or write to `localStorage`.
* It uses a single `sessionStorage` entry, with the payment provider's name and a timestamp, valid for a short time.
  It's used to confirm a card payment on the confirmation page.
* The store's configuration stays in memory while the page is loaded.

## Transport
* All traffic goes over HTTPS to `app.proteside.com`.
* Events are sent in small batches and when the customer leaves the page.
* On a temporary server or network error, the SDK retries. Events that can't be sent are discarded; the checkout never
  waits for delivery.

## Retention
Events are kept according to the store's plan and then deleted automatically:

| Plan       | Retention |
| ---------- | --------- |
| Store      | 7 days    |
| Business   | 90 days   |
| Enterprise | 12 months |

Organizations on plans from before October 2026 keep the retention they had (Standard 90, Growth 180 and Pro 365
days) until they change plans.

Once events expire, **SDK Health** and **Payment Integrity** may show empty states again for older periods. See the
plans in [Billing](https://docs.proteside.com/en/docs/guide/settings/billing).

## LGPD
Proteside is designed to minimize personal data: what travels is technical metadata, hashes and the page URL. The
points that need attention are the full URL and referrer, the user agent and the IP address. Check with your legal
team whether your privacy policy should mention the use of a checkout security tool.

## Next steps
* [Performance and compatibility](https://docs.proteside.com/en/docs/integration/performance)
* [Content Security Policy and headers](https://docs.proteside.com/en/docs/integration/csp)
