# Recharge

> Connect a Recharge store so Checkbox reads plans and subscription events, and check Recharge's notification emails and cancellation flow.

Recharge powers subscriptions on many Shopify stores. Checkbox reads your plans and store settings through the
Recharge API and turns Recharge webhooks into lifecycle events (subscriptions created, charges, cancellations), which
the reminder and cancellation checks use.

## Connect {#connect}

1. Register the site with `platform: "recharge"`:

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

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

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

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

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

2. In Recharge, create an API token (**Apps & integrations → API tokens**) with **read** access to Store, Plans,
   Products, Subscriptions and Orders.
3. In the dashboard, open **Site → Integrations → Recharge** and paste the token as `apiToken`. Also paste the token's
   **API Client Secret** (on its Edit API Token page) as `webhookClientSecret`: Recharge signs webhooks with it, and
   without it Checkbox cannot verify deliveries, so it does not register webhooks.

## What to check {#what-to-check}

- **Notification emails.** Recharge sends the subscription confirmation and upcoming-charge emails. Check their
  templates with [`checkEmail`](https://checkbox.site/docs/api/checks#checkEmail) and BCC them to the site's inbound address so the real
  sends are monitored.
- **Upcoming-charge timing.** Compare Recharge's "days before charge" with the windows from
  [`checkNoticeSchedule`](https://checkbox.site/docs/api/checks#checkNoticeSchedule) for your plans.
- **Cancellation.** The customer portal must let subscribers cancel online. If you require a cancellation reason or show
  a retention offer, keep a visible way to finish cancelling.
- **Storefront.** Your product and cart pages need the renewal disclosure and consent: see [Shopify](https://checkbox.site/docs/guides/shopify#fix).
