---
title: Collect only the customer data that you need
description: >-
  Collect personal information only when you need it, only with express consent,
  and keep it only as long as it serves its purpose.
source_url:
  html: >-
    https://shopify.dev/docs/apps/build/security/credentials-and-data/collect-only-the-data-you-need
  md: >-
    https://shopify.dev/docs/apps/build/security/credentials-and-data/collect-only-the-data-you-need.md
---

# Collect only the customer data that you need

Collect personal information only when you need it, only with express consent, and keep it only as long as it serves its purpose.

***

## Why

Data you don't hold can't leak. Every record you hold is one you have to protect and one a compromise exposes.

***

## How

Never do any of the following, regardless of consent:

* Capture password or login fields under any circumstances.
* Record whole DOM snapshots or full browser event payloads when a single field is all you need.
* Touch checkout or payment data.
* Keep data "just in case", or retain it after it's served its purpose.
* Request Shopify access scopes broader than your app uses.

When you do store personal data, encrypt it, restrict access to the services and people that need it, log who reads it, set a retention limit, and confirm that your deletion path works. Keep production customer data out of development and staging environments entirely, and don't send it to a model provider unless that use is disclosed, permitted, and approved.

For the rules that apply to your app, see [protected customer data](https://shopify.dev/docs/apps/launch/protected-customer-data) and [privacy requirements](https://shopify.dev/docs/apps/launch/privacy-requirements).

***
