Privacy law compliance
Data privacy rules and regulations, such as the General Data Protection Regulation (GDPR) and California Privacy Rights Act (CPRA), set requirements for parties that collect, store, or process personal data of individuals. However, Shopify takes a standardized approach and requires public apps to provide the same privacy rights for all personal data, regardless of where an individual is located.
Mandatory compliance webhooks
Anchor link to section titled "Mandatory compliance webhooks"Mandatory compliance webhooks are callback methods that Shopify requires for apps listed on the Shopify App Store. Shopify requires mandatory compliance webhooks as a way to manage the personal data that an app collects.
Any app that you distribute through the Shopify App Store must respond to data subject requests, regardless of whether the app collects personal data. Shopify provides mandatory compliance webhooks to help.
How it works
Anchor link to section titled "How it works"You must ensure that your app is subscribed to and verifies all mandatory compliance webhooks before you submit your app to be reviewed by Shopify.
Apps must meet the following webhook requirements:
- The app must implement the mandatory compliance webhooks.
- The app must handle
POST
requests with a JSON body andContent-Type
header set toapplication/json
sent to mandatory compliance webhooks. - If a mandatory compliance webhook sends a request with an invalid Shopify
HMAC
header, then the app must return a401 Unauthorized
HTTP status.
If you don't provide URLs for the mandatory compliance webhooks, or your app doesn't respond to these webhooks as required, then your app will be rejected and you'll need to fix the identified problem before submitting your app for another review.
Compliance webhook topics
Anchor link to section titled "Compliance webhook topics"Every app that's distributed through the Shopify App Store must subscribe to the following compliance webhook topics in the Partner Dashboard:
Topic | Event |
---|---|
customers/data_request |
Requests to view stored customer data |
customers/redact |
Requests to delete customer data |
shop/redact |
Requests to delete shop data |
Subscribe to compliance webhooks
Anchor link to section titled "Subscribe to compliance webhooks"You must subscribe to compliance webhooks before publishing your app. To subscribe to compliance webhooks, you need to register endpoints and then configure them either in your app config TOML, or in the Partner Dashboard.
Register an endpoint for each compliance webhook. For HTTPS urls, this will require a valid SSL certificate that can correctly process webhook event notifications. For more information, refer to register an endpoint for HTTPS, set up an event source for AWS EventBridge, or retrieve your Shopify service account address for Google Pub/Sub.
You can subscribe to the compliance webhook topics by making the following changes to your app's
shopify.app.toml
file in the app's root folder. Learn more about configuring your app with the TOML file.Alternatively, add your endpoints in the Partner Dashboard by navigating to Apps, selecting the app that you want to subscribe to mandatory compliance webhooks, and clicking Configuration > Compliance webhooks.
Respond to compliance webhooks
Anchor link to section titled "Respond to compliance webhooks"When you receive one of the compliance webhooks, you need to take the following actions:
Confirm that you've received the request by responding with a
200
series status code.Complete the action within 30 days of receiving the request. However, if you're unable to comply with a redaction request because you're legally required to retain data, then you shouldn't complete the action.
Learn more about how to receive and respond to webhooks.
customers/data_request
Anchor link to section titled "customers/data_request"Customers can request their data from a store owner. When this happens, Shopify sends a payload on the customers/data_request
topic to the apps that are installed on that store.
If your app has been granted access to customer or order data, then it will receive a data request webhook. The webhook contains the resource IDs of the customer data that you need to provide to the store owner. It's your responsibility to provide this data to the store owner directly. In some cases, a customer record contains only the customer's email address.
customers/data_request
payload
Anchor link to section titled "customers/data_request payload"
customers/redact
Anchor link to section titled "customers/redact"Store owners can request that data is deleted on behalf of a customer. When this happens, Shopify sends a payload on the customers/redact
topic to the apps installed on that store.
If your app has been granted access to the store's customer or order data, then it will receive a redaction request webhook with the resource IDs that you need to redact or delete. In some cases, a customer record contains only the customer's email address.
If a customer hasn't placed an order in the past six months, then Shopify sends the payload 10 days after the deletion request. Otherwise, the request is withheld until six months have passed.
customers/redact
payload
Anchor link to section titled "customers/redact payload"
shop/redact
Anchor link to section titled "shop/redact"48 hours after a store owner uninstalls your app, Shopify sends a payload on the shop/redact
topic. This webhook provides the store's shop_id
and shop_domain
so that you can erase data for that store from your database.
shop/redact
payload
Anchor link to section titled "shop/redact payload"
Test your configuration by manually triggering a webhook delivery using the Shopify CLI
webhook trigger
command. Manually triggering webhooks doesn't test your webhook subscriptions.Learn how to manage webhooks for different API versions.
Learn about the available topics for REST Admin API webhooks.
Learn about the available topics for GraphQL Admin API webhooks.
Familiarize yourself with data privacy concepts for apps including privacy policies, data rights, and consent for marketing services.