# Shopify

> Connect a Shopify store with subscriptions to Checkbox, publish the verified renewal-terms block, and monitor the storefront and subscription emails.

> **Checks only.** Checkbox checks your pages, emails and cancellation flow; billing-platform connection, test
> subscriptions and Notices currently work with Stripe. There is no Checkbox app in the Shopify App Store and no
> one-click install yet.

What you can do on Shopify today: Checkbox scans your storefront (the product page is the page judged as your
checkout), checks the subscription emails you BCC to your Checkbox address, and tries the cancellation flow with a test
account you give it. You can optionally connect the store with an Admin API access token from a custom app (read-only:
products and selling plans, subscription contracts, customers, legal policies and themes), so Checkbox can read your
selling plans. Nothing in your store is changed unless you publish a fix.

## Connect the store {#connect}

1. Register the store as a site with `platform: "shopify"`:

```curl
curl https://app.checkbox.site/v1/sites \
  -u "$CHECKBOX_SECRET_KEY:" \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://acme-shop.example", "platform": "shopify" }'
```
```node
import Checkbox from '@checkbox-site/node';

const checkbox = new Checkbox(process.env.CHECKBOX_SECRET_KEY);

const site = await checkbox.sites.create({ url: 'https://acme-shop.example', platform: 'shopify' });
console.log(site.id);
```
```python
import os
from checkbox import Checkbox

checkbox = Checkbox(os.environ["CHECKBOX_SECRET_KEY"])

site = checkbox.sites.create(url="https://acme-shop.example", platform="shopify")
print(site["id"])
```

2. Connect your store with an Admin API access token. A one-click Checkbox app for Shopify is not available yet. In
   Shopify admin open **Settings → Apps and sales channels → Develop apps → Create an app**, give it the
   `read_products`, `read_own_subscription_contracts` and `read_themes` Admin API scopes, install it on your store and
   copy the Admin API access token (`shpat_…`) once. Then open **Site → Integrations → Shopify** in the dashboard and
   paste the shop domain and the token. Checkbox then reads your selling plans (prices, intervals, trials), your legal
   policies and which subscription app owns the plans.

## Fix the product and cart pages {#fix}

The renewal disclosure and consent must appear before the shopper commits, next to the button that starts the
subscription. Open **Site → Fixes** and copy the standalone snippet for your product and cart pages: the wording is generated from
your selling plan and verified by the engine, and it shows the terms set off with an unchecked, required checkbox. (A
theme app block that installs without code edits will come with the Checkbox Shopify app, which is not available yet.)

## Emails and cancellation {#emails-and-cancellation}

- BCC your subscription app's acknowledgment and reminder emails to the site's inbound address (`install.inbound_email`
  on the site) so Checkbox can check them.
- Make sure subscribers can cancel online from their customer account; the synthetic shopper tries it.
- Subscription apps send most lifecycle emails. If yours sends Recharge emails, see [Recharge](https://checkbox.site/docs/guides/recharge).
