# ChurnKey

Churnkey provides customizable churn flows to help you reduce churn and understand why users are leaving.&#x20;

Billflow now provides an easy to use integration with Churnkey. Bellow are the steps to get started.

## Enable on Billing page

Go to the Advanced settings of your customer portal and enable "Use Churnkey"

![](/files/-MjAVSIUHFm-92K1aW9B)

This will add configurations keys to your embed snippet so values can be dynamically set.

## Churnkey installation

You can find the Churnkey installation steps by logging into [Churnkey](https://app.churnkey.co/) and clicking on "Embed"

### Step 1

The Step 1 on Churnkey's installation instructions can be skipped, Billflow takes care of that for you.

### Step 2

You need to generate a security hash for Churnkey the same way it is done for billflow, by running a piece of serverside code with your logged-in customer's Stripe ID and a secret key.

### Step 3

Step 3 in Churnkey's instructions is where you can grab your appId. You will notice these are the same keys that get generated on your Billflow snippet.

You will see the following configurations added to your Billflow embed snippet.

```
plugins: {
				churnkey: {
								appId: "",								
								customer_id: "",
								authHash: "",
								mode: "",
				}
}
```

| Key          | Value                                                                                                                                                                                                    |
| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| appId        | Churnkey App ID. Grab this from Step 3 of the Churnkey Embed instructions.                                                                                                                               |
| customer\_id | Set to the Stripe customer ID of the logged in user. Eg: cus\_K9c72057lXagII                                                                                                                             |
| authHash     | Set to the authentication hash generated with your Churnkey server-side snippet. This is different that the Billflow hash although the generation steps are very similar.                                |
| mode         | Set to the Stripe mode you want to be in. Both the Billflow modes and the Churnkey modes map to Stripe Test and Live mode. Normally set this to the same mode as your billing page. Eg: "test" or "live" |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.billflow.io/no-code-integrations/churnkey.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
