> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abconvert.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Stay.AI integration

> Connect Stay.AI to compare subscription plans, first orders, renewals, retention, and churn by test group.

Connect Stay.AI to test which subscription plan brings in more first orders and retains more subscribers.

> [!NOTE]
>
> Stay.AI appears when subscription provider integrations are enabled for your ABConvert account. Use an API key from the Stay.AI account for the Shopify store you have open in ABConvert.

## When to use it

* Compare two existing Stay.AI plans on a product, such as delivery every month against delivery every two months.
* Compare a one-time purchase with a Stay.AI plan, using conversion rate and revenue per visitor.
* Compare renewals, retention, and churn by test group.

## When not to use it

* To create a new plan from a test. Create it in Stay.AI first, then select it in your [subscription test](https://docs.abconvert.io/experiments/subscription-test.md).
* To add a subscription change to a [combined test](https://docs.abconvert.io/experiments/combined-test.md). Those support Recharge and SKIO only.
* To change existing subscriber terms. Manage those subscriptions in Stay.AI.

## How it works

Stay.AI owns the subscription plans and bills renewals. ABConvert selects the plan assigned to each visitor's test group in Stay.AI's product page widget, and hides your other Stay.AI plans if you keep **Show only the assigned subscription plan** on. Existing subscribers keep their current terms.

First orders that include a Stay.AI plan appear in **Subscription Metrics**. **Lifecycle** follows subscriptions started in the test, including renewals, retention, and churn. ABConvert verifies Stay.AI events against subscription records and checks renewal revenue against Shopify order lines. See [Subscription metrics](https://docs.abconvert.io/analytics/metrics.md#subscription-metrics).

## Before you start

Set these up in Stay.AI first. ABConvert uses them as they are.

1. **Create your plans.** See Stay.AI's guide to [selling plan groups and selling plans](https://help.stay.ai/en/articles/12278983-selling-plan-groups-and-selling-plans).
2. **Add the widget to your product page.** See [adding the Subscribe & Save block](https://help.stay.ai/en/articles/9548405-adding-the-subscribe-save-block-to-your-pdps). Add it to every product template the test can show, because a template without the widget shows no plans.

New to Stay.AI? Start with [Getting started on Stay AI](https://help.stay.ai/en/articles/9547512-getting-started-on-stay-ai).

## Setup

**1. Create an API key in Stay.AI**

In the Stay.AI merchant portal, open **Account → API Tokens**. On the **API Keys** page, select **New API Key**. Some Stay.AI menus use **Settings → API Keys**. See [Stay.AI's API key instructions](https://docs.stay.ai/reference/authentication).

Enter a name, a description, and the email of the person who manages the key. Replace the default **All** selection with these scopes:

| Stay.AI scope | Why ABConvert needs it |
| - | - |
| Read Selling Plan Groups | List the existing subscription offers for your products. |
| Read Subscriptions | Verify lifecycle events against subscription records. |
| Read Webhooks | Check the webhook connections already registered in Stay.AI. |
| Update Webhooks | Register the notifications ABConvert needs when you connect. |
| Delete Webhooks | Remove ABConvert's notifications when you disconnect. |

![Stay.AI New API Key form with empty name, description, and email fields and the Read Selling Plan Groups, Read Subscriptions, Read Webhooks, Update Webhooks, and Delete Webhooks scopes selected.](https://mintcdn.com/abconvert/umOFRDbI_YPgqDQN/images/integrations/stay-api-permissions.png?fit=max\&auto=format\&n=umOFRDbI_YPgqDQN\&q=85\&s=2799e610cf004c3a05e09537c46404ce)

Select the plan, subscription, and webhook scopes for ABConvert.

Select **OK** to create the key, then copy it for the next step. Keep the key private. Stay.AI uses the same API key to sign its webhook deliveries; you do not need a separate signing secret.

**2. Connect the matching store**

In ABConvert, open **Integrations**, select **Manage** on the **Stay.AI** card, paste the **API key**, and select **Connect Stay.AI**. ABConvert checks the key and sets up its webhooks in Stay.AI. You do not need to add them yourself.

The connection shows when ABConvert last received a Stay.AI event. **Connected** confirms setup. Lifecycle results appear after ABConvert verifies events and attributes the subscription to a test group.

**3. Create the test**

In your [subscription test](https://docs.abconvert.io/experiments/subscription-test.md#set-up-the-test), select **Stay.AI**, choose your products, then choose a **Shared plan** or **One-time purchase** for each test group.

**4. Preview every test group**

Use **Preview** to check each test group's product page, cart, and checkout before you launch.

## If the connection needs attention

* **The API key is rejected:** copy the key from the Stay.AI account for the matching Shopify store. Check **Read Subscriptions** and **Read Webhooks** as well as the plan scope.
* **Webhook setup fails:** enable **Update Webhooks** and **Read Webhooks**, then retry the connection. ABConvert registers its notifications automatically.
* **Products or plans are missing:** check **Read Selling Plan Groups**, confirm the product has a Stay.AI plan, and refresh the plan list in the test.
* **Connected, but renewal results are missing:** check that the original purchase came through the test. Confirm that Stay.AI lists the renewal on that subscription and Shopify shows the matching order as paid. ABConvert retries events it cannot yet verify.

## Roll out a winning plan

When a test finds a winner, [roll it out](https://docs.abconvert.io/personalization/overview.md#roll-out-a-winning-test-group) as a personalization to show that plan or one-time purchase to the whole audience. Existing subscribers keep their current plan.

## Common mistakes

* **Testing on a template without the widget.** Shoppers on that template see no subscription plans. Check every product template the test can show, including any used by a [template test](https://docs.abconvert.io/experiments/template-test.md).
* **Treating a first order as a renewal.** First orders appear in **Subscription Metrics**. Later subscription activity appears in **Lifecycle**. Retention windows stay pending until subscriptions are old enough.
* **Leaving another subscription app on the product.** Shoppers see both apps' widgets. ABConvert warns you in the test setup when a product has plans from another app.

## FAQ

> [accordion] Why is my product missing from the product list?
>
> The list shows products with Stay.AI plans. Check that the product is assigned to a plan in Stay.AI, then refresh the list.

> [accordion] What happens when I disconnect Stay.AI?
>
> ABConvert stops accepting Stay.AI webhook deliveries right away and removes its webhooks from Stay.AI. Your plans, subscribers, and widget don't change.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.